suaveolent / ha-hoymiles-wifi

Home Assistant custom component for Hoymiles DTUs and the HMS-XXXXW-2T microinverters
MIT License
96 stars 5 forks source link

Stops updating data #31

Closed pvpowered closed 1 month ago

pvpowered commented 2 months ago

Describe the bug After working for a short time (minutes to hours), the update of all power data stops. A restart of Home Assistant fixes the issue.

Tested with DTU Wlite S in combination with HM-300.

To Reproduce Steps to reproduce the behavior:

  1. Setup Home Assistant Integration.
  2. Wait...

Expected behavior Keep updating data.

System (please complete the following information):

Additional context I found the following text every 15 min in the debug log: "DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for AC-Tagesenergie to avoid resetting total_increasing counter"

Anyways, I would like to thank you for the time and effort you have invested in developing this tool!

suaveolent commented 2 months ago

Thanks, the error indicates that the DTU is not responding. Now we need to figure out why.

Are you running the latest firmware on the DTU? Are you using any other components which might access the DTU? Are you using something else at the same time, e.g. OpenDTU?

pvpowered commented 2 months ago

To the best of my knowledge, my firmware version is up to date. The only other component is S-Miles Cloud and the mobile application. But this should not affect the Home Assistant integration. There is no second DTU like OpenDTU or AhoyDTU running. I tried to run this Addon before. However, it did not work at all (no connection to DTU) and I removed this addon before starting to use your integration. I was very happy to see data using your integration. However, today the communication between Home Assistant and DTU works exactly once after reboot. The received data keeps being frozen until the next reboot.

DTU: Hardware version H06.01.01 Software version V00.03.12

Inverter: Hardware version H00.08.00 Software version V01.00.14

suaveolent commented 2 months ago

I'm wondering if this is related to https://github.com/suaveolent/ha-hoymiles-wifi/issues/32 and this being an issue on Hoymiles side?

pvpowered commented 2 months ago

After reinstallation of the integration, i increased the update interval to 60 s. It appears to work fine for the last 18 hours with one minor flaw: there is loss of data at random times (cf. screenshot of voltage). This issue applies to all data.

Voltage

Here is an exemplary log with issue at 19:47:30: 2024-04-24 19:46:23.504 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Hoymiles data coordinator update 2024-04-24 19:46:25.891 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Finished fetching hoymiles_wifi data in 2.387 seconds (success: True) 2024-04-24 19:46:25.892 DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for AC-Tagesenergie to avoid resetting total_increasing counter 2024-04-24 19:47:25.505 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Hoymiles data coordinator update 2024-04-24 19:47:30.517 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Unable to retrieve real data new. Inverter might be offline. 2024-04-24 19:47:30.518 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Finished fetching hoymiles_wifi data in 5.013 seconds (success: True) 2024-04-24 19:47:30.518 DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for AC-Tagesenergie to avoid resetting total_increasing counter 2024-04-24 19:47:30.520 DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for Port 1 DC-Gesamtenergie to avoid resetting total_increasing counter 2024-04-24 19:47:30.521 DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for Port 1 DC-Tagesenergie to avoid resetting total_increasing counter 2024-04-24 19:48:30.505 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Hoymiles data coordinator update 2024-04-24 19:48:32.346 DEBUG (MainThread) [custom_components.hoymiles_wifi.coordinator] Finished fetching hoymiles_wifi data in 1.841 seconds (success: True) 2024-04-24 19:48:32.347 DEBUG (MainThread) [custom_components.hoymiles_wifi.sensor] Returning last known value instead of 0.0 for AC-Tagesenergie to avoid resetting total_increasing counter

pvpowered commented 2 months ago

I'm wondering if this is related to #32 and this being an issue on Hoymiles side?

I don't think so. Daily energy keeps increasing.

suaveolent commented 2 months ago

After reinstallation of the integration, i increased the update interval to 60 s. It appears to work fine for the last 18 hours with one minor flaw: there is loss of data at random times (cf. screenshot of voltage). This issue applies to all data.

Thanks, It might be that the DTU is overwhelmed by the short default update interval. The graph you posted reminds me of https://github.com/suaveolent/ha-hoymiles-wifi/issues/14.

It could be that there are some overlaps of the cycles of the integrations commands which causes the DTU to be overwhelmed. Although interestingly this does not happen to the HMS-800W-2T any more.

blazx6 commented 1 month ago

After reinstallation of the integration, i increased the update interval to 60 s. It appears to work fine for the last 18 hours with one minor flaw: there is loss of data at random times (cf. screenshot of voltage). This issue applies to all data.

Thanks, It might be that the DTU is overwhelmed by the short default update interval. The graph you posted reminds me of #14.

It could be that there are some overlaps of the cycles of the integrations commands which causes the DTU to be overwhelmed. Although interestingly this does not happen to the HMS-800W-2T any more.

