I put an updated dll here:
http://www.xlobby.com/files/loch/files/xelk.1.2.zip
Unzip this file and place the .dll in the plugins\xelk directory.
New additions to the plugin
1. Support for multiple thermostats
2. Support for querying counter values.
3. Human readable logging
4. Outputs send windows messages which can be used for triggers in xlobby.
Multiple Thermostats:
The variables for thermostats already requires the thermostat instance being queried. Thermostat commands being sent now require a thermostat instance.
Counter values:
The ELK protocol does not allow viewing/modifying the counter values. Through the rules interface though the system can be configured to send a text string at a certain interval to the serial port. First you must configure a text string for each counter you want to monitor on the ElkRP. Go to the texts section of ElkRP and create a new text. Type in “counter 1 = “ then insert the counter variable through the selection box. Terminate the string with a Carriage Return/Line Feed. The resulting text should look something like:
counter 1 = % CTR1 %^M^J
Now go to the rules section in ElkRP and create a rule which sends a text string to the serial port at a selected interval. I choose every minute, but it probably does not need to be that often.
The Rule should look something like:
57 WHENEVER EVERY 1 MINUTE
THEN SEND THE FOLLOWING TEXT:
"counter 1 = % CTR1 %^M^J" THROUGH PORT 0
The counter value is retrieved by Xlobby with the following variable:
plugin>elkm1>counter>”x”
Human readable logging:
Added a new set of buttons to the plugin configuration to support logging events from the Elk in an easy to read format. To configure the logging pull up xlobby setup menu by using “F2”. Go to the Plugins setup section, select elkm1 and click on the Configure button. The Elk M1 Plugin configuration menu will now be displayed. Put a check mark next to what events are desired to be logged. The plugin supports logging changes to alarm status, zones, outputs, thermostats, temperatures, tasks, counters, custom values and lighting. Selecting the Elk Protocol button will also log the raw stream between the Elk M1 and the plugin. The log file will be in xlobby/plugins/xelk.
Windows SendMessage:
The plugin now sends windows messages to xlobby when an output changes state. This can be used to setup xlobby to trigger an event. I have been experimenting with this to set the state of toggle buttons.
The wparam for outputs is 10006. The lparam will be based on output number and state. The format will be xxy. Where xx will be the output number and y will be state, 0 = off, 1 = on. So for instance if you want to create a trigger for output 17 turning on then you would create a trigger associated with an event in the Events editor of xlobby. On the Sendmessage tab the wparam entry would contain 10006 and the lparam would be 171.
Let me know if you encounter any problems.
Andrew