Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Elk Plug-In Release

  1. #1
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,068

    Default Elk Plug-In Release

    Enhancements described in this post http://www.promixis.com/forums/showthread.php?t=19121

    Additional Enhancements:
    Analog Zone Polling
    Added support to add outputs above 64 from configuration screen

    Changes/Fixes:
    Changed zones reporting from Violated/Normal to Not-Ready/Ready in order to stay inline with other Security related devices handled by the Device Manager.
    Fixed bug in Keypad/Zone Temperatures not showing as devices
    Fixed bug with setting Dim level below 10%
    Fixed issue with sending a on/off command to an output already in that state

    ElkM1EZ8 Plug-In 1.0.4
    Last edited by harleydude; January 16th, 2009 at 05:02 PM.
    Rick

    Girder 5.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote 2.0 - Panasonic KX-TA624 Phone System - ZoneMinder DVR
    Girder 5 Plugins - Elk M1/EZ8, Email Manager, Girder Backup, Ocelot, xAP Speedfan, xAP Ping, xAP Zoneminder and many more.


    Visit My Showcase

  2. #2
    Join Date
    Jun 2005
    Posts
    760

    Default Two Questions

    Thanks Rick for the update to a great plugin!

    Two questions. First, I've noticed the plugin isn't sent or doesn't otherwise know when counter change take place from within the Elk system. For example, if I set up an Elk rule to toggle an output and increment a counter every 10 seconds, I see the output toggle in Girder but not the counter changing. However, I can see the counter increment on the Elk keypad display if I send it there.

    If I add THEN SEND THE FOLLOWING TEXT: "|%CTR4%|" THROUGH PORT 0 to the Elk rule, I see the following in the G5 Lua Console:
    Code:
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Output 24 Condition Off 
    LOG: ElkM1EZ8 : 5  -  ElkM1EZ8Class:OnReceiveIncompleteData() 769 
    LOG: ElkM1EZ8 : 5  -  ElkM1EZ8Class:OnError()
    where 769 is the counter #4 value sent from Elk. Is this an Elk problem of not automatically sending out counter changes? If so, can you suggest how I can capture text message sent by the Elk control (as in the 769 above)? By the way, from Girder, I can change the counter value with the "Write Counter" action and see that it changes (in G5 and Elk) so that part works fine.

    My second question is shorter. How do you read analog values from an Elk zone defined as an Analog Zone?

  3. #3
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,068

    Default

    Thanks for the compliment. Sometimes I wonder if anyone is really using it, as I don't hear to many comments or questions.

    Elk does not send the counter values when they change. I spoke to Elk about this, their explanation was that it could flood the serial/TCP port with counter messages if the values were changing to often. When sending text from the Elk be sure to include ^M^J at the end of the string.

    For the analog zones, in the plug-in settings under Other Settings, change the value of Poll Analog Zones to something other than zero. I do not have any analog zones, so I could not test this in a real environment. Please provide me with some feedback on this.
    Rick

    Girder 5.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote 2.0 - Panasonic KX-TA624 Phone System - ZoneMinder DVR
    Girder 5 Plugins - Elk M1/EZ8, Email Manager, Girder Backup, Ocelot, xAP Speedfan, xAP Ping, xAP Zoneminder and many more.


    Visit My Showcase

  4. #4
    Join Date
    Jun 2005
    Posts
    760

    Default

    Hi Rick, That's a lame excuse by Elk but at least there appears to be a work-around. I've added the ^M^J and now I see this error in the Girder Log display
    Code:
    Time    Date    Source    Details    Payloads
    05:04:08:322    2/17/2009    ElkM1EZ8    Error in callback OnReceiveData. See Lua console for more details
    ans this in the Lua Console
    Code:
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Output 24 Condition Off 
    Error in transport callback OnReceiveData
    ...Promixis\Girder5\luascript\Classes/ElkM1EZ8Class.lua:512: attempt to concatenate local `msgType' (a nil value)
    C:\Program Files\Promixis\Girder5\luascript\Classes/ElkM1EZ8Class.lua:512 in function <C:\Program Files\Promixis\Girder5\luascript\Classes/ElkM1EZ8Class.lua:470>
    (tail call): ?
    [C]: in function `xpcall'
       Locals
           pfunc : function: 09085D68
           pargs : table: 09085CB8
           arg : table: 09085CB8
           func : function: 07CB67D0
       Upvalues
           clearLines : function: 05999AA8
           errorHandler : function: 05999B98
    C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:1073 in function <C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:1071>
       Locals
           self : table: 0C4F24A0
           Event : Data: 32 32      22  Code: RXCHAR
       Upvalues
           Statuses : table: 07BE3208
    C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:1144 in function <C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:1141>
       Locals
           self : table: 0C4F24A0
           Event : Data: 32 32      22  Code: RXCHAR
       Upvalues
           ResponseCodes : table: 07BE4A10
    C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:840 in function <C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:815>
       Locals
           EventCode : 1
           EventData : 22
           Event : Data: 32 32      22  Code: RXCHAR
       Upvalues
           self : table: 0C4F24A0
    C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:536 in function <C:\Program Files\Promixis\Girder5\luascript\Classes/Transport/Core.lua:533>
    The counter value here was 22 which seems to be the correct data.

    Regarding the analog values, the up/down arrows for "Poll Analog Zones" are grayed out and I cannot change the value from zero. I'll try re-starting everything after work to see if that helps.

  5. #5
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,068

    Default

    I have been able to reproduce this error. In my test case I was sending COUNTER||%CTR1%|^M^J and it works fine. When the Elk sends user defined text, the plugin fires a ElkText event with the text sent as a payload. This way you can send any combinations of text and then parse it in Girder.

    I will look into this some more and see if I can make it more reliable.
    Rick

    Girder 5.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote 2.0 - Panasonic KX-TA624 Phone System - ZoneMinder DVR
    Girder 5 Plugins - Elk M1/EZ8, Email Manager, Girder Backup, Ocelot, xAP Speedfan, xAP Ping, xAP Zoneminder and many more.


    Visit My Showcase

  6. #6
    Join Date
    Jun 2005
    Posts
    760

    Default

    Rick, I added the "Counter" text in front of the "||%CTR1%||^M^J", restarted Girder, and now it seems to work- I can see the counter value in Payload 1. Note that it's a bit fuzzy if there is one or two pipe symbols (|) surrounding the %CTR1% in Elk but I let Elk add the counter value when editing the text string in Elk. I'm not sure why the error disappeared but am glad you were able to reproduce it. Thanks for helping me move forward.

    As for the analog value of a zone, after restarting Girder, I am still not able to change the polling interval value in the settings tab.

  7. #7
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,068

    Default

    I added the | right after COUNTER as a delimiter to parse the actual counter value. When inserting the counter variable in the Elk text there is only one | on each side of the counter variable.

    I have reproduced the analog polling field and will upload a new file later today.
    Rick

    Girder 5.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote 2.0 - Panasonic KX-TA624 Phone System - ZoneMinder DVR
    Girder 5 Plugins - Elk M1/EZ8, Email Manager, Girder Backup, Ocelot, xAP Speedfan, xAP Ping, xAP Zoneminder and many more.


    Visit My Showcase

  8. #8
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,068

    Default

    Try the file below. Download to the Girder5\plugins\ui folder.
    Attached Files Attached Files
    Rick

    Girder 5.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote 2.0 - Panasonic KX-TA624 Phone System - ZoneMinder DVR
    Girder 5 Plugins - Elk M1/EZ8, Email Manager, Girder Backup, Ocelot, xAP Speedfan, xAP Ping, xAP Zoneminder and many more.


    Visit My Showcase

  9. #9
    Join Date
    Jun 2005
    Posts
    760

    Default

    Rick, Worked Great!!! I can change the polling time and I now see the Lua variable ElkM1EZ8.ElkEventServer.Analogs[7].Value being populated with the voltage value. Thanks so much.

  10. #10
    Join Date
    Jun 2005
    Posts
    760

    Default

    Rick, Spring is (almost) here and I need to get my watering system GUI going. The watering valves are now controlled by Elk output relays and I can control them from an Elk Automation Control Output Action in Girder. What is the equivalent Lua code to control an output?

    My plan is to have NR send a Girder event with a payload where the payload consists of the output number I want to control and an On/Off command. I know how to receive this event and parse the payload in Girder, but then I'm stuck. Within Lua on the Girder side, how do I control an Elk output? An example would be greatly appreciated.
    ----- edit
    In looking at the ElkM1EZ8Provider.Lua, it looks like I could specify an "On" time in the command- Instance:OutputOn (num, time). An example of how to have time in the output command would also be welcome.
    Last edited by dsmes; April 11th, 2009 at 05:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •