Page 2 of 2

Re: Controlling Envisalink with Siri

Posted: Fri Jan 01, 2016 1:37 am
by Buddy
Hello mklips0, tecuonline and everyone!

I was very intrigued by the thought of controlling my Envisalink 4 (the newest model) connected to my Ademco 20P with the Homebridge and Envisakit scripts. I carefully followed all directions on a new Rasbberry Pi 2, and installed everything. I tried using both the Elgato Eve and iDevices apps.

Homebridge starts up fine, and then listens for commands from Eve. When I start up the Eve app, and navigate to my Envisakit accessory, the following error message repeats several times on the Pi when homebridge attempts to find the current status of the alarm:

[Envisakit] Getting current state via command: undefined status -j
[Envisakit] Envisakit command failed (127), errors = /bin/sh: 1: undefined: not found

The Eve app says the alarm state is Stay Arm (incorrect), and when I go to try and change it to disarm, Homebridge attempts to disarm it with the correct pin code like this (pin changed to XXXX for privacy):

[Envisakit] Attempting to set alarm state to: disarm, via command: undefined disarm -p XXXX (alarm pin deleted for privacy)
[Envisakit] Error - could not set alarm state, error = 127

Interestingly, when I go to a regular Terminal command line and try to access Envisakit, I can access the Envisakit module just fine:

pi@raspberrypi ~/.homebridge $ /home/pi/envisakit/envisakit-cli status
Connecting to 10.0.XX.XXX:4025 (IP chunks deleted for privacy)
Connected
Update: ****DISARMED**** Ready to Arm
Ready
AC Present

---------------------------------

Here is the configuration file (config.json) for Homebridge:

{
"bridge": {
"name": "Homebridge-01",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"accessories": [
{
"accessory": "Envisakit",
"name": "Envisakit",
"cmd": "/home/pi/envisakit/envisakit-cli",
"pin": "XXXX", (deleted for privacy)
"periodic_update": false,
"cache_timeout": 15,
"args": "",
"bypass_zone": "13",
"show_alarm_detected": true,
"show_chime": true,
"show_battery_level": true
}
]
}

---------------------------------

So to summarize, Homebridge starts up fine and waits for commands from a Homebridge app (i.e. Elgato Eve or iDevice). Envisakit can operate the alarm just fine from the Pi terminal command line when I enter the Envisakit commands manually. However, those two can't talk to each other without the errors listed above (error 127). Just to be safe, I wiped the Raspberry's drive, reinstalled everything, and followed all installation directions carefully. Exact same errors again.

Any ideas mklips0, or the other great folks here?

Re: Controlling Envisalink with Siri

Posted: Sat Jan 02, 2016 4:07 pm
by Buddy
Hi All,

I received a correction from the author mklips0 over at Github on how to fix my issue, and probably those of tecuonline as well. Here's his response:

"Hi there. Based on your description, it seems like everything is installed correctly, but there's an error in the setup guide. In your config, try changing the line "cmd": "/home/pi/envisakit/envisakit-cli", to "envisakit-path": "/home/pi/envisakit/envisakit-cli",. Then just restart homebridge - this should solve the issue.

My apologies about the error, it's called "cmd" in the code so it was an oversight in the example config. I'll adjust the readme shortly.

Hope this helps!"

So, changing "cmd" to "envisakit-path" in the config.json configuration file solved the problem for me. A little bit of a lag, and Siri doesn't always get a timely response back from the Homebridge server, but it seems to work really well otherwise! Plus, being able to arm/disarm the alarm using Siri on my Apple Watch is so Jetsons like!!!!! (Even my wife is impressed - wow!)

Re: Controlling Envisalink with Siri

Posted: Sun Jan 17, 2016 12:19 pm
by aggiepilot04
In case anyone is using a DSC panel, I wrote a homebridge plugin that wraps NodeAlarmProxy, and my DSC panel is now HomeKit/Siri enabled. My original intent was to contribute to mklips0's plugin, but the implementation details (and capabilities) are very different and panel-specific (CLI vs NodeAlarmProxy, etc).

https://www.npmjs.com/package/homebridge-envisalink

I am new to Node, so I'm sure there are better ways of doing this. Feedback is welcome. Thanks.

Re: Controlling Envisalink with Siri

Posted: Sun Jan 17, 2016 11:22 pm
by skywise
I tried adding your add-on with:
npm i homebridge-envisalink
and that seemed to work:
root@homebridge:~# npm i homebridge-envisalink
homebridge-envisalink@0.1.2 node_modules/homebridge-envisalink
├── net@1.0.2
├── nodealarmproxy@0.7.2
└── dateformat@1.0.12 (get-stdin@4.0.1, meow@3.7.0)

But when I try to run home bridge after adding the config:
/usr/lib/node_modules/homebridge/lib/api.js:88
throw new Error("The requested platform '" + name + "' was not registere
^
Error: The requested platform 'Envisalink' was not registered by any plugin.
---
Any ideas?

Re: Controlling Envisalink with Siri

Posted: Mon Jan 18, 2016 10:41 am
by Cobra
Good job, I have one working here as well, but it needs some additional work.

Did you notice that NodeAlarmProxy seems to die within about 24hrs? It seems to be missing a keepalive or retry on the DSC connection. I have not fixed that yet. If you get in touch with the NodeAlarmProxy author maybe he can comment.

Re: Controlling Envisalink with Siri

Posted: Fri Nov 18, 2016 7:28 pm
by erfinb
I seem to be having a hard time getting the config file correctly formatted. Any assistance would be awesome :D