We have moved at community.getvera.com

Author Topic: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin  (Read 163490 times)

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #45 on: December 09, 2011, 10:27:38 am »
OK all working, Thanks :)

I did have to make a couple of changes as follows, the reason for the changes is that the processLabels function overwrites the g_childDevices.zones.label created in the ZD handler function. Plus the zone label was updated twice with "Zone" so I ended with a double up.

The changes don't really affect anything if you are not adding zone definitions so I leave it up to you whether you change it or not.

Code: [Select]
L_ElkAlarmPanel1.lua
@@ -481,7 +481,8 @@
  log ("(processLabels) Invalid name. Return.")
  else
  if (labelId == "00") then
- g_childDevices.zones[num].label = data:sub (6)
+ local ZoneType = g_childDevices.zones[num].label
+ g_childDevices.zones[num].label = data:sub (6) .." - ".. ZoneType
  elseif (labelId == "01") then
  g_childDevices.partitions[num].label = data:sub (6)
  else
@@ -655,7 +656,7 @@
    c = data:sub (i, i)
    if (c ~= "0") then
    g_childDevices.zones[i] = {} -- Create zone.
-   g_childDevices.zones[i].label = "Zone #"..i.." - "..ZONE_DEFINITIONS[c]
+   g_childDevices.zones[i].label = ZONE_DEFINITIONS[c]
    end
    end
    return true


« Last Edit: December 09, 2011, 10:30:53 am by zoot1612 »

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #46 on: December 10, 2011, 03:53:14 am »
Quote from: zoot1612
mabye UI5 will give the option to select custom icons

This feature has been requested several times, but it's not going to be added soon because it requires some major changes to the MiOS engine.

@mcvflorin,
You'll get part-way there with what you've done for my Bug report in UI5:
    http://bugs.micasaverde.com/view.php?id=1660

as long as you create the different Sensor Types (Door, Smoke, Motion) for the Zones, you'd get a different form of icon.  It's just that there are a few sensor named types that have been left out (Window, Fire/Heat come to mind).  The DSC lets you specify which are the "Smoke" zones, for example, for this very reason (icon differences, scripting differences)

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #47 on: December 12, 2011, 03:23:48 am »
@guessed,

You're right about this. I do give the user the option to specify which sensors are door sensors and which are smoke sensors.

Code: [Select]
local function getDeviceType (zoneNo)
-- Motion Sensors
-- No need to parse the MotionSensors state variable, because all the devices
-- that are not of one of the types below will be set as Motion Sensors by default.

-- Door Sensors
local doorSensors = luup.variable_get(SID.PANEL, "DoorSensors", lug_device) or ""
if (doorSensors == "") then
luup.variable_set(SID.PANEL, "DoorSensors", doorSensors, lug_device)
else
for zn in doorSensors:gmatch("%d+") do
if (tonumber(zn, 10) == zoneNo) then
return {type = "urn:schemas-micasaverde-com:device:DoorSensor:1", file = "D_DoorSensor1.xml"}
end
end
end

-- Smoke Sensors
local smokeSensors = luup.variable_get(SID.PANEL, "SmokeSensors", lug_device) or ""
if (smokeSensors == "") then
luup.variable_set(SID.PANEL, "SmokeSensors", smokeSensors, lug_device)
else
for zn in smokeSensors:gmatch("%d+") do
if (tonumber(zn, 10) == zoneNo) then
return {type = "urn:schemas-micasaverde-com:device:SmokeSensor:1", file = "D_SmokeSensor1.xml"}
end
end
end

return {type = "urn:schemas-micasaverde-com:device:MotionSensor:1", file = "D_MotionSensor1.xml"}
end

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #48 on: December 12, 2011, 09:35:52 am »
@mcvflorin

So is it just a matter of manually adding a variable to each device?

Offline Video321

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #49 on: January 03, 2012, 12:18:46 pm »
I'm considering adding a Vera to my Elk M1G for Z-Wave control, but have a few questions about integration with this plugin.
This is what I'm looking for initially:

  • Control lighting/thermostat via Elk zones and arm/disarm conditions. Such as....whenever this input is tripped then turn on this light and also whenever the house is armed away change the thermostat to XX and turn lights off.
  • Give me the ability to arm/disarm and initiate tasks on the Elk via the smartphone web interface.

Can this be accomplished at this point and, if so, what is the reliability factor?

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #50 on: January 03, 2012, 01:25:30 pm »
Except for the tasks (implemented in the latest development version, but not tested) everything is possible and should be pretty reliable.

