We have moved at community.getvera.com

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

Offline Shorty

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #180 on: January 08, 2013, 12:25:12 am »
Big - Hate to say it but I think you may have a couple spare expanders. 

I hadn't tried what we have been discussing so it was all theory.  I read your post and decided to see what was possible.  I can get dummy zones visible in vera.  Here is what I did.

In ElkRP right click on Zones and select New Hardwired Zones.  Select the bank you want and they are added to ElkRP.  Then open the zone you want to make as a dummy, set it up as non-alarm and bypassable.  Send to controller.  Disconnect.

In vera simply reload and it should appear.  I had to reload twice so I could see the bypass option bit I was probably just being impatient as it takes a minute or so for vera to get the zones.  It shows up like a normal zone.

Next is to setup rules/scenes to see if 2 way is within reach and this frankenplugin works.

Offline Shorty

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #181 on: January 08, 2013, 03:22:38 am »
Made some progress.  Alas not a victory.

Short - Hold on to your expanders, Big....  I can turn a light on/off in vera and have that reflected in elk in (effective) real time.  I can not do it in reverse.

Long - Elk can bypass/unbypass zones based on light changes via rules.  Elk can turn on/off lights via rules based on bypass/unbypass status.  Vera can bypass and arm (unbypass I assume) zones via scenes.  Vera can NOT change lights based on bypass/unbypass status.  It can only trigger on trip status.  Is there any way to create a trigger based on bypass status?

To solve this, I attempted to use the combination switch plugin to hopefully make a trigger.  Another brick in the the clunk wall.  I created separate combination switches for when the virtual elk zone is bypassed and armed.  I am assuming "armed" means unbypassed as there is not an unbypassed option.  The vera gui shows arm or bypass so I went with it.  Maybe I am misunderstanding this.

Here is where I am hitting the wall.  Nothing worked until I entered a pin (scene-advanced) before arming/bypassing.  This allows elk to reflect the change when I turn on/off the light in vera.  Nothing I do in Elk is reflected in vera.  Also the combination switches do not change when I change the light in vera.  It remains as "unbypassed" meaning it is showing the light status as being on in both/either vera or elk.  Hopefully I am missing something simple in the logic (or my understanding) of the combo switch or the overlap is creating some loop.

I am also getting invalid pin when this occurs.  From other posts, this seems to be coming from Elk.  I am puzzled because elk is reflecting bypass changes and via rules is changing the light status accordingly.  So if a pin is necessary to change the bypass status, elk is satisfied.  Don't know elk would then report invalid pin. 

Electnixon - You posted pages ago about how each has its own bypass status?  Can you explain this further?  From the above, I suspect this means vera doesn't/can't read elk's bypass status..?  From what I did, vera can send elk a proper bypass status change but not vice versa.  So what is vera's status showing and, if separate, what purpose does it serve.

I understand this is off the back burner for MCV and mcvflorin is busy with other work.  I'm not a programmer so I can't take what is almost done and finish it but am willing to contribute in whatever capacity I can to get this working.  I think we can have a 2 way solution if elk outputs are working in the plugin.  How hard/far off is getting just the outputs up and running with the alpha plugin that is out there?  Elect/Signal/Big/Quixote can you guys program and understand how to finish mcvflorins code?  Anyone have suggestions how we can drag this across the finish line?


Offline electnixon

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #182 on: January 09, 2013, 08:25:14 am »
Shorty,
My experience has been the same as yours: 
+ I have no problem getting dummy zones to show up in Vera.
+ I can bypass and unbypass zones in the Elk from Vera.
+ I can create rules that turn lights on and off in the Elk based on the bypass state of the dummy zones.
- Vera UI generally doesn't update the bypass state of the zones.
- Vera doesn't allow you to trigger scenes based on the bypass status of zones.

I ALWAYS get "invalid PIN" displayed on the Vera UI, so that's nothing new.  If you get "PIN code required" then you forgot to put on in, but if it says invalid PIN, that usually means that your message went through.

So, for now, this appears to be a one way solution from Vera -> Elk (still of benefit).
Big517's solution is definitely a way to get messagese from Elk -> Vera.  Without proper reflection of bypass status in Vera it may be the only way.

