Elk M1 (and M1 M1EZ8) Alarm Panel Plugin

The PIN code is stored in RAM (for security reasons) so it’s lost at Luup restart, but it doesn’t have anything to do with the UI, which means that unless you restart Luup, you should be able to bypass/unbypass zones even if you closed and reopened the browser.

In the next plugin version I will offer the possibility to store the PIN code in the flash memory so it will survive Luup restarts.

@mcvflorin

I am going to add a few more zones to my Elk M1 and was wondering if vera will automatically add the additional zone or will I need to do something to add the new zones.

Thanks
John

@jwiz

It will automatically add the new zone when you restart Luup.

@mcvflorin

Wanted to add “Alarm Type” to the description due to the fact that I have three zones with fire alarms and a quick look at the UI does not indicate which is which.

So I had a look at the code and can see ZD is implemented then tried to make some changes so that the ZD information was included in the UI. The upshot is that it did not work and was hoping you might be able to give me some pointers or mabye UI5 will give the option to select custom icons :slight_smile:

I attached an updated Lua file which adds more descriptive zone labels. The drawback is that some zone names will be too long, so you may want to modify the ZONE_DEFINITIONS variable to give the names you want to the zones. I took them directly from the documentation.

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.

OK all working, Thanks :slight_smile:

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.

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

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.[/quote]

@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)

@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.

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

@mcvflorin

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

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:

[ul][li]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.[/li]
[li]Give me the ability to arm/disarm and initiate tasks on the Elk via the smartphone web interface.[/li][/ul]

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

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?

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.

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

[quote=“mcvflorin, post:48, topic:168585”]@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.[/quote]

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

[quote=“schwa13, post:55, topic:168585”]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[/quote]

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

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

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

[quote=“schwa13, post:59, topic:168585”]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[/quote]

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