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

Add Vedo sensors #42

Closed Vincenzopica closed 5 months ago

Vincenzopica commented 1 year ago

Hello, can you see the status of the alarm zones?

gicamm commented 1 year ago

Hi Vincenzo, the integration already supports zones. The alarm_control_panel entity allows arming/disarming it.

Vincenzopica commented 1 year ago

turn on turn off it does, what I would like to see is the status of the zones, for example, kitchen window open or closed etc etc

gicamm commented 1 year ago

It will come later. There were issues with that, so I disabled this feature.

Vincenzopica commented 1 year ago

thank you very much

MarksLiveMusic commented 1 year ago

Hi and thank you for the integration! It will be incredible to expose Vedo sensors, so we can use motion sensors for lights and other scenarios! I can confirm now that integration works as expected with zones too. I will wait and thank you again.

maurilloh commented 1 year ago

Hi Gicamm,

Any news about?

"turn on turn off it does, what I would like to see is the status of the zones, for example, kitchen window open or closed etc etc"

gicamm commented 1 year ago

Hi, I hope to expose vedo binary sensors asap. However, the main issue will be testing the feature. Before releasing the part, it would be helpful if you could try it with me.

Vincenzopica commented 1 year ago

Hi, I hope to expose vedo binary sensors asap. However, the main issue will be testing the feature. Before releasing the part, it would be helpful if you could try it with me.

Hi, I'd be happy to be a tester

maurilloh commented 1 year ago

Hi, I hope to expose vedo binary sensors asap. However, the main issue will be testing the feature. Before releasing the part, it would be helpful if you could try it with me.

Hi, I'd be happy to be a tester

me too

gicamm commented 1 year ago

I completed the changes. The integration is here

The configuration should be something like below.

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

You need to enable binary sensors (binary_sensors: enable) You can reduce the scan_interval to get new data more frequently. 30 is too much for motion sensors.

You'll see new entities binary_sensor.comelit_vedo_xxx

maurilloh commented 1 year ago

I completed the changes. The integration is here

The configuration should be something like below.

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

You need to enable binary sensors (binary_sensors: enable) You can reduce the scan_interval to get new data more frequently. 30 is too much for motion sensors.

You'll see new entities binary_sensor.comelit_vedo_xxx

Hi Gicamm

I have replace the integration with the new ones and add the binary_sensors line but nothing appear

Vincenzopica commented 1 year ago

Ho completato le modifiche. L'integrazione è qui

La configurazione dovrebbe essere simile alla seguente.

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

È necessario abilitare i sensori binari (binary_sensors: enable) È possibile ridurre scan_interval per ottenere nuovi dati più frequentemente. 30 è troppo per i sensori di movimento.

Vedrai nuove entità binary_sensor.comelit_vedo_xxx

How do I install the new integration?

gicamm commented 1 year ago

You need to put the 'comelit' under the custom_components/ folder. Then you need to update the configuration.yml file.

Ho completato le modifiche. L'integrazione è qui La configurazione dovrebbe essere simile alla seguente.

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

È necessario abilitare i sensori binari (binary_sensors: enable) È possibile ridurre scan_interval per ottenere nuovi dati più frequentemente. 30 è troppo per i sensori di movimento. Vedrai nuove entità binary_sensor.comelit_vedo_xxx

How do I install the new integration?

You need to put the 'comelit' under the custom_components/ folder. Then you need to update the configuration.yml file.

maurilloh commented 1 year ago

You need to put the 'comelit' under the custom_components/ folder. Then you need to update the configuration.yml file.

Ho completato le modifiche. L'integrazione è qui La configurazione dovrebbe essere simile alla seguente.

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

È necessario abilitare i sensori binari (binary_sensors: enable) È possibile ridurre scan_interval per ottenere nuovi dati più frequentemente. 30 è troppo per i sensori di movimento. Vedrai nuove entità binary_sensor.comelit_vedo_xxx

How do I install the new integration?

You need to put the 'comelit' under the custom_components/ folder. Then you need to update the configuration.yml file.

i have done what you wrote but nothing happened

