tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

tydom2mqtt 2.4.0 values in HA not updated

Open dbouchabou opened this issue 3 years ago • 12 comments

EN:

Hello,

I have a small problem with the add-on. My devices are correctly recognized, and the values seem to be correctly read in the logs. However, my devices in Home Assistant are not updated; they have as state value "unknow".

Can you help me?

FR:

Bonjour,

J'ai un petit problème avec l'addon. Mes équipement Delta Dore sont correctement reconnus, et les valeurs semblent être correctement lues dans le journal de l'add-on. Cependant, mes appareils dans Home Assistant ne sont pas mis à jour et ont pour valeur d'etat "inconnue"

Pouvez-vous m'aider ?

dbouchabou avatar Sep 26 '22 17:09 dbouchabou

EN:

I wonder if the problem does not come from the fact that I use mosquitto as a broker mqtt

FR: Je me demande si le problème ne viens pas du fait que j'utilise mosquitto comme broker mqtt

dbouchabou avatar Sep 26 '22 18:09 dbouchabou

Hi,

Mosquito is the most popular mqtt broker (if not the only mqtt broker). Almost 100% of the users are using it. Just to say that your setup is not uncommon 😉

However, mosquito can be configured in different manners ; have you tuned its configuration in a way that could explain why the changes are not propagated to HA?

fmartinou avatar Sep 26 '22 19:09 fmartinou

Hi, I have the same problem: light state stays in "unknown" status. If I use the physical switch to control lights, state does not change. It does update if I control from Home Assistant.

On the other hand, the Kline Windows DVI (lock/unlocked sensor) does work very well. When I open a window, the state is updated correctly.

This is the add-on log at startup. There are no add-on logs when I switch the light on/off.

2022-09-26 21:29:59,078 - sensors - INFO - Sensor created / updated : device_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,090 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,100 - sensors - INFO - Sensor created / updated : id_tydom__Lampadaire_salon 1614713144_1614713144
2022-09-26 21:29:59,112 - sensors - INFO - Binary sensor created / updated : thermicDefect_tydom__Lampadaire_salon False
2022-09-26 21:29:59,122 - sensors - INFO - Sensor created / updated : level_tydom__Lampadaire_salon 100
2022-09-26 21:29:59,135 - sensors - INFO - Binary sensor created / updated : onFavPos_tydom__Lampadaire_salon False
2022-09-26 21:29:59,144 - light - INFO - light created / updated : Lampadaire salon 1614713144_1614713144 100

jerry34ha avatar Sep 27 '22 18:09 jerry34ha

Hi,

Mosquito is the most popular mqtt broker (if not the only mqtt broker). Almost 100% of the users are using it. Just to say that your setup is not uncommon 😉

However, mosquito can be configured in different manners ; have you tuned its configuration in a way that could explain why the changes are not propagated to HA?

Even changing ports and use a user and password for mqtt no i did not made particular configuration. For the moment i only have magnetic sensors for doors. I have Home Assistant OS installed on a virtual machine.

Hi, I have the same problem: light state stays in "unknown" status. If I use the physical switch to control lights, state does not change. It does update if I control from Home Assistant.

On the other hand, the Kline Windows DVI (lock/unlocked sensor) does work very well. When I open a window, the state is updated correctly.

This is the add-on log at startup. There are no add-on logs when I switch the light on/off.

2022-09-26 21:29:59,078 - sensors - INFO - Sensor created / updated : device_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,090 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,100 - sensors - INFO - Sensor created / updated : id_tydom__Lampadaire_salon 1614713144_1614713144
2022-09-26 21:29:59,112 - sensors - INFO - Binary sensor created / updated : thermicDefect_tydom__Lampadaire_salon False
2022-09-26 21:29:59,122 - sensors - INFO - Sensor created / updated : level_tydom__Lampadaire_salon 100
2022-09-26 21:29:59,135 - sensors - INFO - Binary sensor created / updated : onFavPos_tydom__Lampadaire_salon False
2022-09-26 21:29:59,144 - light - INFO - light created / updated : Lampadaire salon 1614713144_1614713144 100

I solved in part the problem by adding sensors in the config file like this :

mqtt:
  binary_sensor:
    - name: "intrusionDetect_tydom__Porte_1_test"
      unique_id: sensor.intrusionDetect_tydom_1664115309_1664115309
      state_topic: "binary_sensor/tydom/intrusionDetect_tydom_1664115309_1664115309/state"
      payload_on: true
      payload_off: false
      device_class: opening

However i think it should works in the auto configuration way. I suppose that, the auto generated sensors are not correctly configured. Maybe "payload_on: true" or "payload_off: false" are missing. However i don't know where auto generated sensors config are stored in HAOS to check, maybe you can help me ? I'm new in HA world.