I have a new installation with HMS-800W-2T and the updates worked fine for a day but now the values are not refreshed anymore in HA. Over the S-Miles App the Data is updated normally. HMS is on the latest available FW, HA was updated to the latest Version yesterday. Restart of the HA does not help.

HA working in Hyper-V on Windows 11.

suaveolent commented 1 month ago

After reinstallation of the integration, i increased the update interval to 60 s. It appears to work fine for the last 18 hours with one minor flaw: there is loss of data at random times (cf. screenshot of voltage). This issue applies to all data.

Thanks, It might be that the DTU is overwhelmed by the short default update interval. The graph you posted reminds me of #14. It could be that there are some overlaps of the cycles of the integrations commands which causes the DTU to be overwhelmed. Although interestingly this does not happen to the HMS-800W-2T any more.

I have a new installation with HMS-800W-2T and the updates worked fine for a day but now the values are not refreshed anymore in HA. Over the S-Miles App the Data is updated normally. HMS is on the latest available FW, HA was updated to the latest Version yesterday. Restart of the HA does not help.

HA working in Hyper-V on Windows 11.

Are you running your inverter together with a battery? Have you tried restarting the DTU ?

blazx6 commented 1 month ago

Hi,

No, no battery, just the inverter plugged in directly to the grid.

DTU turns off every night when there is no solar energy produced, I didn't perform a factory reset of the DTU.

Kind regards

V sre., 8. maj 2024, 11:03 je oseba suaveolent @.***> napisala:

After reinstallation of the integration, i increased the update interval to 60 s. It appears to work fine for the last 18 hours with one minor flaw: there is loss of data at random times (cf. screenshot of voltage). This issue applies to all data.

Thanks, It might be that the DTU is overwhelmed by the short default update interval. The graph you posted reminds me of #14 https://github.com/suaveolent/ha-hoymiles-wifi/issues/14. It could be that there are some overlaps of the cycles of the integrations commands which causes the DTU to be overwhelmed. Although interestingly this does not happen to the HMS-800W-2T any more.

I have a new installation with HMS-800W-2T and the updates worked fine for a day but now the values are not refreshed anymore in HA. Over the S-Miles App the Data is updated normally. HMS is on the latest available FW, HA was updated to the latest Version yesterday. Restart of the HA does not help.

HA working in Hyper-V on Windows 11.

Are you running your inverter together with a battery? Have you tried restarting the DTU ?

— Reply to this email directly, view it on GitHub https://github.com/suaveolent/ha-hoymiles-wifi/issues/31#issuecomment-2100105999, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDI7WOQ3RMXTKD7EWKT3LHTZBHS5HAVCNFSM6AAAAABGWOBJC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGEYDKOJZHE . You are receiving this because you commented.Message ID: @.***>

suaveolent commented 1 month ago

Could it be that the IP-Adress you are using has changed since the install (Some routers will not assign the same ip after the device reconnects)

blazx6 commented 1 month ago

Shouldn't be the cause because I have defined a fixed IP address for the DTU in the Router DHCP settings but I can double check that.

V sre., 8. maj 2024, 11:21 je oseba suaveolent @.***> napisala:

Could it be, that the IP-Adress you are using has changed since the install (Some routers will not assign the same ip after the device reconnects)

— Reply to this email directly, view it on GitHub https://github.com/suaveolent/ha-hoymiles-wifi/issues/31#issuecomment-2100141194, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDI7WOWG4WHP5ZSAGWRS7J3ZBHVATAVCNFSM6AAAAABGWOBJC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGE2DCMJZGQ . You are receiving this because you commented.Message ID: @.***>

suaveolent commented 1 month ago

Can you also verify if you can ping the inverter from your home assistance instance?

blazx6 commented 1 month ago

I had the option to check the network settings today and you were right. From some reason the Router didn't assign the designated IP to the DTU. I deleted the DHCP config for the DTU and created a new one, restarted the Router and am now able to see the DTU data in HA again. Thanks for the idea!

V sre., 8. maj 2024, 17:17 je oseba suaveolent @.***> napisala:

Can you also verify if you can ping the inverter from your home assistance instance?

— Reply to this email directly, view it on GitHub https://github.com/suaveolent/ha-hoymiles-wifi/issues/31#issuecomment-2100822618, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDI7WOUR5T7MNH4QBJB2ZE3ZBI6WZAVCNFSM6AAAAABGWOBJC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQHAZDENRRHA . You are receiving this because you commented.Message ID: @.***>

suaveolent commented 1 month ago

Great, Glad it works! Closing the issue then.

blazx6 commented 1 month ago

Sure, thanks for the support!

V čet., 9. maj 2024, 09:10 je oseba suaveolent @.***> napisala:

Great, Glad it works! Closing the issue then.

— Reply to this email directly, view it on GitHub https://github.com/suaveolent/ha-hoymiles-wifi/issues/31#issuecomment-2102085578, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDI7WOWQ7O2GWZFN75GDUR3ZBMOORAVCNFSM6AAAAABGWOBJC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGA4DKNJXHA . You are receiving this because you commented.Message ID: @.***>