DSC Alarm integration

Looks like it to me too. I unarmed my alarm, opened 2 doors and tripped a PIR.

Okay- looks like everything we’ve seen so far is functioning properly! Some of those events I’m purposely not handling, as they are either not displayable in HASS, or they are represented in some other way. If we need to handle more events in the future, we can. But let’s put a stake in the sand.
I’m going to go ahead and make final preparations for the pull request into home-assistant. I’ll let you know when I’ve done that- since my pull request will have sample configuration.yaml entries that, if you want to pre-test the actual hass components, will allow you to do so.

1 Like

That’s great. I’m not sure what you mean by that last line. Pre-test? How can I get my hands on your final version? Thanks for all of your hard work.

I found this topic today and I am happy to help if required.

I downloaded the script and it worked perfectly. I can see the the logs being updated. Great job.

Hi All,

I am the original author of AlarmServer which was linked previously in this thread. I just recently moved and starting to finally get into home automation. I found this project and though I only have it installed right now, I am excited to move forward and configure it.

One thing to think about with the envisalink module is that it only allows one connection to the event interface. This is one of the reasons I implemented a envisalink proxy in the code I wrote, which I recently rewrote on top of python tornado actually (personal motivation for that was my house was up for sale, I have 2 cats, and I wanted to know when potential buyers entered and left my house so I could return with the cats if they left before their hour was up!).

In any case, I moved, and I brought my envisalink along with me, so if I can be of any help, let me know. It might be a fun project to rewrite AlarmServer on top of pyenvisalink.

Welcome!! I look forward to working together on this- I’ve had a very good experience working on the homeassistant project. I would definitely welcome any help enhancing the pyenvisalink library, as I own a honeywell panel- so the DSC part of it required some help from the folks on this thread. Right now I know there’s parts of the DSC API that could be implemented that currently are not- but it’s enough to drive home-assistant. I probably should have gotten in touch with you prior to starting…didn’t mean to step on your toes!

Here’s where we’re at presently:

  • the pyenvisalink library, version 0.9, has gone through testing with both DSC and Honeywell panels. More enhancements can always be made, but I figured it was time to draw the line, and make a release.

-The envisalink components for home-assistant are in the middle of Paulus’ code review- it’s going very well- he had a few minor adjustments to make in relation to validation- but I do expect my components to make it in the next release of HA.

Here’s a link to the pull request if anyone wants to look (it also has example configuration.yaml)

So until that’s merged into the mainline, one relatively easy way to test the homeassistant components is to create a custom_components folder within your .homeassistant folder, and copy my python code into there.

In .homeassistant/custom_components, put this file:
https://github.com/Cinntax/home-assistant/tree/evl3/homeassistant/components/envisalink.py

In .homeassistant/custom_components/sensor, put this file:
https://github.com/Cinntax/home-assistant/tree/evl3/homeassistant/components/sensor/envisalink.py

In .homeassistant/custom_components/binary_sensor, put this file:
https://github.com/Cinntax/home-assistant/tree/evl3/homeassistant/components/binary_sensor/envisalink.py

In .homeassistant/custom_components/alarm_control_panel, put this file:
https://github.com/Cinntax/home-assistant/tree/evl3/homeassistant/components/alarm_control_panel/envisalink.py

2 Likes

Awesome Thanks. I tried testing in HA. I have a DSC and EVL-3 . I got the following errors. Could you help?