maurilloh commented 1 year ago

I have found this error if it help: Error while setting up comelit platform for binary_sensorTraceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 320, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/comelit/binary_sensor.py", line 13, in async_setup_platform if hass.data[DOMAIN]['hub'] is not None: ~~~~~^^^^^^^ KeyError: 'hub'

Vincenzopica commented 1 year ago

me too nothing

Vincenzopica commented 1 year ago

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: custom_components.comelit.vedo Source: custom_components/comelit/vedo.py:282 Integration: Comelit SimpleHome/Vedo (documentation, issues) First occurred: 21:07:22 (1 occurrences) Last logged: 21:07:22

Error getting data! cookie expired

Vincenzopica commented 1 year ago

Logger: homeassistant.components.binary_sensor Source: custom_components/comelit/binary_sensor.py:13 Integration: Sensore binario (documentation, issues) First occurred: 21:05:21 (1 occurrences) Last logged: 21:05:21

Error while setting up comelit platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/comelit/binary_sensor.py", line 13, in async_setup_platform if hass.data[DOMAIN]['hub'] is not None: KeyError: 'hub'

gicamm commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

Vincenzopica commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

how do i make the changes?

gicamm commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

how do i make the changes?

you need to download the new integration from here

maurilloh commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

Hi Gicamm,

it works for the motion sensors (i see off in the state at the moment) while the door and window sensors do not appear. I have three motion sensors but only two are visibile in the entities list

i don's see any errors in the log

gicamm commented 1 year ago

I cannot test the door sensors, so that it couldn't be supported.

maurilloh commented 1 year ago

I cannot test the door sensors, so that it couldn't be supported.

Ok but you know why only two motion sensors are visibile and not three?

If there is a way to help you to support also the door sensor please let me know, i would glad to help you

gicamm commented 1 year ago

I cannot test the door sensors, so that it couldn't be supported.

Ok but you know why only two motion sensors are visibile and not three?

If there is a way to help you to support also the door sensor please let me know, i would glad to help you

Mmm, strange. Everyone who can contribute is welcome. You can add support to door sensors.

maurilloh commented 1 year ago

I cannot test the door sensors, so that it couldn't be supported.

Ok but you know why only two motion sensors are visibile and not three? If there is a way to help you to support also the door sensor please let me know, i would glad to help you

Mmm, strange. Everyone who can contribute is welcome. You can add support to door sensors.

Hi Gicamm,

no, I'm not able, I was wondering if I could help you implement them but with your help

maurilloh commented 1 year ago

If can help you i found this project:

https://github.com/madchicken/comelit-client

with this command: vedo -h VEDO_IP -p PORT zone --status --desc --code <ARM/DISARM CODE>

i received this:

ecuting zone status call [ { index: 1, description: 'Zona 24H', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 3, description: 'PORTA CUCINA', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 5, description: 'FINESTRA CUCINA', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 7, description: 'P.FIN. SALA', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 9, description: 'PORTONE ING.', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 11, description: 'FIN. SALA', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 13, description: 'BAGNO', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 15, description: 'FIN. GARAGE', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 17, description: 'RIV. GARAGE', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 19, description: 'CAM. LATO ING.', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 21, description: 'BAGNO CAMERA', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 23, description: 'CAM. MATRIM.', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 25, description: 'CAMERA A', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 147, description: 'RIV. GIORNO', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false }, { index: 149, description: 'RIV. NOTTE', open: false, excluded: false, isolated: false, sabotated: false, alarm: false, inhibited: false } ]

maybe you can integrate it in your project for binary sensor.

maurilloh commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

Hi Gicamm,

it works for the motion sensors (i see off in the state at the moment) while the door and window sensors do not appear. I have three motion sensors but only two are visibile in the entities list

i don's see any errors in the log

i am at home now but the motion sensors don't change, they are off all time

Vincenzopica commented 1 year ago

hello, unfortunately I still don't see the binary.sensor

plus i have this error:

This error originated from a custom integration.