I'm time limited in my ability to work on this - wife is on bedrest so I watch the kids when not working.  Otherwise I'd love to dig into the plugin.  Excuses, excuses.

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #183 on: January 09, 2013, 09:04:26 am »
My apologies for breaking the topic a bit, but I uploaded the files from the zip file I found at the last link provided, checked off "restart luup after upload", and reloaded UI5. I do not see any mention of the Elk anywhere except in the list of files.
Am I missing some vital step somewhere? Does it matter that my Vera is connected to a LAN with no Web access?
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 big517

  • Moderator
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #184 on: January 09, 2013, 02:59:35 pm »
Quixote, do you see it running in the Vera Status Screen "Starting ELK Plugin..."?  That is where mine was hung up.  Never did get it working...

I think the ONLY way to get ELK to communicate with VERA without additional wiring of outputs to inputs is creating the Dummy Zones like Shorty said, and create rules in ELK to "ARM  / DISARM" and create Triggers in VERA for each zone and using ARM / DISARM as triggers...  I believe you are only allowed 8 zones in total, but that should at least give us an extra 7 "triggers" that allow ELK to communicate to Vera.




Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #185 on: January 09, 2013, 03:26:54 pm »
There is no mention of the Elk anywhere in UI5, except on the developer page that lists the files on the Vera.
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 big517

  • Moderator
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #186 on: January 09, 2013, 04:13:48 pm »
Quixote,
Is this the first time you've installed the plugin at all? 

I'm not sure how to do this manually.  I just downloaded from the apps page which is the working version i'm currently running...  When I uploaded the files in the zip, it never worked right so maybe I'm doing it wrong also...

Offline Shorty

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #187 on: January 09, 2013, 05:33:06 pm »

I think the ONLY way to get ELK to communicate with VERA without additional wiring of outputs to inputs is creating the Dummy Zones like Shorty said, and create rules in ELK to "ARM  / DISARM" and create Triggers in VERA for each zone and using ARM / DISARM as triggers...  I believe you are only allowed 8 zones in total, but that should at least give us an extra 7 "triggers" that allow ELK to communicate to Vera.

I think the hangup is using Arm/Disarm as vera triggers.  I didn't see that option.  I attempted a workaround using the combination switch but no luck.  Could be the combo switch but I think it is the inability Vera to see bypass/unbypass changes sent from ELK.

8 Zones in total?  Are you referring to ELK Areas not input zones?  I was referring to input zones.  As for input zones you can have up to 208 on the M1G.

(time passes, checked out ElkRP)

I think I got it.  If you are talking about areas it may work.  Elk can use arm/disarm status as triggers unlike bypass/unbypass.  So yes this could provide 7 working triggers but since there are variations of armed states we could get it up to 49 using away, stay, stay instant, night, night instant, vacation, and ready.  Does anyone know if the existing plugin works with multiple areas?  If so we may have a working solution.  Rube Goldberg eat your heart out.

I have been looking at mcvflorins code today.  I think it is written to read and read Elk's bypass status and update vera but is broken.  I think the "invalid pin" may be the problem.  On 3/13/12 mcvflorin said this (see page 5):

Yeah, I know why this happens. I'll add this fix on my TODO list.

I think this bug may cause the code that updates bypass to quit.  Can any of you take a look at L_ElkAlarmPanel1.lua and see if you can find/fix the invalid pin bug?  This may be our ship to Valhalla. 

MCVflorin - Can you provide any details as to the "invalid pin" issue?

One other thought I had was that maybe since bypass is sent in hex and bypass statuses are assigned D,E,F (for 13,14,15) this could be the problem.  Almost all other status are a single digit (1-9).  Maybe the code isn't translating the letter to a number or if it is it is only looking for a single digit (therefore 1).  Coincidentally 1=normal and my combo switch is stuck on unbypassed.  I know this may be remedial and taught on the first day of Lua school but the other statuses are updating properly using the same function and using the letter for bypass seems to be the unique difference.

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #188 on: January 09, 2013, 05:39:19 pm »
Quixote,
Is this the first time you've installed the plugin at all? 

I'm not sure how to do this manually.  I just downloaded from the apps page which is the working version i'm currently running...  When I uploaded the files in the zip, it never worked right so maybe I'm doing it wrong also...

