tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

Tywatt consumption issue

Open NCoiby opened this issue 2 years ago • 11 comments

Hi,

An issue with my tywatt consumptions appeared at the beginning of the year. Since January 1st, each consumption sensor (ELEC_OUTLET_tydom__Tywatt, ELEC_HEATING_tydom__Tywatt, etc...) receive 2 different information: The total consumption since the setup of my HA, and a few minutes later the yearly consumption. Here is a look at my consumption history (from 31/12/2022 at 23:00, to 01/01/2023 at 01:00):

image

ELEC_TOTAL_tydom__Tywatt is the only one not facing this issue. From what I understand, the total consumption and yearly consumption were the same in 2022 (which looks right because I started my HA in 2022). But now these are 2 different values assigned to the same sensor.

Is anyone facing the same issue ? Please find below the part of the log showing the issue.

2023-01-04 11:56:27,231 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 11:56:27,232 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyInstant&unit=ELEC_A&reset=false
2023-01-04 11:56:27,663 - sensors - INFO - Sensor created / updated : ELEC_A_tydom__Tywatt 600
2023-01-04 11:56:27,664 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:57:09,667 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 11:57:09,668 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_TOTAL&reset=false
2023-01-04 11:57:10,758 - sensors - INFO - Sensor created / updated : ELEC_TOTAL_tydom__Tywatt 8712934
2023-01-04 11:57:10,760 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:57:19,447 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:58:01,453 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 11:58:01,453 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_HEATING&reset=false
2023-01-04 11:58:01,602 - sensors - INFO - Sensor created / updated : ELEC_HEATING_tydom__Tywatt 1376367
2023-01-04 11:58:01,603 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:58:05,821 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:58:47,823 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 11:58:47,824 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_COOLING&reset=false
2023-01-04 11:58:52,154 - sensors - INFO - Sensor created / updated : ELEC_COOLING_tydom__Tywatt 0
2023-01-04 11:58:52,155 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 11:59:34,158 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 11:59:34,159 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_HOTWATER&reset=false
2023-01-04 11:59:34,309 - sensors - INFO - Sensor created / updated : ELEC_HOTWATER_tydom__Tywatt 803320
2023-01-04 11:59:34,310 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 12:00:16,315 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 12:00:16,316 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_OUTLET&reset=false
2023-01-04 12:00:18,781 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 4489406
2023-01-04 12:00:18,782 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 12:00:22,820 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 12:01:04,824 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 12:01:04,825 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_OTHER&reset=false
2023-01-04 12:01:04,977 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 2043841
2023-01-04 12:01:04,978 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 12:01:46,989 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 12:01:46,990 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyDistrib&period=YEAR&periodOffset=0&src=ELEC
2023-01-04 12:01:49,350 - sensors - INFO - Sensor created / updated : ELEC_HEATING_tydom__Tywatt 16949
2023-01-04 12:01:49,350 - sensors - INFO - Sensor created / updated : ELEC_HOTWATER_tydom__Tywatt 18442
2023-01-04 12:01:49,351 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 33168
2023-01-04 12:01:49,352 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 16111
2023-01-04 12:01:49,352 - tydomMessagehandler - INFO - Incoming data parsed successfully 

NCoiby avatar Jan 04 '23 13:01 NCoiby

I do have the same issue. I also installed (reinstalled correctly) my tywatt and started using tydom2mqtt in 2022, so i don't know if it's a new issue or not.

image

2023-01-04 14:49:13,603 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:49:13,605 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyInstant&unit=ELEC_A&reset=false
2023-01-04 14:49:13,953 - sensors - INFO - Sensor created / updated : ELEC_A_tydom__Tywatt 200
2023-01-04 14:49:13,957 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:49:55,962 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:49:55,964 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_TOTAL&reset=false
2023-01-04 14:49:56,114 - sensors - INFO - Sensor created / updated : ELEC_TOTAL_tydom__Tywatt 1414265
2023-01-04 14:49:56,115 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:50:38,119 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:50:38,121 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_HEATING&reset=false
2023-01-04 14:50:38,271 - sensors - INFO - Sensor created / updated : ELEC_HEATING_tydom__Tywatt 444957
2023-01-04 14:50:38,272 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:51:20,276 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:51:20,278 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_COOLING&reset=false
2023-01-04 14:51:20,431 - sensors - INFO - Sensor created / updated : ELEC_COOLING_tydom__Tywatt 0
2023-01-04 14:51:20,432 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:52:02,435 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:52:02,437 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_HOTWATER&reset=false
2023-01-04 14:52:02,590 - sensors - INFO - Sensor created / updated : ELEC_HOTWATER_tydom__Tywatt 293849
2023-01-04 14:52:02,591 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:52:44,596 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:52:44,597 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_OUTLET&reset=false
2023-01-04 14:52:44,750 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 205453
2023-01-04 14:52:44,751 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:53:26,755 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:53:26,756 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyIndex&dest=ELEC_OTHER&reset=false
2023-01-04 14:53:26,911 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 470006
2023-01-04 14:53:26,912 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-04 14:54:08,917 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-04 14:54:08,919 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1669313787/endpoints/1669313787/cdata?name=energyDistrib&period=YEAR&periodOffset=0&src=ELEC
2023-01-04 14:54:09,079 - sensors - INFO - Sensor created / updated : ELEC_HEATING_tydom__Tywatt 15218
2023-01-04 14:54:09,082 - sensors - INFO - Sensor created / updated : ELEC_HOTWATER_tydom__Tywatt 26102
2023-01-04 14:54:09,084 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 6334
2023-01-04 14:54:09,086 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 17894