Logger: custom_components.comelit.vedo Source: custom_components/comelit/vedo.py:282 Integration: Comelit SimpleHome/Vedo (documentation, issues) First occurred: 17:49:37 (2 occurrences) Last logged: 17:52:11

Error getting data! cookie expired

gicamm commented 1 year ago

You haven't the hub, that explains the issue. I made a change. Please confirm if it works.

Hi Gicamm, it works for the motion sensors (i see off in the state at the moment) while the door and window sensors do not appear. I have three motion sensors but only two are visibile in the entities list i don's see any errors in the log

i am at home now but the motion sensors don't change, they are off all time

Setting the scan_interval to 30s is challenging to catch the change.

Anyway, to be clear. The Vedo API isn't designed for this kind of stuff. The integration needs to be continuously logged in. With the comelit hub, they did a good job since they moved to mqtt. So That's the reason why I did not integrate binary sensors, and maybe it will never be integrated.

gicamm commented 1 year ago

Please update with the latest code. Then change the log levels.

logger:
  default: warn
  logs:
    custom_components.comelit.hub: info
    custom_components.comelit.vedo: debug

I'm running the integration without issues, but maybe something could be different.

Vincenzopica commented 1 year ago

Please update with the latest code. Then change the log levels.

logger:
  default: warn
  logs:
    custom_components.comelit.hub: info
    custom_components.comelit.vedo: debug

I'm running the integration without issues, but maybe something could be different.

registro

piergigi92 commented 1 year ago

Please update with the latest code. Then change the log levels.

logger:
  default: warn
  logs:
    custom_components.comelit.hub: info
    custom_components.comelit.vedo: debug

I'm running the integration without issues, but maybe something could be different.

registro

Vincenzo hai risolto? Neanche io vedo i binary.sensors dopo aver aggiornato l'integrazione e modificato il configuration.yaml

piergigi92 commented 1 year ago

Please update with the latest code. Then change the log levels.

logger:
  default: warn
  logs:
    custom_components.comelit.hub: info
    custom_components.comelit.vedo: debug

I'm running the integration without issues, but maybe something could be different.

registro

Same log...no one binary sensor in my hass entities..

stefanojan commented 1 year ago

Se ti può essere d'aiuto ho notato che con l'app comelit non c'è bisogno di effettuare il login per vedere lo stato dei sensori. Anche io sarei molto interessato e ti nel mio piccolo vorrei darti una mano per rendere possibile l'integrazione di Comelit Vedo su Home Assistant

stefanojan commented 1 year ago

Tramite richieste post ho estrapolato questi codici dai sensori che ho in casa sensore porta finestra 0000 off 0011 on sensore contatto 0000 off 0001 sensore movimento 0000 off 0001 0020 zona Inserita 0100 zona Isolata 0080 zona Eslusa 0200 zona disabilitata vuota

gicamm commented 1 year ago

Tramite richieste post ho estrapolato questi codici dai sensori che ho in casa sensore porta finestra 0000 off 0011 on sensore contatto 0000 off 0001 sensore movimento 0000 off 0001 0020 zona Inserita 0100 zona Isolata 0080 zona Eslusa 0200 zona disabilitata vuota

OK. daro' un'occhiata

stefanojan commented 1 year ago

Tramite richieste post ho estrapolato questi codici dai sensori che ho in casa sensore porta finestra 0000 off 0011 on sensore contatto 0000 off 0001 sensore movimento 0000 off 0001 0020 zona Inserita 0100 zona Isolata 0080 zona Eslusa 0200 zona disabilitata vuota

OK. daro' un'occhiata

Grazie, appena posso testo anche la zona in allarme e sabotata

gicamm commented 5 months ago

Hello everyone, It's been a long time :D. I have just made some changes to the '42-add-vedo-sensors' branch.

You need to enable binary sensors (binary_sensors: enable) The configuration should look something like this

vedo:
  host: X.X.X.X
  port: 80
  password: xxxxxx
  scan_interval: 30
  binary_sensors: enable

You can reduce the scan_interval to get new data more frequently. 30 is too much for motion sensors.

You'll see new entities binary_sensor.comelit_vedo_xxx

Can you help with testing?