Jump to content


Photo

[How-To] Control an Elk M1 via External Perl Scripting


  • Please log in to reply
86 replies to this topic

#76 klemmer

klemmer

    Newbie

  • Registered
  • Pip
  • 5 posts

Posted 24 September 2015 - 12:18 PM

crossbar - I am not really sure how to reach out to you privately on this board but I am very interested in the work you are doing with the Elk M1 - would you be able to fork the ElkM1::Control project here: https://github.com/t.../elkm1--control and post your updates?  If not, please let me know and we can speak privately.  Thanks so much for your efforts with this!



#77 crossbar

crossbar

    Cocooner

  • Registered
  • PipPip
  • 47 posts

Posted 24 September 2015 - 07:47 PM

For some reason I can't message you on here.  You can try to message me.

 

Update: I forked the main tree and applied my updates. I put in a pull request.  I think you should be able to see the fork from the main tree if not I can post a link to my fork.


Edited by crossbar, 25 September 2015 - 09:09 AM.


#78 klemmer

klemmer

    Newbie

  • Registered
  • Pip
  • 5 posts

Posted 25 September 2015 - 08:06 AM

Thanks so much crossbar!  Would you be able to reach out to me directly at "my username on this forum AT comcast dot net"?  I can try to do my best to help you along with the process!  Thanks again for your time!



#79 crossbar

crossbar

    Cocooner

  • Registered
  • PipPip
  • 47 posts

Posted 25 September 2015 - 12:14 PM

M1- bug:

klemmer just pointed out to me that the Arm Status Messages from the M1 are causing the ElkM1::Connect to fail:

invalid message: 1EAS10000000611111110000000000FA at /usr/local/share/perl5/ElkM1/Control/MessageFactory.pm line 73

 

This message from the M1 actually has a bad check sum and if you look at the raw output from the M1 you will see the identical message from the M1 with the correct check sum:

1EAS1000000061111111000000000008

 

So why is the M1 sending messages with bad checksums on certain occasions?  This is repeatable.   This is with firmware 5.3.0  I have not tried 5.3.8 yet.

 

I guess I will update the ElkM1::Connect to just ignore bad messages from the M1.

 

I am curious to know if this is unique to firmware 5.3.0 or not.  I assume someone in the past would have run into this using the ElkM1::Connect if this was a bug in previous M1 firmware.



#80 klemmer

klemmer

    Newbie

  • Registered
  • Pip
  • 5 posts

Posted 25 September 2015 - 06:48 PM

I believe I might not be the first to discover that the arm method is not working.... I plan to upgrade to 5.3.8 in the next week or so and I will report back if that fixes it.



#81 crossbar

crossbar

    Cocooner

  • Registered
  • PipPip
  • 47 posts

Posted 27 September 2015 - 06:57 PM

The updates I mentioned previously in this thread have been pulled into the GitHub repository (as linked above) ver 0.1.1 .   I updated the code to not terminate upon receiving a malformed message and just warn and ignore it.   This change will be included in the next revision I submit on GitHub.  If there are other issues or missing features I can address with the next update let me know.



#82 Jeffreydof

Jeffreydof

    Newbie

  • New Member
  • Pip
  • 2 posts

Posted 26 March 2017 - 01:01 PM

So far, my experience with their support is awful. Been waiting a full day to get my IP address changed with them. Ive got 5 emails sent, a support ticket on high priority, what else do I need to do? This is ridiculous.

#83 gasbie

gasbie

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 190 posts

Posted 08 April 2017 - 07:09 AM

Any one still using this Perl API? What 3rd party automation system do you use to interact with the ELK M1 via this API?



#84 darryl

darryl

    Cocooner

  • Registered
  • PipPip
  • 77 posts

Posted 08 April 2017 - 10:04 AM

I use javascript and have it feed homeassistant via mqtt Sent from my Pixel XL using Tapatalk

#85 klemmer

klemmer

    Newbie

  • Registered
  • Pip
  • 5 posts

Posted 08 April 2017 - 12:44 PM

I still use the old elkm1::control.... I took bits and pieces of what some others have done and wrote as much of a log parser as I could.  I log all of the elks output to a daily rotating log file.  I use a separate self-written monitoring program to read each new line of the log and look for certain key words which then trigger other events in the house, using other custom commands/programs... For example, if the the alarm is set and is violated, it triggers my foscam cameras to take snapshots and text message them and also flashes all of my hue and lutron lighting.



#86 gasbie

gasbie

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 190 posts

Posted 08 April 2017 - 02:45 PM

I still use the old elkm1::control.... I took bits and pieces of what some others have done and wrote as much of a log parser as I could.  I log all of the elks output to a daily rotating log file.  I use a separate self-written monitoring program to read each new line of the log and look for certain key words which then trigger other events in the house, using other custom commands/programs... For example, if the the alarm is set and is violated, it triggers my foscam cameras to take snapshots and text message them and also flashes all of my hue and lutron lighting.

 

Hello Klemmer,

so you installed the elkm1::control on a pc and your hardware such as security cameras, motion sensor communicate with elk m1 via the API? Could you pm a copy of the update script? I have been working relentlessly trying to figure out how this work. thanks



#87 klemmer

klemmer

    Newbie

  • Registered
  • Pip
  • 5 posts

Posted 08 April 2017 - 03:04 PM

Hello Klemmer,

so you installed the elkm1::control on a pc and your hardware such as security cameras, motion sensor communicate with elk m1 via the API? Could you pm a copy of the update script? I have been working relentlessly trying to figure out how this work. thanks

I wouldnt exactly call this "communicating with the elk m1 via the API"... this is a one way "communication" - I am reading the elks output, parsing it with help from elkm1::control and then launching other programs based on the elk's output.  However, it is somewhat possible to issue commands back to the elk using the elkm1::control but this gets a bit advanced to do.  I have been able to use this to disarm the system and if you look at the giant pdf document that elk has released, it explains some of the things that are "possible" but I would say you should be fairly comfortable with perl if you are going to go down this road (using elkm1::control).  I use a raspberry pi (debian linux) and a bunch of perl/python/bash scripts to do what I need to do.

 

Which script are you looking for? Do you want to read the output from the elk?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users