We have moved at community.getvera.com

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

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #495 on: November 03, 2016, 10:09:26 pm »
All -

I have been doing some 'exploring' trying to find a way to find a 'work around' to the PIN problem.

I have found one possibility:  SCENE and use the Advanced Editor in section 3 of the scene creation/modification dialog.

You can load a pin using a scene:

#40 Partition 1: Walters   
Service: urn:micasaverde-com:serviceId:ElkAlarmPanel1        StorePinCode     PinCodeValue: (4 digits here)   


#40 Partition 1: Walters   
Service: urn:micasaverde-com:serviceId:AlarmPartition2        RequestQuickArmMode     State: STAY


HOWEVER!  Note the 2 line immediately above.  Scripting engine asks for "AlarmPartition2"  which does not exist....

So, the Scene loads a PIN for security code of Alarm Panel but you can't use it because it thinks we want "Partition2" to be armed.

The "state" variable box wants a STRING value.  Should it be entered in Quotes?  What?

Thanks to all

Bill


"Partition2" is the service file "urn:micasaverde-com:serviceId:AlarmPartition2" not the actual partition.

The service file is released as part of the Vera firmware and has the following standard services: -

ArmMode
DetailedArmMode
Alarm
ChimeEnabled
AlarmMemory
LastAlarmActive
LastUser
VendorStatus
VendorStatusCode
VendorStatusData
RequestArmMode
RequestQuickArmMode
RequestPanicMode

Note: Not all these services are supported by the Elk plugin.

As you see from above this service file does not support PIN storage etc. therefore PIN manipulation services are built under the "urn:micasaverde-com:serviceId:ElkAlarmPanel1" service file.

The service file is released as part of the Elk plugin and has the following standard services: -

ClearPinCode
ClearTask
GetEventJob
GetTroubleReport
GetHeartbeat
FunctionKey
StorePinCode
SetElkRTC
SetCounter
SetCustom
Speak
Display

While the PIN code is handled under the "urn:micasaverde-com:serviceId:ElkAlarmPanel1" service file internally the PIN code is stored against the partition device in memory and does not survive a restart.

Code: [Select]
  g_pinCodes[tonumber(partitionNo, 10)] = pinCode
  debug("storePinCode: PIN code stored for partition " .. partitionNo .. ".")

If the PIN has been stored in a partition then the PIN field can be left blank and plugin should check to see if the PIN is stored or not in the partition.

Code: [Select]
pinCode = tonumber(pinCode) or g_pinCodes[partitionNo]

The state of RequestArmMode can be one of the following with no quotes required.

Force
Armed
Disarmed
Stay
StayInstant
Night
NightInstant
Vacation




Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #496 on: November 03, 2016, 11:05:42 pm »
Now we're getting somewhere!!
Thanks! This should keep us busy for a while. :D
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 signal15

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +1/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #497 on: November 04, 2016, 05:56:08 pm »
I just create tasks in the Elk for Arming and Disarming, and then execute those tasks with the Vera.  No PIN required.

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 350
  • Karma: +18/-35
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #498 on: November 04, 2016, 07:29:04 pm »
I just create tasks in the Elk for Arming and Disarming, and then execute those tasks with the Vera.  No PIN required.

That's a great idea. I hadn't thought of that approach.
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 electnixon

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #499 on: November 25, 2016, 10:14:59 pm »
Hey all.  After upgrading to a VeraPlus and joining the ranks for UI7, I can no longer get logs to show up in Vera from the Elk.  Instead, I get this message: 
Error executing function logTab(): setCpanelContent is not defined


Am I missing a required setting?

Thanks for the help.

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #500 on: November 28, 2016, 01:11:56 am »
Hey all.  After upgrading to a VeraPlus and joining the ranks for UI7, I can no longer get logs to show up in Vera from the Elk.  Instead, I get this message: 
Error executing function logTab(): setCpanelContent is not defined


Am I missing a required setting?

Thanks for the help.

Which version of the plugin are you using?