Offline Video321

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #51 on: January 03, 2012, 01:36:25 pm »
Except for the tasks (implemented in the latest development version, but not tested) everything is possible and should be pretty reliable.
Excellent.
So, task execution is possible but just needs to be ironed out - would this be within' a month or so?

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #52 on: January 03, 2012, 02:02:28 pm »
Well, I don't recommend using the development version, but the release version (1.01 on code.mios.com, or the one in apps.mios.com if using UI5).

Hopefully I will have an update for this plugin this month.

Offline joeberg

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #53 on: January 03, 2012, 05:17:02 pm »
So do we just add the zones for each in the Advanced field for "DoorSensors" and "SmokeSensors" separated by commas in order for it to differentiate between sensor types?

I tried that and it reset all of those sensors for a few minutes (no image at all) and then they came back as they were before with a Motion icon.

I am sure I am missing something simple.

Joe

@guessed,

You're right about this. I do give the user the option to specify which sensors are door sensors and which are smoke sensors.

Offline schwa13

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #54 on: February 19, 2012, 12:31:07 pm »
Hi, I have had the Vera 2 for over a year now, but just got an Elk M1 installed.  I am using UI5, downloaded the app for the Elk, entered the IP address and the non secure port number as configured in the M1XEP, but can't get the Vera to talk to the panel.  I get a message that says "Elk Alarm Panel, failed to get zones".  When I go to the device and hit clear, there is nothing else to see. 

I tried the secure port as well as the non secure port number.  Not sure where I can look in terms of logs to see what is failing.  I know that the IP portion is working correctly as i can connect to and program via the the ElkRP software no problem.

Any other suggestions?

Thanks

Offline jwiz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #55 on: February 19, 2012, 04:28:49 pm »
Hi, I have had the Vera 2 for over a year now, but just got an Elk M1 installed.  I am using UI5, downloaded the app for the Elk, entered the IP address and the non secure port number as configured in the M1XEP, but can't get the Vera to talk to the panel.  I get a message that says "Elk Alarm Panel, failed to get zones".  When I go to the device and hit clear, there is nothing else to see. 

I tried the secure port as well as the non secure port number.  Not sure where I can look in terms of logs to see what is failing.  I know that the IP portion is working correctly as i can connect to and program via the the ElkRP software no problem.

Any other suggestions?

Thanks

Can you access your M1XEP web page from your browser. I had that same issue a couple of times when my M1XEP locked up on me. I power cycled the M1XEP and reloaded UI. After that zones were received with no problem.

John

Offline schwa13

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #56 on: February 19, 2012, 05:11:19 pm »
Yes, I can access the web page as well as the device via the ElkRP software.  I have restarted the M1XEP, added and removed the application within Vera as well a couple of times.

Offline jwiz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #57 on: February 19, 2012, 05:36:18 pm »
Yes, I can access the web page as well as the device via the ElkRP software.  I have restarted the M1XEP, added and removed the application within Vera as well a couple of times.

Is your unsecure port enabled in the M1XEP settings. I believe it is disabled by default. You can also see if you telnet into the M1XEP on port 2101.

John

Offline schwa13

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #58 on: February 19, 2012, 11:04:33 pm »
Thanks for the telnet check, I don't think the M1XEP saved the port settings the first time around on the insecure port.  I went back through resent the data and then it worked.  Now it loaded the zones...  Off to figure out how to use it.

Did anyone get it working via Home Buddy on Android yet, I read above that the partition does not show up and am having the same problem.  All I see are all of the zones so I can't arm/disarm remotely.

Thanks
« Last Edit: February 19, 2012, 11:17:09 pm by schwa13 »

Offline jwiz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #59 on: February 19, 2012, 11:59:58 pm »
Thanks for the telnet check, I don't think the M1XEP saved the port settings the first time around on the insecure port.  I went back through resent the data and then it worked.  Now it loaded the zones...  Off to figure out how to use it.

Did anyone get it working via Home Buddy on Android yet, I read above that the partition does not show up and am having the same problem.  All I see are all of the zones so I can't arm/disarm remotely.

Thanks

AutHomation is the only Android app that works with the Elk plugin. It will allow you to arm/disarm the system with the app. Only way to do it in Home Buddy is to create arming and disarm scenes which was the way I was doing it until we got the elk supported in AutHomation which works very well.

John