Yes, first time installed. I Do not have web access at my apartment yet, and I'm not sure when I will since I'm having trouble budgeting myself since jumping back into school full-time. It would be nice if I could figure out how to install using the files from the link that I downloaded while at 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 mcvflorin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1755
  • Karma: +11/-3
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #189 on: January 10, 2013, 08:16:58 am »
I think this bug may cause the code that updates bypass to quit.  Can any of you take a look at L_ElkAlarmPanel1.lua and see if you can find/fix the invalid pin bug?  This may be our ship to Valhalla. 

MCVflorin - Can you provide any details as to the "invalid pin" issue?

IIRC this was fixed in version 1.01, but the way the plugin is written, it's not excluded that this bug will surface from time to time. After the bypass request is sent, the plugin reads the next 3 messages, expecting to receive either a ZB message, meaning that the bypass was successful, or a IC message, meaning that the PIN code is invalid. So if the expected response is not in the next 3 messages, no error will be shown, but the status won't be updated either.

That's why I went for a different approach in the 2.0 Alpha version, to make this more reliable.

Offline Shorty

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #190 on: January 10, 2013, 11:36:44 am »
Ok the 3 message monitoring may explain it.  Since I have rules in elk based on vera activity the response could get buried.  For example when elk sees the bypass message it will turn light1 on and change status of dummy zone.  These may send their own acknowledgements so the flood of data that elk echos could easily bury the ZB message. 

Is it possible for the plugin to constantly monitor elk instead of just the next 3 responses?  When I am testing I am connected to elk with vera and ekeypad so I can monitor status/light changes.  This is probably introducing a lot more communication/responses from ELK that is increasing the chances of burying things.

I'm still getting the "invalid pin" message though the status is correctly updated in ELK.  I'm using whatever version comes through when you go to "install apps" on UI5.  I have "Auto Update" checked.  Says Version 1.1.

Are you sure it has been fixed?  I ask because when you mentioned adding it to your TODO that was 10 months ago (3/12) and I think the code is 11 months old.  Am I not using the correct version?  Should the auto update bring me to that version?


Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #191 on: January 10, 2013, 12:47:18 pm »
Mcvflorin,
Please provide me instructions on how to install the plugin on a vera that is on an isolated LAN. The instructions provided in the first link do not work for me.
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 #192 on: January 11, 2013, 11:54:37 am »
@Shorty

The more communication there is, the higher the chance an error will occur. I had little communication from my panel when I developed the plugin, and never encountered this, but it was a wrong method of handling the communication.

It looks like I didn't remember correctly, and this bug was never fixed, but I think I planned to add the fix in version 2.0.

@Quixote

Use the UI4 instructions: http://code.mios.com/trac/mios_elk-alarm-panel/wiki/UI4
replacing MiOS Developers with Apps / Develop Apps.

Offline Shorty

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #193 on: January 11, 2013, 12:13:02 pm »
MCVflorin  - thanks for the info.  I understand how the 3 message issue is preventing the status from being updated in vera.  Does this also create a false positive for the invalid pin?  Whenever I attempt to bypass a zone it goes through to elk but vera displays "invalid pin".  If vera does not receive the bypass acknowledgement does it assume the pin was invalid instead of actually receiving the IC command?  I'd love to do what I can to get this plugin working to its full potential but I don't have the skill to do it.  Can you be bribed to finish it or maybe just fix the bug so we can cobble the 2 way frankensolution together? 

How far away is the new plugin from being completed?  I know you are busy with other things but are we talking about half way there or 99% there.  Finishing it should be a real value add to mcv as it will make buying/adding vera to elk a superior solution to purchasing the elk expander and leviton controller. 


Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #194 on: January 11, 2013, 04:30:56 pm »
@Quixote

Use the UI4 instructions: http://code.mios.com/trac/mios_elk-alarm-panel/wiki/UI4
replacing MiOS Developers with Apps / Develop Apps.

Thanks, McvFlorin. I can see the elk showing up now. Looks like I'm having the infinite startup loop bug, though.
It's progress, though!  I sure hope you guys figure this one out... It would be very cool to have this functionality in my scenes, especially since I have a task created to buzz me in to my apartment complex that I've been itching to use!

Edit: I believe the Vera is flooding my Elk because I can no longer send it commands with an Android app that I have been using regularly. UI5 hangs at "Elk alarm panel: starting up..." And I am unable to save my PIN. No tasks or outputs are displayed, but I do see zones.
« Last Edit: January 12, 2013, 02:53:37 am by Quixote »
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").