dbouchabou avatar Sep 27 '22 19:09 dbouchabou

I'm running on:

Home Assistant 2022.9.7 Supervisor 2022.09.1 Operating System 9.0 User Interface : 20220907.2 - latest

There is an extract of my logs;

2022-09-28 09:58:00,447 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-09-28 09:58:08,964 - tydomMessagehandler - WARNING - 1651737001_1651737001 not in dic device_name
2022-09-28 09:58:08,964 - tydomMessagehandler - WARNING - 1651737001_1651737001 not in dic device_type
2022-09-28 09:58:08,964 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:17,115 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée True
2022-09-28 09:58:17,115 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:20,755 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée False
2022-09-28 09:58:20,755 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:25,294 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée True
2022-09-28 09:58:25,294 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:28,184 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée False
2022-09-28 09:58:28,184 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:34,954 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée True
2022-09-28 09:58:34,954 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:43,144 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée False
2022-09-28 09:58:43,144 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-09-28 09:58:48,884 - sensors - INFO - Binary sensor created / updated : intrusionDetect_tydom__Porte_d’entrée True
2022-09-28 09:58:48,884 - tydomMessagehandler - INFO - Incoming data parsed successfully !

I have two warning because, it is normal as I have a motion sensor directly connected to my tydom without the central alarm (it's a test). However the second device "intrusionDetect_tydom__Porte_d’entrée" seem working well but statut stay "unknow" in Home Assistant

dbouchabou avatar Sep 28 '22 08:09 dbouchabou

Hi, Mosquito is the most popular mqtt broker (if not the only mqtt broker). Almost 100% of the users are using it. Just to say that your setup is not uncommon 😉 However, mosquito can be configured in different manners ; have you tuned its configuration in a way that could explain why the changes are not propagated to HA?

Even changing ports and use a user and password for mqtt no i did not made particular configuration. For the moment i only have magnetic sensors for doors. I have Home Assistant OS installed on a virtual machine.

Hi, I have the same problem: light state stays in "unknown" status. If I use the physical switch to control lights, state does not change. It does update if I control from Home Assistant. On the other hand, the Kline Windows DVI (lock/unlocked sensor) does work very well. When I open a window, the state is updated correctly. This is the add-on log at startup. There are no add-on logs when I switch the light on/off.

2022-09-26 21:29:59,078 - sensors - INFO - Sensor created / updated : device_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,090 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Lampadaire_salon 1614713144
2022-09-26 21:29:59,100 - sensors - INFO - Sensor created / updated : id_tydom__Lampadaire_salon 1614713144_1614713144
2022-09-26 21:29:59,112 - sensors - INFO - Binary sensor created / updated : thermicDefect_tydom__Lampadaire_salon False
2022-09-26 21:29:59,122 - sensors - INFO - Sensor created / updated : level_tydom__Lampadaire_salon 100
2022-09-26 21:29:59,135 - sensors - INFO - Binary sensor created / updated : onFavPos_tydom__Lampadaire_salon False
2022-09-26 21:29:59,144 - light - INFO - light created / updated : Lampadaire salon 1614713144_1614713144 100

I solved in part the problem by adding sensors in the config file like this :

mqtt:
  binary_sensor:
    - name: "intrusionDetect_tydom__Porte_1_test"
      unique_id: sensor.intrusionDetect_tydom_1664115309_1664115309
      state_topic: "binary_sensor/tydom/intrusionDetect_tydom_1664115309_1664115309/state"
      payload_on: true
      payload_off: false
      device_class: opening

However i think it should works in the auto configuration way. I suppose that, the auto generated sensors are not correctly configured. Maybe "payload_on: true" or "payload_off: false" are missing. However i don't know where auto generated sensors config are stored in HAOS to check, maybe you can help me ? I'm new in HA world.

I have the same problem , see the issue 39, I suggested a modification in the code (done in V2;4.0) but it doesn't work.

LGO44 avatar Sep 28 '22 17:09 LGO44

Hello,

this PR should fix your trouble ;)

https://github.com/fmartinou/tydom2mqtt/pull/44

mopi1402 avatar Sep 30 '22 00:09 mopi1402

Released as 2.5.0

fmartinou avatar Sep 30 '22 17:09 fmartinou

This did not fix my issue with light state not being updating.

I found more info in the log. Here is what happens when I use the physical light switch to switch on, then off, the light:

2022-10-01 11:43:54,669 - tydomMessagehandler - WARNING - Didn't detect incoming type, here it is :
2022-10-01 11:43:54,680 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:43:54,687 - tydomMessagehandler - WARNING - RAW INCOMING :
2022-10-01 11:43:54,695 - tydomMessagehandler - WARNING - b'\x02\x18\x01\x01\x04\x02\x00\x00\x00\x08\x86\xa2h\x82\x05\x98\x004\x1f\x00\x01\x12\x01\xfc\xc2'
2022-10-01 11:43:54,702 - tydomMessagehandler - WARNING - END RAW
2022-10-01 11:43:54,707 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:43:55,316 - sensors - INFO - Sensor created / updated : device_id_tydom__Hall 1602670418
2022-10-01 11:43:55,338 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Hall 1602670417
2022-10-01 11:43:55,353 - sensors - INFO - Sensor created / updated : id_tydom__Hall 1602670418_1602670417
2022-10-01 11:43:55,366 - sensors - INFO - Sensor created / updated : level_tydom__Hall 10
2022-10-01 11:43:55,377 - light - INFO - light created / updated : Hall 1602670418_1602670417 10
2022-10-01 11:43:55,381 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-10-01 11:43:59,685 - tydomMessagehandler - WARNING - Didn't detect incoming type, here it is :
2022-10-01 11:43:59,694 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:43:59,702 - tydomMessagehandler - WARNING - RAW INCOMING :
2022-10-01 11:43:59,708 - tydomMessagehandler - WARNING - b'\x02\x18\x01\x01\x04\x02\x00\x00\x00\x08\x86\xa2h\x82\x05\x98\x004\x1f\x00\x01\x12\x01\xfc\xc2'
2022-10-01 11:43:59,711 - tydomMessagehandler - WARNING - END RAW
2022-10-01 11:43:59,715 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:44:00,317 - sensors - INFO - Sensor created / updated : device_id_tydom__Hall 1602670418
2022-10-01 11:44:00,335 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Hall 1602670417
2022-10-01 11:44:00,345 - sensors - INFO - Sensor created / updated : id_tydom__Hall 1602670418_1602670417
2022-10-01 11:44:00,361 - sensors - INFO - Sensor created / updated : level_tydom__Hall 100
2022-10-01 11:44:00,369 - light - INFO - light created / updated : Hall 1602670418_1602670417 100
2022-10-01 11:44:00,375 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-10-01 11:44:03,353 - tydomMessagehandler - WARNING - Didn't detect incoming type, here it is :
2022-10-01 11:44:03,362 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:44:03,368 - tydomMessagehandler - WARNING - RAW INCOMING :
2022-10-01 11:44:03,375 - tydomMessagehandler - WARNING - b'\x02\x18\x01\x01\x04\x02\x00\x00\x00\x08\x86\xa2h\x82\x05\x98\x004\x1f\x00\x01\x12\x01\xfc\xc2'
2022-10-01 11:44:03,379 - tydomMessagehandler - WARNING - END RAW
2022-10-01 11:44:03,381 - tydomMessagehandler - WARNING - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-01 11:44:04,010 - sensors - INFO - Sensor created / updated : device_id_tydom__Hall 1602670418
2022-10-01 11:44:04,034 - sensors - INFO - Sensor created / updated : endpoint_id_tydom__Hall 1602670417
2022-10-01 11:44:04,052 - sensors - INFO - Sensor created / updated : id_tydom__Hall 1602670418_1602670417
2022-10-01 11:44:04,063 - sensors - INFO - Sensor created / updated : level_tydom__Hall 0
2022-10-01 11:44:04,067 - light - INFO - light created / updated : Hall 1602670418_1602670417 0
2022-10-01 11:44:04,073 - tydomMessagehandler - INFO - Incoming data parsed successfully !

and here are the entity attributes (state is "unknown"):

supported_color_modes: brightness
device_id: 1602670418
endpoint_id: 1602670417
id: 1602670418_1602670417
light_name: Hall
device_type: light
level: 0
assumed_state: true
friendly_name: Hall
supported_features: 0
thermicDefect: false
onFavPos: false
loadDefect: false
cmdDefect: false
battDefect: false
onPresenceDetected: false
onDusk: false

I guess state shall be on when level >0 and off when level = 0 ?

jerry34ha avatar Oct 01 '22 09:10 jerry34ha

I have the same problem as @jerry34ha, did you guys figure out the problem?

tommylinnerud89 avatar Oct 30 '22 17:10 tommylinnerud89

Nope. I stopped trying and will wait until I see a fix in the changeling regarding this.

I can help troubleshooting if I'm given instructions. I can also buy a Tyxia 5610 or 5640 to a dev if he/she needs it.

jerry34ha avatar Oct 31 '22 15:10 jerry34ha

A year later I tried again and I'm now on tydom2mqtt 3.4.2 and values are updated correctly. I do not have this problem anymore.

jerry34ha avatar Jan 17 '24 13:01 jerry34ha