fmartinou / tydom2mqtt

Deltadore Tydom to MQTT Bridge
https://fmartinou.github.io/tydom2mqtt/
MIT License
90 stars 53 forks source link

Some sensors are not updated anymore #54

Closed arnodu closed 1 year ago

arnodu commented 1 year ago

Since a few days i don't receive updates from some energy consumption sensors.

I use a Tydom Home + Tywatt 1000 and I successfully receive update from some sensors like the total energy consumption (sensor.elec_total_tydom_tywatt) and other sensors, but i don't get updates for other sensors such as sensor.elec_heating_tydom_tywatt.

Values corresponding to these sensors are updated in the tydom app, but tydom2mqtt can't seem to read the values.

tydom2mqtt is at version 2.6.2, here is tydom2mqtt log 5 mins after restart:

2022-11-22 08:48:39,688 - __main__ - INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-11-22 08:48:39,689 - __main__ - INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-11-22 08:48:39,690 - __main__ - INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-11-22 08:48:39,690 - __main__ - INFO - STARTING TYDOM2MQTT
2022-11-22 08:48:39,691 - __main__ - INFO - Detecting environnement......
2022-11-22 08:48:39,691 - __main__ - INFO - /data/options.json detected ! Hassio Addons Environnement : parsing options.json....
2022-11-22 08:48:39,692 - tydomConnector - INFO - Initialising TydomClient Class
2022-11-22 08:48:39,692 - tydomConnector - INFO - Setting local mode context.
2022-11-22 08:48:39,700 - __main__ - INFO - Starting main loop_task
/app/main.py:141: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
2022-11-22 08:48:39,704 - mqtt_client - INFO - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2022-11-22 08:48:39,705 - mqtt_client - INFO - Attempting MQTT connection...
2022-11-22 08:48:39,705 - mqtt_client - INFO - MQTT host : core-mosquitto
2022-11-22 08:48:39,706 - mqtt_client - INFO - MQTT user : homeassistant
2022-11-22 08:48:39,725 - gmqtt.mqtt.protocol - INFO - [CONNECTION MADE]
2022-11-22 08:48:40,178 - mqtt_client - INFO - ##################################
2022-11-22 08:48:40,179 - mqtt_client - INFO - Subscribing to : +/tydom/#
2022-11-22 08:48:40,179 - gmqtt.mqtt.package - INFO - [SEND SUB] 1 [b'homeassistant/status']
2022-11-22 08:48:40,181 - gmqtt.mqtt.package - INFO - [SEND SUB] 2 [b'+/tydom/#']
2022-11-22 08:48:40,183 - tydomConnector - INFO - """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2022-11-22 08:48:40,184 - tydomConnector - INFO - TYDOM WEBSOCKET CONNECTION INITIALISING....                     
2022-11-22 08:48:40,184 - tydomConnector - INFO - Building headers, getting 1st handshake and authentication....
2022-11-22 08:48:42,653 - tydomConnector - INFO - Upgrading http connection to websocket....
2022-11-22 08:48:42,654 - tydomConnector - INFO - Attempting websocket connection with tydom hub.......................
2022-11-22 08:48:42,655 - tydomConnector - INFO - Host Target : 192.168.1.80
2022-11-22 08:48:42,743 - gmqtt.mqtt.handler - INFO - [SUBACK] 1 (0,)
2022-11-22 08:48:42,744 - gmqtt.mqtt.handler - INFO - [SUBACK] 2 (0,)
2022-11-22 08:48:45,167 - __main__ - INFO - Tydom Client is connected to websocket and ready !
2022-11-22 08:48:45,168 - tydomConnector - INFO - Requesting 1st data...
2022-11-22 08:48:45,168 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /info
2022-11-22 08:48:45,170 - tydomConnector - INFO - ##################################
2022-11-22 08:48:45,170 - tydomConnector - INFO - ##################################
2022-11-22 08:48:45,171 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:48:45,172 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /configs/file
2022-11-22 08:48:45,173 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/cmeta
2022-11-22 08:48:50,249 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/data
2022-11-22 08:48:50,283 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:48:50,331 - tydomMessagehandler - INFO - Configuration updated
2022-11-22 08:48:50,331 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:48:50,334 - tydomMessagehandler - INFO - Metadata configuration updated
2022-11-22 08:48:50,335 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:48:50,337 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:49:32,343 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:49:32,344 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyInstant&unit=ELEC_A&reset=false
2022-11-22 08:49:33,029 - sensors - INFO - Sensor created / updated : ELEC_A_tydom__Tywatt 400
2022-11-22 08:49:33,030 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:50:15,038 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:50:15,039 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyIndex&dest=ELEC_TOTAL&reset=false
2022-11-22 08:50:15,197 - sensors - INFO - Sensor created / updated : ELEC_TOTAL_tydom__Tywatt 722361
2022-11-22 08:50:15,197 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:50:57,201 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:50:57,202 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyIndex&dest=ELEC_COOLING&reset=false
2022-11-22 08:50:57,362 - sensors - INFO - Sensor created / updated : ELEC_COOLING_tydom__Tywatt 0
2022-11-22 08:50:57,364 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:51:39,369 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:51:39,370 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyIndex&dest=ELEC_OUTLET&reset=false
2022-11-22 08:51:39,517 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 150616
2022-11-22 08:51:39,522 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:52:21,529 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:52:21,529 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyIndex&dest=ELEC_OTHER&reset=false
2022-11-22 08:52:21,677 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 291320
2022-11-22 08:52:21,678 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:53:03,685 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:53:03,687 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyDistrib&period=YEAR&periodOffset=0&src=ELEC
2022-11-22 08:53:03,844 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2022-11-22 08:53:45,845 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2022-11-22 08:53:45,846 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1664101359/endpoints/1664101359/cdata?name=energyInstant&unit=ELEC_A&reset=false
2022-11-22 08:53:46,515 - sensors - INFO - Sensor created / updated : ELEC_A_tydom__Tywatt 400
2022-11-22 08:53:46,515 - tydomMessagehandler - INFO - Incoming data parsed successfully !
arnodu commented 1 year ago

I have reset my Tydom, re-associated all my sensors and everything is back to normal now.

I guess it was not related to tydom2mqtt but the tydom API itself : the GET /devices/cmeta call was not listing some sensors for some reason.