arnodu avatar Jan 04 '23 14:01 arnodu

It looks like the bug comes from #38 , i'm not sure why adding energyDistrib was useful for @gus8313, but i guess the sensor name should be different than the energyIndex sensor.

It looks like energyDistrib updates the yearly consumption and energyIndex the global consumption, maybe adding yearly somewhere in the sensor name?

arnodu avatar Jan 06 '23 19:01 arnodu

Hello, I do not have this issue, but it may be linked to my installation. On one side i have EnergyIndex that only includes the total consumption, on the other side i have energyDistrib that includes all energy sensors. Issue could be that you have the same sensor name in both energyIndex and energySensor, i will update the code to set different names and check if it solves the issue

gus8313 avatar Jan 06 '23 22:01 gus8313

It's weird you don't have the same issue. Could you send us the part of your log with the update of the sensors to see which sensors energyDistrib and energyIndex updates and if they have the same name?

Also : i see that you made a commit on your fork : could you try to keep the same name sensor for energyIndex and energyInstant to avoid messing up long term statistics?

arnodu avatar Jan 07 '23 10:01 arnodu

Hello,

I have the same problem since today for the sensors:

  • ELEC_OTHER_tydom__Tywatt
  • ELEC_HEATING_tydom__Tywatt

image

Neocide avatar Jan 09 '23 19:01 Neocide

I created merge request #70 that fixes the issue for me.

arnodu avatar Jan 09 '23 19:01 arnodu

I use tydom2mqtt on docker, how i can use your fixe on my docker image ? Or which docker image can i pull ?

Edit : I modified the file inside docker

Neocide avatar Jan 09 '23 20:01 Neocide

My energy consumption reporting is back to normal since a few days. I have not done any change in my installation but looking at the logs, it looks like its not getting data for energyDistrib.

2023-01-23 09:07:29,690 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:07:29,690 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyInstant&unit=ELEC_A&reset=false
2023-01-23 09:07:30,317 - sensors - INFO - Sensor created / updated : ELEC_A_tydom__Tywatt 400
2023-01-23 09:07:30,317 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:08:12,319 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:08:12,320 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_TOTAL&reset=false
2023-01-23 09:08:12,471 - sensors - INFO - Sensor created / updated : ELEC_TOTAL_tydom__Tywatt 9500337
2023-01-23 09:08:12,471 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:08:54,474 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:08:54,475 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_HEATING&reset=false
2023-01-23 09:08:55,833 - sensors - INFO - Sensor created / updated : ELEC_HEATING_tydom__Tywatt 1542048
2023-01-23 09:08:55,834 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:09:28,886 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:09:49,507 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:10:31,512 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:10:31,513 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_COOLING&reset=false
2023-01-23 09:10:34,351 - sensors - INFO - Sensor created / updated : ELEC_COOLING_tydom__Tywatt 0
2023-01-23 09:10:34,351 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:11:16,356 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:11:16,357 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_HOTWATER&reset=false
2023-01-23 09:11:16,503 - sensors - INFO - Sensor created / updated : ELEC_HOTWATER_tydom__Tywatt 915345
2023-01-23 09:11:16,504 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:11:58,506 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:11:58,507 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_OUTLET&reset=false
2023-01-23 09:12:01,437 - sensors - INFO - Sensor created / updated : ELEC_OUTLET_tydom__Tywatt 4878662
2023-01-23 09:12:01,437 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:12:34,489 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:12:49,639 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:13:31,644 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:13:31,645 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyIndex&dest=ELEC_OTHER&reset=false
2023-01-23 09:13:34,742 - sensors - INFO - Sensor created / updated : ELEC_OTHER_tydom__Tywatt 2164481
2023-01-23 09:13:34,743 - tydomMessagehandler - INFO - Incoming data parsed successfully !
2023-01-23 09:14:16,748 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... POST /refresh/all
2023-01-23 09:14:16,748 - tydomConnector - INFO - >>>>>>>>>> Sending to tydom client..... GET /devices/1634493627/endpoints/1634493631/cdata?name=energyDistrib&period=YEAR&periodOffset=0&src=ELEC
2023-01-23 09:14:16,905 - tydomMessagehandler - INFO - Incoming data parsed successfully !

NCoiby avatar Jan 23 '23 08:01 NCoiby

Maybe a tydom update?

I'm still getting energyDistrib data with version (from the tydom app) :

TYDOM
Model : TYDOM HOME
Access : Server V1
SDK version : 03.04.15
SDK boot version : 01.00.10

[...]

X3D 
Key software version :  01.05.13
Stack software version : 04.00.50

arnodu avatar Jan 23 '23 09:01 arnodu

Here are the version info from my tydom app:

TYDOM
Model : TYDOM1
Access : Server V1
SDK version : 03.04.15
SDK boot version : 02.211.128

[...]

X3D 
Key software version :  01.04.33
Stack software version : 04.00.50

NCoiby avatar Jan 23 '23 09:01 NCoiby

I don't have the issue anymore in v3.4.3

arnodu avatar Jun 14 '24 13:06 arnodu