suaveolent / ha-hoymiles-wifi

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

No new Data in the morning from HMS 800W-2T (Bug?) #80

Open Steffen06 opened 6 days ago

Steffen06 commented 6 days ago

Describe the bug No Data after retrieving first Dataset in the morning in Home Assistant until i directly connect to the DTU / Inverter (HMS 800W-2T) with the S-Miles installer App Toolkit.

Installation, Setting Steps to reproduce the behavior:

  1. setup of WIFI (static IPv4 Assigned thru DHCP based on MAC-Adresse)
  2. Added DTU / Inverter to Cloud Account for Updates
  3. Updated DTU thru Cloudportal to Version V00.01.13_20240604
  4. Updated Inverter thru Support to Version V01.02.01 (no other Way possibile)
  5. Added DTU / Inverter to Home Assistant via this Integration
  6. Used Version of this Integration v0.3.2 (Installed thru HACS)
  7. Home Assistant 2024.11.2 (running on an Raspberry Pi 5 4GB; 256 GB SSD)
  8. Integration update interval 5s (I don't need (want) Data in the Cloud)

Behavior Since I Installed the DTU/Inverter (about a Week ago) and added it to Home Assistant. I see every morning that the DTU connected and responded to the first request of the Integration. (\~08:11 in the Screenshot 1 below) But after the first Dataset there are no new (changed) Datapoints. If I see that in Home Assistant and than connect to the DTU WIFI and open the Toolkit (and see the Production there) Home Assistant magically starts to receive new Data. (\~8:36 in the Screenshot 1) After that the Integration works with the update interval 5s for the rest of the day. (And collected with the hoymiles-wifi and a small shell Skript all data from get / info functions at 20241119_082854.txt, 20241119_082854.txt, 20241119_083014.txt, 20241119_083529.txt, 20241119_084040.txt & 20241119_093337.txt

Screenshot 1: Screenshot_20241119_091415_Home Assistant

second occurrence, whiteout logs / requests

A few days early I mad an interesting discovery where you can see that the inverter production ramps up (downward trend of the red line in the grape) but the reportet production (Purple line) doesn't get updatet. (Screenshot 2) Here it also helped to open the Toolkit like describe above. But on the first try I only got an error message that the connection failed. (Screenshot 4). On the second connection try the connection worked, but i noticed that the history graph in the App showed the same behavior. (Screenshot 3)

On other occurrences the App sometime looks like it has no history.

Screenshot 2: Screenshot_20241116_095800_Home Assistant

Screenshot 3: Screenshot_20241116_095338_S-Miles Installer

Screenshot 4: Screenshot_20241116_152524_S-Miles Installer

thoughts for me It seems that one of the requests / the amount causes something with the DTU that the DTU doesn't report new values and when i try to connect with the S-Miles installer App Toolkit the DTU notices the error and "starts" to send new values. Because in the logs the DTU responds to the requests, but not with new values.

I hope you understand my Problem and you have everything to analyse the problem.

suaveolent commented 6 days ago

Thanks for reporting. That is a weird problem you are facing.

To debug it, can you maybe try to increase the update inverval to 35 seconds and see if that solves the issue?

If so, we can then dig deeper and explore what is going on, and what data the toolkit sends to resolve the issue.

Steffen06 commented 6 days ago

Ok i will try that for tomorrow. The annoying part is that I only can try things once a day. (I also find that the problem is relative wired.)

I will update you If I find some new Info.

Today I watched the start of DTU and made some requests to it with my script and after that I noticed that Home Assistant received new Data without opening the S-Miles installer App. (for the first Time) The difference this time was that only an old phone that I had set up yesterday had automatically connected to the DTU-AP. (I don't want to change WIFI on my Phone every time when the DTU sends no Data)

Screenshot_20241120_Home Assistant

Steffen06 commented 5 days ago

Update with 2 things.

  1. with the 35s update interval it worked (Screenshot 1)
  2. after testing with 35s update interval i wanted to switch to a 5s interval for the day and then it stoppend working after the change. (Screenshot 2)

Screenshot 1: Screenshot_20241121_Home Assistant

Screenshot 2: Screenshot_20241121_Home Assistant_2

suaveolent commented 5 days ago

So it seems that connecting to the integrated hotspot triggers some kind of "power mode" which allows to query more than 5 seconds.

Similar to what was observed in https://github.com/suaveolent/hoymiles-wifi/issues/30, 5 seconds only work after connecting via the mobile app (which means that the App is not really responsible for that).

Steffen06 commented 5 days ago

Ok I try tomorrow again with 35s interval and than changing the interval below 30s (5s steps) without and than back to 35s without connecting to the DTU AP. If i Find out that solution is that you need connect at least once a Day to the DTUs AP than i try setting the Pi on with runs HA to auto connect to the DTU AP. (WIFI of the Pi is currently not used and in close range to the DTU)

suaveolent commented 5 days ago

Sounds like a good plan. Let me know if that works for you, so I can update the documentation for this workaround.

Steffen06 commented 3 days ago

today was a total mess, noting worked as thought :(

Screenshot_20241122_Home Assistant

Steffen06 commented 3 days ago

Today was better than yesterday.

It is so confusing what actions enables an interval of 30s or below and then they don't work the next time.

Screenshot_20241123_Home Assistant

Steffen06 commented 2 days ago

Today was again a bit different as yesterday.

Screenshot_20241124_Home Assistant

Steffen06 commented 1 day ago

Today was similar to yesterday with the difference that the the Pi on witch runs HA was set up to auto connect to the DTU AP.

Screenshot_20241125_Home Assistant

suaveolent commented 1 day ago

That is weird indeed. I will dig into the App code to see if the mobile app transmits anything before accessing the get-real-data-new command.