16-06-19 16:10:03 homeassistant.loader: Error loading custom_components.sensor.envisalink. Make sure all dependencies are installed Traceback (most recent call last): File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/loader.py", line 119, in get_component module = importlib.import_module(path) File "/srv/hass/hass_venv/lib/python3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 2254, in _gcd_import File "<frozen importlib._bootstrap>", line 2237, in _find_and_load File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked File "<frozen importlib._bootstrap>", line 1129, in _exec File "<frozen importlib._bootstrap>", line 1471, in exec_module File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed File "/home/hass/.homeassistant/custom_components/sensor/envisalink.py", line 9, in <module> from homeassistant.components.envisalink import (EVL_CONTROLLER, ImportError: No module named 'homeassistant.components.envisalink' 16-06-19 16:10:03 homeassistant.loader: Error loading custom_components.alarm_control_panel.envisalink. Make sure all dependencies are installed Traceback (most recent call last): File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/loader.py", line 119, in get_component module = importlib.import_module(path) File "/srv/hass/hass_venv/lib/python3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 2254, in _gcd_import File "<frozen importlib._bootstrap>", line 2237, in _find_and_load File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked File "<frozen importlib._bootstrap>", line 1129, in _exec File "<frozen importlib._bootstrap>", line 1471, in exec_module File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed File "/home/hass/.homeassistant/custom_components/alarm_control_panel/envisalink.py", line 10, in <module> from homeassistant.components.envisalink import (EVL_CONTROLLER, ImportError: No module named 'homeassistant.components.envisalink' 16-06-19 16:10:03 homeassistant.loader: Unable to find component sensor.envisalink 16-06-19 16:10:03 homeassistant.bootstrap: Unable to find platform sensor.envisalink 16-06-19 16:10:03 homeassistant.loader: Unable to find component alarm_control_panel.envisalink 16-06-19 16:10:03 homeassistant.bootstrap: Unable to find platform alarm_control_panel.envisalink 16-06-19 16:10:03 homeassistant.loader: Error loading custom_components.binary_sensor.envisalink. Make sure all dependencies are installed Traceback (most recent call last): File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/loader.py", line 119, in get_component module = importlib.import_module(path) File "/srv/hass/hass_venv/lib/python3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 2254, in _gcd_import File "<frozen importlib._bootstrap>", line 2237, in _find_and_load File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked File "<frozen importlib._bootstrap>", line 1129, in _exec File "<frozen importlib._bootstrap>", line 1471, in exec_module File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed File "/home/hass/.homeassistant/custom_components/binary_sensor/envisalink.py", line 10, in <module> from homeassistant.components.envisalink import (EVL_CONTROLLER, ImportError: No module named 'homeassistant.components.envisalink' 16-06-19 16:10:03 homeassistant.loader: Unable to find component binary_sensor.envisalink 16-06-19 16:10:03 homeassistant.bootstrap: Unable to find platform binary_sensor.envisalink 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 673, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 673, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 673, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:03 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:03 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 841, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command. 16-06-19 16:10:04 pyenvisalink.dsc_client: No handler defined in config for 510, skipping... 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No handler configured for evl command. 16-06-19 16:10:04 pyenvisalink.envisalink_base_client: No callback configured for evl command.

Hmm… from the snippet you provided, it looks as though you forgot to put the “sensor” file in… .homeassistant/sensor/envisalink.py- is that there too? There should be 4 files in total.

Thanks for the quick reply. I did put it in custom_components. I redownloaded as well. Here are the file sizes as well for references

`hass@raspberrypi:~/.homeassistant/custom_components$ find -H ./ -name envisalink.py | xargs ls -ltra
-rw-r–r-- 1 hass hass 2509 Jun 19 11:49 ./sensor/envisalink.py
-rw-r–r-- 1 hass hass 2724 Jun 19 11:49 ./binary_sensor/envisalink.py
-rw-r–r-- 1 hass hass 7510 Jun 19 11:50 ./envisalink.py
-rw-r–r-- 1 hass hass 4118 Jun 19 11:50 ./alarm_control_panel/envisalink.py

I thought maybe pyenvisalink was interfering (random guess), so I uninstalled that with pip3 uninstall pyenvisalink. Still the same error

From my install. I added the custom_components from git and this is what I get in the log:

n 19 13:08:54 raspberrypi hass[6080]: INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink… at 192.168.15.25:4025
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:pyenvisalink.envisalink_base_client:Connection Successful!
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Established a connection with the envisalink.
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:08:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:The envisalink sent a partition update event.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.dsc_client:No handler defined in config for 673, skipping…
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No handler configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No callback configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.dsc_client:No handler defined in config for 841, skipping…
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No handler configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No callback configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.dsc_client:No handler defined in config for 841, skipping…
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No handler configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No callback configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.dsc_client:No handler defined in config for 510, skipping…
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No handler configured for evl command.
Jun 19 13:08:55 raspberrypi hass[6080]: WARNING:pyenvisalink.envisalink_base_client:No callback configured for evl command.
Jun 19 13:08:56 raspberrypi hass[6080]: INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=load_platform.alarm_control_panel, discovered=code=XXXX, partitions=1=name=Home Alarm, load_platform=envisalink>
Jun 19 13:08:56 raspberrypi hass[6080]: INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=load_platform.sensor, discovered=code=XXXX, partitions=1=name=Home Alarm, load_platform=envisalink>
Jun 19 13:08:56 raspberrypi hass[6080]: INFO:homeassistant.core:Bus:Handling <Event platform_discovered[L]: service=load_platform.binary_sensor, discovered=load_platform=envisalink, zones=1=name=Front Door, type=opening, 2=name=Side Door, type=opening, 3=name=Living Room Motion, type=motion, 4=name=Dining Room Motion, type=motion>
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Error loading custom_components.alarm_control_panel.envisalink. Make sure all dependencies are installed
Jun 19 13:08:56 raspberrypi hass[6080]: File “/home/hass/custom_components/alarm_control_panel/envisalink.py”, line 9, in
Jun 19 13:08:56 raspberrypi hass[6080]: from homeassistant.components.envisalink import (EVL_CONTROLLER,
Jun 19 13:08:56 raspberrypi hass[6080]: ImportError: No module named ‘homeassistant.components.envisalink’
Jun 19 13:08:56 raspberrypi hass[6080]: INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=envisalink>
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Error loading custom_components.sensor.envisalink. Make sure all dependencies are installed
Jun 19 13:08:56 raspberrypi hass[6080]: File “/home/hass/custom_components/sensor/envisalink.py”, line 8, in
Jun 19 13:08:56 raspberrypi hass[6080]: from homeassistant.components.envisalink import (EVL_CONTROLLER,
Jun 19 13:08:56 raspberrypi hass[6080]: ImportError: No module named ‘homeassistant.components.envisalink’
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Error loading custom_components.binary_sensor.envisalink. Make sure all dependencies are installed
Jun 19 13:08:56 raspberrypi hass[6080]: File “/home/hass/custom_components/binary_sensor/envisalink.py”, line 9, in
Jun 19 13:08:56 raspberrypi hass[6080]: from homeassistant.components.envisalink import (EVL_CONTROLLER,
Jun 19 13:08:56 raspberrypi hass[6080]: ImportError: No module named ‘homeassistant.components.envisalink’
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Unable to find component alarm_control_panel.envisalink
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Unable to find component sensor.envisalink
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.loader:Unable to find component binary_sensor.envisalink
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.bootstrap:Unable to find platform binary_sensor.envisalink
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.bootstrap:Unable to find platform alarm_control_panel.envisalink
Jun 19 13:08:56 raspberrypi hass[6080]: ERROR:homeassistant.bootstrap:Unable to find platform sensor.envisalink
Jun 19 13:09:25 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:09:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:10:25 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:10:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:11:25 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:11:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:12:25 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:12:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:13:25 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…
Jun 19 13:13:55 raspberrypi hass[6080]: INFO:custom_components.envisalink:Envisalink sent a zone update event. Updating zones…

Ok- sorry folks. Looking closer, it looks like the custom component idea won’t work. The problem is that the sensor/alarm/binary components are looking in the main location, and not the custom one. I just got my code committed to the dev branch of ha, so now your best bet would be to pull that down into a venv and run it.

1 Like

I downloaded the dev branch. It seems to connect and then immediately says server disconnected. The TPI on EVL-3 page says shows that my RPi is connected.

INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink... at 192.168.100.106:4025 INFO:pyenvisalink.envisalink_base_client:Connection Successful! ERROR:pyenvisalink.envisalink_base_client:The server closed the connection. Reconnecting... INFO:homeassistant.components.http:192.168.100.138 - - [19/Jun/2016 22:46:54] "GET /api/error_log HTTP/1.1" 200 1539 0.006168 INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink... at 192.168.100.106:4025 INFO:pyenvisalink.envisalink_base_client:Connection Successful! ERROR:pyenvisalink.envisalink_base_client:The server closed the connection. Reconnecting... INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink... at 192.168.100.106:4025 INFO:pyenvisalink.envisalink_base_client:Connection Successful! ERROR:pyenvisalink.envisalink_base_client:The server closed the connection. Reconnecting... INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink... at 192.168.100.106:4025 INFO:pyenvisalink.envisalink_base_client:Connection Successful! ERROR:pyenvisalink.envisalink_base_client:The server closed the connection. Reconnecting... INFO:homeassistant.components.http:192.168.100.138 - - [19/Jun/2016 22:47:14] "GET /api/error_log HTTP/1.1" 200 1854 0.004244 INFO:pyenvisalink.envisalink_base_client:Started to connect to Envisalink... at 192.168.100.106:4025 INFO:pyenvisalink.envisalink_base_client:Connection Successful! ERROR:pyenvisalink.envisalink_base_client:The server closed the connection. Reconnecting... INFO:homeassistant.components.http:192.168.100.138 - - [19/Jun/2016 22:47:15] "GET /api/error_log HTTP/1.1" 200 1959 0.004198

Oh weird- did you delete the files in the custom components? I just wonder if we have 2 concurrent threads conflicting.

Yep. That was the reason. I deleted custom_components and it is now working. Will continue to work and let you know.

Edit

I explored it a bit further. The status changes are all shown properly. However, I am unable to arm the Alarm. Here’s what I get when I try to Arm Home or Away mode.

16-06-21 16:43:22 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 16:43:22 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 16:43:22 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 16:43:26 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 16:43:26 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 16:43:26 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 16:43:29 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 16:43:29 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 16:43:29 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 16:43:29 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 16:43:29 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 16:43:29 pyenvisalink.envisalink_base_client: No callback configured for evl command.

16-06-21 16:43:33 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 16:43:33 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 16:43:33 pyenvisalink.envisalink_base_client: No callback configured for evl command.

Shoot- i think i see what’s going on here- 502 is a general system error- in this case i’m pretty sure it’s a buffer overflow.

When arming/disarming- i’m always sending arm_command (030/031/032/040) + partitionnumber + code.
The problem is that, for ARMING the alarm, the code is not required. For DISARMING, it is.

To prove my theory, can you please manually arm your alarm? You should be able to use HA to disarm it.

If my theory is correct, i can make the small adjustment in pyenvisalink and deploy version 1.0. I can ask Paulus what that means in terms of the current Homeassistant release too.

You’re right. I was able to disarm. If I used “Stay Arm”, it did not recognize that, however, Away Arm did work and Home assistant updated the status to “Armed”.

Now, I could disarm and when I used the code, it worked.

Here’s the log if it helps.

hass@raspberrypi:~/.homeassistant$ tail -f home-assistant.log
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:37:42 pyenvisalink.dsc_client: No handler defined in config for 841, skipping…
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:37:42 pyenvisalink.dsc_client: No handler defined in config for 841, skipping…
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:37:42 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:37:42 pyenvisalink.envisalink_base_client: No callback configured for evl command.

16-06-21 18:39:35 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:39:35 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:39:35 pyenvisalink.envisalink_base_client: No callback configured for evl command.

16-06-21 18:41:05 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:41:05 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:05 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:05 pyenvisalink.dsc_client: No handler defined in config for 701, skipping…
16-06-21 18:41:05 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:05 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:06 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:41:06 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:06 pyenvisalink.envisalink_base_client: No callback configured for evl command.

16-06-21 18:41:51 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:51 pyenvisalink.dsc_client: No handler defined in config for 673, skipping…
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:51 pyenvisalink.dsc_client: No handler defined in config for 673, skipping…
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:51 pyenvisalink.dsc_client: No handler defined in config for 673, skipping…
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:41:51 pyenvisalink.dsc_client: No handler defined in config for 673, skipping…
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:41:51 pyenvisalink.envisalink_base_client: No callback configured for evl command.

16-06-21 18:42:05 pyenvisalink.dsc_client: No handler defined in config for 510, skipping…
16-06-21 18:42:05 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:05 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:05 pyenvisalink.dsc_client: No handler defined in config for 750, skipping…
16-06-21 18:42:05 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:05 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:17 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:17 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:17 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:17 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:17 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:17 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:19 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:19 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:19 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:20 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:20 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:20 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:20 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:23 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:23 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:23 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:23 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:24 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:24 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:24 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:24 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:24 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:24 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:25 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:25 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:25 pyenvisalink.envisalink_base_client: No callback configured for evl command.
16-06-21 18:42:25 pyenvisalink.dsc_client: No handler defined in config for 502, skipping…
16-06-21 18:42:25 pyenvisalink.envisalink_base_client: No handler configured for evl command.
16-06-21 18:42:25 pyenvisalink.envisalink_base_client: No callback configured for evl command.

Looking at it further, the Home Assistant status does not get updated. Here’s the Summary

  1. Arming via HASS does not work.

  2. “Away Arm” and “Stay Arm” via HASS does work. It does not show the Delay time between Arm and Active. However, it immediately switches to “Armed” in HASS

  3. If I disarm from HASS, my control panel, EVL-3 and EYEZ-ON does show that it is no longer armed, but HASS still shows it as “Armed”

  4. If I reboot HASS, it shows the status correctly. Looks like once it is disarmed, the status is not updated at HASS.

Let me know if you need me to do any further tests

For #1, that’s definitely an easy fix that I mentioned earlier.
2- that may be a minor misinterpretation of the alarm state- because I believe we are handling those events. I’m marking that as a bit lower priority.
3- I need to handle event 750.

I’ll get some updates to the library as soon as possible.

You’re right. For #2 - You need to handle 701, but agree it’s not a priority

For #3, 750 would be sufficient for most use cases, but 751 is what’s sent if I use my keyfob.

Thanks for this though, it’s been pretty useful already

Okay, so i’ve done the following in pyenvisalink and committed into a bugfix branch:

  1. Fixed the issue with arming- at least i believe so
  2. Handling events 701, 750, 751 to help with the partition not getting updated.

Before we do a real release here, would you mind just overwriting these 2 files within your vdev (that will be a quick way to test this in HASS)?

They’ll be somewhere in /srv/hass/hass_venv/lib/python3.4/site-packages/pyenvisalink on your machine.
dsc_envisalinkdefs.py and dsc_client.py

https://github.com/Cinntax/pyenvisalink/blob/dsc_bugfix/pyenvisalink/dsc_envisalinkdefs.py
https://github.com/Cinntax/pyenvisalink/blob/dsc_bugfix/pyenvisalink/dsc_client.py