Author Topic: Universal Devices ISY driver  (Read 20738 times)

xlurkr

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Universal Devices ISY driver
« Reply #15 on: April 26, 2011, 05:14:59 pm »
Bob:

That was it.  Version 0.1.17 loaded fine.  Time to exercise it.  Thanks!

-Tom

xlurkr

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Universal Devices ISY driver
« Reply #16 on: April 26, 2011, 08:21:35 pm »
Bob:

So far, I've been able to get some things to work, but not others.  It's probably operator error.

In the Device Methods tab, if I choose a method that has no parameters, like all lights on or off, it works.  But I can't turn on a light by id or name, for example.  Maybe I'm entering the parameters wrong.  I'm using what shows up in the Device Properties tab under Light Names.

-Tom

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #17 on: April 27, 2011, 08:41:00 am »
It's not working for me either.  I'll figure out what's wrong and let you know

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #18 on: April 27, 2011, 10:23:16 am »
I just uploaded version 0.1.19 to my website.

I believe the problem was that the Elve index (id) mapping to the ISY device node was not working for some devices.  On my system it looked like all of the actual lighting devices and some of the scenes were wrong.  I've fixed the driver so this shouldn't happen and I added a check to try and fix bad mappings.

I also fixed a bug in the logging code. It was't logging most of the drivers messages. 

Try the new version as is, if still doesn't work, check the log and let me know what's there.  Then, under Elve\DeviceData\ISYInsteon, there's a file ElveIsy.ini.  Delete the ElveIsy.ini file and restart the driver. It will recreate it and it should work now.

Just for reference, there are multiple levels of logging that the driver can do:

0 - Errors only
1 - Errors and Warnings
2 - Errors, Warnings, and Status updates
3 - Errors, Warnings, Status updates, Informational messages
4 - All of the above plus debugging messages
5 - Lots of debugging information
6 - Everything, all log messages enabled.

For normal operation, use 0, 1, or 2 depending on how much info you want to log.

If you have a problem , switch to 4 or 5 and reproduce the problem, that will usually allow me to track down what's wrong.

