Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Elk Plug-In Release

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

    Default

    Here is some code that will do what you need.

    Code:
    local path = 'ncc-1701\\ElkM1EZ8\\Output 100'
    local device = DeviceManager:GetDeviceUsingPath (path)
    
    if not device then 
    	print ('No Device')
    end
    local time=5
    device.TimedOn = time
    local control = device:GetControl ('Mode')
    control:SetValue ('On')
    Setting time = 0 should leave it in the desired state until command is issued again.
    Rick

    Girder 6.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote - BlueIris DVR
    Girder 6 Plugins - Elk M1/EZ8, Pushover Connector and more on the way.


    Visit My Showcase

  2. #12
    Join Date
    Jun 2005
    Posts
    760

    Default Thanks!!!!

    Thanks Rick, that worked perfectly!!! I also figured out the units of time are in seconds, in case others are interested.

  3. #13
    Join Date
    Jun 2005
    Posts
    760

    Default

    Hey Rick,
    I'm not sure if you can help me or if this is a question for Rob, but is there a way to shut off logging of Condition changes? Both the Log Display and Interactive Lua Console get quite busy. e.g.from Interactive Lua Console-
    Code:
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 49 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 49 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 49 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 50 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 49 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 50 Condition Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Not Ready 
    LOG: Device Manager : 2  -  Device Event:  Condition emma\ElkM1EZ8\Zone 36 Condition Ready
    I've looked through the many DM files and can't quite figure out which one has all these log/print commands. If you just point me to what line of what file to comment out, that would be great. TIA!

  4. #14
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    File|Settings then select Device Manager from the Automation group on the left and go to the Logging tab. You can change the console log level from there
    --Rob

  5. #15
    Join Date
    Jun 2005
    Posts
    760

    Default

    I've got timeline charts in NR that show the status & historical activity for my 64 Elk zones. In the NR Lua, I register the Elk zone changes to trigger a function to update the chart with the following:
    Code:
    for x=1, 64 do
         NetRemote.RegisterVariableWatch([[computer\ElkM1EZ8\Zone ]]..x..[[\Condition]], Motion.SensorChange)
    end
    This is working great but now I'd like to move all the NR Lua code to Girder. The first problem I ran into is how to trigger an event to run the Motion.SensorChange function. You see, in the Log Display, a typical zone change looks like:
    Code:
    Time    Date    Source    Details    Payloads
    10:56:40:204    5/23/2009    Device Manager    ElkM1EZ8\Addition Motion:Condition=Not Ready
    but to use this to trigger the function, I'd need to capture all 64 DM events. Is there an easier way?

    The only thought I had was for the DM to report "ElkM1EZ8 Event" and to put "Addition Motion" in Payload 1 and "Condition=Not Ready" in Payload 2. Then, a single event could trigger my Motion.SensorChange function for all 64 zones and I could grab (or parse) the payloads to determine the zone and condition, which my function also needs. Is there a way to accomplish this within the existing plugin code framework?

  6. #16
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    You can do this from a bit of Lua in Girder - see gir.AddEventHandler in the help, you can use a regular expression (unfortunately with a different syntax from Lua regular expressions though) to handle several events.
    --Rob

  7. #17
    Join Date
    Jun 2005
    Posts
    760

    Default Thanks Rob!

    Thanks for the quick reply. It worked great once I figured out the Device Number for ElkM1EZ8 was 9999. Thanks again.

  8. #18
    Join Date
    Mar 2010
    Posts
    7

    Default

    For some reason, I don't seem to be getting any activity after starting discovery:

    03/21/10 10:45:28 INFO Initialized
    03/21/10 10:45:28 INFO STATUS: Ok Connecting
    03/21/10 10:45:28 INFO Opening Connection 192.168.1.8 2601
    03/21/10 10:45:28 INFO First Connected
    03/21/10 10:45:28 INFO STATUS: Ok Connected
    03/21/10 10:45:28 INFO Connected after 1 attempt
    03/21/10 10:45:28 INFO STATUS: Ok Connection to panel established
    03/21/10 10:45:29 INFO STATUS: Ok Starting Discovery

    Any suggestions? All my zones are wireless, if that matters.

  9. #19
    Join Date
    May 2004
    Posts
    2,588

    Default

    I could use a little assistance in getting this to work on my system. On the Security page of the component manager I can find the configuration for my Elk after enabling the component. It says that the status is "OK (Connecting)", but none of the actions are populated by any devices in the drop-downs.
    I am able to connect to my Elk panel through RP no problem.
    TIA
    Beware of the robot.

Page 2 of 2 FirstFirst 12

Posting Permissions

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