gicamm / homeassistant-comelit

With Comelit Hub/Vedo integration, you can connect your Home Assistant instance to Comelit Simple Home and Vedo systems.
Apache License 2.0
23 stars 7 forks source link

Binary sensors not visible #94

Open fvanlaere opened 2 months ago

fvanlaere commented 2 months ago

I have a vedo only installation (v2.7.3). The integration to control the alarm is working fine (thanks so much!), however with the new release I enabled the binary sensors but they're not exposed in home assistant.

configuration.yaml:

comelit: vedo: host: 192.168.129.230 port: 6082 password: ****** scan_interval: 30 binary_sensors: enable

I noticed in a different issue that you mentioned that the port should be 80, but it seems like my comelit installation is setup on port 6082. When I go to http://192.168.129.230 then I get no web page, but when I go to http://192.168.129.230:6082 then I do get a webpage (where I need to fill out my password).

As you can see there are no sensors here, and neither can I find the sensors when I manually added them in automations starting with "binary_sensor." followed by the names of the zones in comelit. I can't find any errors in the logs (attached).

image home-assistant_2024-08-14T10-42-25.127Z.log

gicamm commented 2 months ago

We are having some problems with the binary sensors, they are working on some systems but not on others. So better debugging of this feature is needed. Do you think you can help with that?

fvanlaere commented 2 months ago

@gicamm I can help you with enabling debugging. I can program, but I have 0 experience in writing code for HA. How do I enable the detailed debugging? I thought I found it somewhere here, but I can't find it anymore.

gicamm commented 1 month ago

@gicamm I can help you with enabling debugging. I can program, but I have 0 experience in writing code for HA. How do I enable the detailed debugging? I thought I found it somewhere here, but I can't find it anymore.

Do not worry about HA. It's just Python :D. We expose sensors in this piece of code. Look at line 153. Perhaps, as has happened, the VEDO IP returns data in a different format.

fvanlaere commented 1 month ago

@gicamm I enabled the debugging: logger: default: warn logs: custom_components.comelit.hub: info custom_components.comelit.vedo: debug

However, I don't see any debug line from the SensorUpdater class in the logs (such as "Comelit Vedo status snapshot started"). All I see is this:

2024-09-22 20:25:37.175 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration comelit which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-22 20:25:47.042 INFO (SyncWorker_3) [custom_components.comelit.vedo] Initialising ComelitVedo with host 192.168.129.230, port 6082 2024-09-22 20:25:47.060 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'comelit' accesses hass.helpers.discovery. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from discovery directly at custom_components/comelit/__init__.py, line 82: hass.helpers.discovery.load_platform('binary_sensor', DOMAIN, {}, config), please report it to the author of the 'comelit' custom integration 2024-09-22 20:25:47.060 DEBUG (Thread#BS) [custom_components.comelit.vedo] Comelit Vedo status snapshot started 2024-09-22 20:25:47.205 DEBUG (Thread#BS) [custom_components.comelit.vedo] Logged in, 2024-09-22 20:25:47.702 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': 'Woning', 'id': 0, 'p1_pres': 1, 'p2_pres': 0, 'ready': 5, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.703 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area Woning comelit_vedo_woning 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 1, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 2, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 3, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 4, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 5, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 6, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 7, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.718 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_

When I look in the comelit vedo control panel (on my ip address) on the status of the zones page, I see that this is the result of the zone_stat.json file: { "logged": 1, "rt_stat": 9, "vedo_auth": [ 0, 1 ], "life": 1, "status": "0020,0200,0020,0200,0000,0200,0020,0200,0000,0200,0011,0200,0020,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200" }

One window was open, so I think this is the 0011 entry?

27andrea commented 1 month ago

Stesso problema anche da me.rileva solo i radar,però danno sempre come risultato assente. Da.json invece gli stati sono valorizzati correttamente

gicamm commented 1 month ago

@gicamm I enabled the debugging: logger: default: warn logs: custom_components.comelit.hub: info custom_components.comelit.vedo: debug

However, I don't see any debug line from the SensorUpdater class in the logs (such as "Comelit Vedo status snapshot started"). All I see is this:

2024-09-22 20:25:37.175 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration comelit which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-22 20:25:47.042 INFO (SyncWorker_3) [custom_components.comelit.vedo] Initialising ComelitVedo with host 192.168.129.230, port 6082 2024-09-22 20:25:47.060 WARNING (SyncWorker_3) [homeassistant.helpers.frame] Detected that custom integration 'comelit' accesses hass.helpers.discovery. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from discovery directly at custom_components/comelit/__init__.py, line 82: hass.helpers.discovery.load_platform('binary_sensor', DOMAIN, {}, config), please report it to the author of the 'comelit' custom integration 2024-09-22 20:25:47.060 DEBUG (Thread#BS) [custom_components.comelit.vedo] Comelit Vedo status snapshot started 2024-09-22 20:25:47.205 DEBUG (Thread#BS) [custom_components.comelit.vedo] Logged in, 2024-09-22 20:25:47.702 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': 'Woning', 'id': 0, 'p1_pres': 1, 'p2_pres': 0, 'ready': 5, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.703 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area Woning comelit_vedo_woning 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 1, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 2, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 3, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.705 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.705 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 4, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 5, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 6, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.706 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_ 2024-09-22 20:25:47.706 DEBUG (Thread#BS) [custom_components.comelit.vedo] Updating the alarm area {'name': '', 'id': 7, 'p1_pres': 0, 'p2_pres': 0, 'ready': 0, 'armed': 0, 'alarm': 0, 'alarm_memory': 0, 'sabotage': 0, 'anomaly': 0, 'in_time': 0, 'out_time': 0} 2024-09-22 20:25:47.718 INFO (Thread#BS) [custom_components.comelit.vedo] added the alarm area comelit_vedo_

When I look in the comelit vedo control panel (on my ip address) on the status of the zones page, I see that this is the result of the zone_stat.json file: { "logged": 1, "rt_stat": 9, "vedo_auth": [ 0, 1 ], "life": 1, "status": "0020,0200,0020,0200,0000,0200,0020,0200,0000,0200,0011,0200,0020,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0000,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200" }

One window was open, so I think this is the 0011 entry?

Yes, it should be. Basically, integration assigns this status to the sensors. The Vedo IP returns data in arrays, so you need to assign it by respecting the correct position.