There are a few extra debug messages that will show up when the driver starts, even if the level is 0. Those will eventually be removed.

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Universal Devices ISY driver
« Reply #19 on: April 28, 2011, 01:03:34 pm »
Bob, I know I still owe you a review and recommendations for another driver :( It's on my list.

Regarding the version 1.2 beta I don't know that there were any breaking changes between 1.1 and 1.2 which would cause the driver to not be recognized.
John Hughes
Codecore Technologies

xlurkr

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Universal Devices ISY driver
« Reply #20 on: April 28, 2011, 03:47:27 pm »
Bob:

0.1.19 seems to work with id #'s.  It still doesn't work with names.  Id's are good for now, since that allows me to test the product.  Thanks.

-Tom

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #21 on: April 28, 2011, 04:51:28 pm »
Bob, I know I still owe you a review and recommendations for another driver :( It's on my list.
Not a problem, I'm plenty busy too.

Quote
Regarding the version 1.2 beta I don't know that there were any breaking changes between 1.1 and 1.2 which would cause the driver to not be recognized.
So if I build against the 1.2 beta will it work with 1.1?  I haven't really tried the version I'm building against 1.1 on the latest 1.2 beta, so it could work. If I get a chance, I'll try it out, but it's probably best to have it built against 1.1 for now.

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #22 on: April 28, 2011, 04:56:06 pm »
Bob:

0.1.19 seems to work with id #'s.  It still doesn't work with names.  Id's are good for now, since that allows me to test the product.  Thanks.

-Tom

Thanks, I think I just tried it with id's so I'll take a look at why names aren't working.   

Let me know how the testing goes.

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Universal Devices ISY driver
« Reply #23 on: April 28, 2011, 05:16:52 pm »
Quote
Regarding the version 1.2 beta I don't know that there were any breaking changes between 1.1 and 1.2 which would cause the driver to not be recognized.
So if I build against the 1.2 beta will it work with 1.1?  I haven't really tried the version I'm building against 1.1 on the latest 1.2 beta, so it could work. If I get a chance, I'll try it out, but it's probably best to have it built against 1.1 for now.

I would think that would be fine. I have not tested that but I don't recall any breaking changes to the Driver or interfaces that you are using. The CodecoreTechnologies.Elve.dll assembly version is still 1.0.0.0 as well.
John Hughes
Codecore Technologies

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Universal Devices ISY driver
« Reply #24 on: April 30, 2011, 12:43:15 am »
Bob, it looks like the CodecoreTechnologies.Elve.dll assembly version was inadvertently changed in the v1.2 beta releases which could be causing the versioning issues you are seeing. I'll take a closer look and set the version to what it was in v1.1.
John Hughes
Codecore Technologies

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #25 on: April 30, 2011, 09:30:22 am »
Tom,

A new version (0.20) has been posted to my web site that fixes the problem with using names to control the lights.

Bob:

0.1.19 seems to work with id #'s.  It still doesn't work with names.  Id's are good for now, since that allows me to test the product.  Thanks.

-Tom

Thanks, I think I just tried it with id's so I'll take a look at why names aren't working.   

Let me know how the testing goes.

xlurkr

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Universal Devices ISY driver
« Reply #26 on: April 30, 2011, 10:12:51 pm »
Names are working.

-Tom

iolaus

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: Universal Devices ISY driver
« Reply #27 on: September 26, 2011, 01:37:18 pm »
Bob,

I believe I've found a bug in version .20 of your ISY driver.

I created the following Rule:

Code: [Select]
Rule Name: Test
Group Name:
Description:
Enabled: Yes
Ignore Retriggers: No
Log: No

Event:
  Device Name: ISY-99i  (isy)
  Event Name: ISY Program Trigger

Whenever Filters:

Action List:
1.  Script: System.Log(@"ISY Program Trigger [" + EventArgs.Address + "] [" + EventArgs.Reason + "] [" + EventArgs.Data + "]");
 

Auto-Generated Script:
System.Log(@"ISY Program Trigger [" + EventArgs.Address + "] [" + EventArgs.Reason + "] [" + EventArgs.Data + "]");


And it generates the following error in the log when I execute an event on my ISY:

Code: [Select]
Date:     9/26/2011
Time:     3:32:47 PM
Severity: Error
Source:   MasterService
Computer: AUTOMATION
Context Type: Script
Context Name: rule 'Test'
Description:
An error occurred while executing the script rule 'Test'.
ScriptEvaluatorException: 'EventArgs' does not contain a member definition for 'Data'.

CodecoreTechnologies.Elve.DriverFramework.Scripting.ScriptEvaluatorException: 'EventArgs' does not contain a member definition for 'Data'.
   at Common.ScriptEvaluator.ScriptEvaluator.objectMemberAndArrayMember()
   at Common.ScriptEvaluator.ScriptEvaluator.postIncrementDecrement()
   at Common.ScriptEvaluator.ScriptEvaluator.factor()
   at Common.ScriptEvaluator.ScriptEvaluator.multiplicative()
   at Common.ScriptEvaluator.ScriptEvaluator.additive()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseShift()
   at Common.ScriptEvaluator.ScriptEvaluator.relational()
   at Common.ScriptEvaluator.ScriptEvaluator.equality()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseExclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseInclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalOr()
   at Common.ScriptEvaluator.ScriptEvaluator.variableAssignment()
   at Common.ScriptEvaluator.ScriptEvaluator.getFunctionParameters()
   at Common.ScriptEvaluator.ScriptEvaluator.objectMemberAndArrayMember()
   at Common.ScriptEvaluator.ScriptEvaluator.postIncrementDecrement()
   at Common.ScriptEvaluator.ScriptEvaluator.factor()
   at Common.ScriptEvaluator.ScriptEvaluator.multiplicative()
   at Common.ScriptEvaluator.ScriptEvaluator.additive()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseShift()
   at Common.ScriptEvaluator.ScriptEvaluator.relational()
   at Common.ScriptEvaluator.ScriptEvaluator.equality()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseExclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.bitwiseInclusiveOr()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalAnd()
   at Common.ScriptEvaluator.ScriptEvaluator.logicalOr()
   at Common.ScriptEvaluator.ScriptEvaluator.variableAssignment()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluateBlock()
   at Common.ScriptEvaluator.ScriptEvaluator.evaluate(ScriptParser parser, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(ScriptParser parser, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptPosition position, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos, ScriptFunctionInfoCollection scriptFunctionInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.Evaluate(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos)
   at Common.ScriptEvaluator.ScriptEvaluator.EvaluateNow(String s, ScriptVariableCollection variables, EvaluateFunctionDelegate evaluatefunction, ScriptObjectTypeInfoCollection objectInfos)
   at MasterService.ScriptRunner.RunNow(String scriptName, String script, ScriptVariableCollection extraScriptVariables, Boolean throwError)
Location in script: line 1, column 94.
System.Log(@"ISY Program Trigger [" + EventArgs.Address + "] [" + EventArgs.Reason + "] [" + EventArgs.Data + "]")
                                                                                             ^

It would appear that the Data property of the ProgramTrigger EventArgs is not getting populated/created correctly.

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #28 on: September 27, 2011, 08:13:05 pm »
Only one bug?  I suspect that you'll find many more if you try to create other rules. I haven't really finished that section of the code.

I found what's causing the problem you encountered and can now get past that. However, that just led to another bug.  The filter for the program status lists them as "True", "False", etc., but then it tries to compare against the data from the ISY which is numerical (21, 31, etc.) and thus never matches.  i'm working on that problem now.  I'll post a new version when I get it working.

Thanks for trying it out and reporting the problem. 

Bob

Bob,

I believe I've found a bug in version .20 of your ISY driver.

I created the following Rule:

Code: [Select]
Rule Name: Test
Group Name:
Description:
Enabled: Yes
Ignore Retriggers: No
Log: No

Event:
  Device Name: ISY-99i  (isy)
  Event Name: ISY Program Trigger


It would appear that the Data property of the ProgramTrigger EventArgs is not getting populated/created correctly.
[/quote]

bpwwer

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Universal Devices ISY driver
« Reply #29 on: September 27, 2011, 08:31:16 pm »
Alpha Version 0.21 of the ISY driver has been posted to my web site.  This fixes a bug with rules.  Program rules in particular should now work.  See http://www.bobsplace.com/ISYDriver/ for the new version.