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

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #15 on: August 08, 2011, 04:53:22 am »
Hi Quixote,
Nope, not close yet. I might get to work on it in 2-3 weeks.

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #16 on: September 02, 2011, 10:35:35 pm »
Hi Mcvflorin

Feature
Is it possible to change the following in the startup for the ELK: -

Code: [Select]
local ipAddress, ipPort = string.match (luup.devices[lul_device].ip, "^(.*):(%d+)")
debug (string.format ("(Elk Plugin Startup) ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort)))
if (ipAddress and ipAddress ~= "") then
if (not ipPort) then
ipPort = 5000
end

with

Code: [Select]
local ipAddress, ipPort = string.match (luup.devices[lul_device].ip, "(%d+.%d+.%d+.%d+):?(%d*)")
if (ipAddress and ipAddress ~= "") then
if (ipPort==nil) or (ipPort == "") then
ipPort = 2101
end
debug (string.format ("(Elk Plugin Startup) ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort)))

If the ip address is entered without the port the first instance does not work, for me anyway.

Thanks

John


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 #17 on: September 02, 2011, 10:41:18 pm »
John,
The second format isn't correct, it needs to be of the more generic form.  The one you've listed only works for IPv4 addresses (no IPv6) and won't work for anything that's resolved using DNS Names instead of raw addresses.

In it's original form both the IP and Port are mandatory.  Something akin to the following can be used to get around that:

Code: [Select]
       local ipAddress, trash, ipPort = string.match(luup.devices[lul_device].ip, "^([%w%.%-]+)(:?(%d-))$")

UPDATE: corrected to be closer to what's needed...
« Last Edit: September 02, 2011, 11:44:18 pm by guessed »

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #18 on: September 02, 2011, 11:16:54 pm »
no IPv6

Fortunately*, Vera's version of OpenWrt doesn't even have IPv6 compiled in, so supporting IPv6 in a plugin is kind of moot.

* Warning: may contain sarcasm.

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #19 on: September 02, 2011, 11:21:04 pm »
doh, didn't even think of IPV6 or that someone else may use DNS. Living in my little world apologies to all who look further ;)

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 #20 on: September 02, 2011, 11:35:13 pm »
I'm an optimist...   Funnily enough I didn't even check IPv6 on Vera, it's just that it was on my mind as we have to code to it @work, so I'm on autopilot...

no IPv6

Fortunately*, Vera's version of OpenWrt doesn't even have IPv6 compiled in, so supporting IPv6 in a plugin is kind of moot.

* Warning: may contain sarcasm.


Offline Quixote

  • Sr. Member
  • ****
  • Posts: 349
  • Karma: +17/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #21 on: September 08, 2011, 11:50:30 am »
Hi,
Can we get an update on your work-load and another estimation of when you might get to look at this again?

Thanks!
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person. (I guess I'm "Chaotic Neutral").

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #22 on: September 08, 2011, 12:00:19 pm »
My plan is to work on the new features next week. Hopefully I will be able to stick to it.

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 349
  • Karma: +17/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #23 on: September 08, 2011, 12:18:36 pm »
Awesome. I think I can speak for us all when I say that we appreciate your hard work!
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person. (I guess I'm "Chaotic Neutral").

Offline jwiz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #24 on: September 10, 2011, 07:38:43 pm »
I just received my Vera2 a couple days ago and I have my Elk M1gold interfaced via M1XEP. I have 2 questions on the Elk plugin, I know its still in beta which maybe the issues I am running into.

1) When arming or disarming with UI4 or controlling via scenes it shows Invalid PIN code on UI4 but system arms and disarms like it should.

2) I am also running home buddy on my android and is there a way to have the partition show up so the alarm can be armed or disarmed like the UI4 interface. The zones show up and nothing else.

Thanks
John

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #25 on: September 12, 2011, 04:45:23 am »
1) I think I know why this happens. This is an easy fix, and will be present in the next version.
2) The partitions are created the same way as the zones, so I don't know why this happens. Can you get the user_data with http://<Vera_IP>:3480/data_request?id=user_data&output_format=xml and send it to me at florin@my.mios.com?

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #26 on: September 13, 2011, 09:43:48 am »
I think I found the cause for the second issue. Try removing the '*'  (or giving it a simple name like partition_1, just to test this theory) from the device name and let me know if this fixes anything.

Offline jwiz

  • Full Member
  • ***
  • Posts: 118
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #27 on: September 15, 2011, 09:54:37 pm »
Just to update, I have not been able to test with a new partition name yet. When I changed the name and went to save the changes my Vera2 locked up and I cant get it reset. I have all lights on steady except ETH1 and ZWave. I have had no luck resetting it and I dont even get a network link out of either ethernet port. Talked to Tech support on the 13th and they requested me to put a request in online. Just waiting to hear back from.

Offline signal15

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #28 on: September 29, 2011, 03:21:02 pm »
I am excited about this plugin.  A couple of questions:

- Will it have the ability to take events from the ELK and act on them?  (e.g. motion sensor trips, door sensors, etc)
- Will it have the ability to turn outputs on and off?
- Will it have the ability to execute tasks?
- Will it have the ability to pull the status of outputs and inputs?

I love my ELK, but the automation programming stuff is very limited.  If I could do it on Vera, this would make my life much easier.

One of my main gripes is that when the ELK sends an email/SMS, there is no way for it to put the name or ID of the violated zone in the email.  I can just have a generic message that the alarm is tripped.

Offline mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #29 on: September 30, 2011, 06:54:03 am »
Currently it can do only basic stuff like arming/disarming a partition and bypassing/unbypassing a zone. Some of the things you asked about have been requested by users and are on my TODO list. Unfortunately I didn't have much time to work on the new features, but they will be added eventually.