Offline electnixon

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #501 on: December 05, 2016, 10:44:56 am »
I'm on version 2.19  The app info says it's the latest version.  Do I need to download manually somewhere?

Thanks for the help

Offline electnixon

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #502 on: December 05, 2016, 11:29:04 am »
I went and downloaded the files from here:
http://code.mios.com/trac/mios_elk-alarm-panel/browser/branches/2.0_changes

and uploaded them on the Vera then restated Luup.  Where was no change in behavior, and the app listing still says it's ver 2.19

My main unit is a VeraPlus, but I also have a Vera 3 on UI7.  It also shows ver 2.19 of the plugin and I just checked (over a remote connection) and the tabs don't work on that one either.  The tabs do work for the partition, but not for the main device.  I have checked the VeraPlus over a local connection before and it was no different than when remote.


Offline electnixon

  • Jr. Member
  • **
  • Posts: 56
  • Karma: +2/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #503 on: December 08, 2016, 12:05:40 pm »
OK, I'm going to show my ignorance here, but is the file "shared.js" expected to be in the list of LUUP files, or is it in another folder?
It's not in my list.  Would that create a problem?

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #504 on: December 08, 2016, 07:03:41 pm »
OK, I'm going to show my ignorance here, but is the file "shared.js" expected to be in the list of LUUP files, or is it in another folder?
It's not in my list.  Would that create a problem?

This is not a plugin file.

For latest elkm1 files go here: -

https://github.com/zoot1612/plugin-elkm1

Please note that these files are beta so always a risk and I haven't got the time to fully test and publish in the app store currently.

Offline reaper607

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #505 on: December 21, 2016, 09:18:52 pm »
So elk released updates to the M1XEP (2.0.42) and the Panel itself (5.3.10)

On the 2.19 version in the marketplace i get this error:

Code: [Select]
01 12/21/16 20:13:50.588 LuaInterface::CallFunction_Startup-1 device 42 function elkStartup failed [string "-- TODO..."]:1403: attempt to index field '?' (a nil value) <0x2bfed680>

After downloading and uploading the latest from git hub i get this error:

Code: [Select]
01 12/21/16 21:00:51.889 LuaInterface::CallFunction_Startup-1 device 95 function elkStartup failed [string "-- Plugin Version..."]:1342: attempt to index field '?' (a nil value) <0x2b91d680>
01 12/21/16 21:00:51.890 LuImplementation::StartLua running startup code for 95 I_ElkAlarmPanel1.xml failed <0x2b91d680>

The M1XEP updates where required due to certificate key length problems with windows. The other update i did for the sake of completeness (from 5.3.0) Everything was working fine before the update but now the plugin crashes. Are there any know issues i failed to read through?

release notes:
http://www.elkproducts.com/LiteratureRetrieve.aspx?ID=140302


Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #506 on: December 22, 2016, 07:26:59 pm »
@reaper607
I will have a look at updating my panel and see if I can reproduce error and fix.

Offline reaper607

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #507 on: December 22, 2016, 07:40:35 pm »
Just as an update:

I downgraded the panel to 5.3.0 and everything started working again. Safe to say that the problem is with some change to the panel firmware and not some change to the vera or the M1XEP firmware

Offline zoot1612

  • Moderator
  • Hero Member
  • *****
  • Posts: 603
  • Karma: +21/-2
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #508 on: December 22, 2016, 07:58:55 pm »
@reaper607
I have updated the plugin in git to hopefully bypass this error for now if you move to latest firmware. Obviously I haven't tested this.

Updated firmware and using current git build starts OK, will require testing to ensure all functionality is supported.
« Last Edit: December 23, 2016, 04:06:34 am by zoot1612 »

Offline reaper607

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Elk M1 (and M1 M1EZ8) Alarm Panel Plugin
« Reply #509 on: December 24, 2016, 02:14:34 pm »
Thanks for that i will try to do the update and test out some stuff next week. On another note is there a way to get the plugin to scan for new zones and create the devices without removing the app and re-adding it?