lumapu / ahoy

Various tools, examples, and documentation for communicating with Hoymiles microinverters
https://ahoydtu.de
Other
948 stars 222 forks source link

[Bug] AhoyDTU allows to signin but shows no live data etc. but history, restapi, documentation,about #1451

Closed tschoenfelder closed 5 months ago

tschoenfelder commented 6 months ago

Platform

ESP8266

Assembly

I did the assebly by myself

nRF24L01+ Module

nRF24L01+ plus

Antenna

external antenna

Power Stabilization

Elko (~100uF)

Connection picture

Version

0.8.83

Github Hash

5ebfe5a

Build & Flash Method

AhoyDTU Webinstaller

Setup

External 5V power supply with another AhoyDTU close by showing no issues (4 inverters 2 600W and 2 800W) Reboot at midnight no serial debug/send serial over MQTT Network with close by WLAN router All pages protected 1 inverter, 400W sec interval ntp used mqtt configured, interval 0

Debug Serial Log output

n/a

Error description

AhoyDTU has been configured and runs. MQTT messages are received! After less than 24 hours, when trying to open web interface, it shows corrupted scree without login mask. If requesting via ip/loging, the login masks appears, after login page without live etc, but history is shown (see attachment). image

Thank you! Best regards, Torsten

MetaChuh commented 6 months ago

i noticed this as well from time to time (0.8.84) sometimes i get the page, if i hit refresh a few times, sometimes ahoy reboots unexpectedly, if i hit refresh for too many consecutive times, with too little pauses between refreshes.

my working workaround for now: a self built php web interface and engine on apache or nginx web server, which only accesses the api of ahoy, works good and it's fine for me.

Dirk-Ahoy commented 6 months ago

Das Prolem hab ich auch sporadisch - wenn man dann zu oft refresh macht rebootet Ahoy - meistens einfach einige Sekunden warten und dann kommt der Rest vom Webinterface - ich vermute das da auch der Fehler der sporadischen Reboots liegt aber im Log ist leider nix zu sehen.

hackman6 commented 6 months ago

Which browser do you use? I have those problems only with Firefox. Funny: with some Firefox on different machines also show live data. No idea what the difference is :-(

tschoenfelder commented 6 months ago

Hello,

thanks for the replies! I use current Chrome, Edge or iphone without any differcence.

Best regards, Torsten

tschoenfelder commented 6 months ago

i noticed this as well from time to time (0.8.84) sometimes i get the page, if i hit refresh a few times, sometimes ahoy reboots unexpectedly, if i hit refresh for too many consecutive times, with too little pauses between refreshes.

my working workaround for now: a self built php web interface and engine on apache or nginx web server, which only accesses the api of ahoy, works good and it's fine for me.

Thanks for the reply. I used this workaround as main path in my app and moved over to new solution to allow ahoy to pick the next value when ready instead being overloaded ...

tschoenfelder commented 6 months ago

a self built php web interface and engine on apache or nginx web server, which only accesses the api of ahoy,

Hello and thanks! I fear, this is it not ;-) I have a pure reader with 4 inverters and a sender (injector) with 1 HM400. The pure reader shows the same behaviour (and doesn't read MQTT!). I seems, the AHOy doens't get the outdated PW on the UI but fails to show the login screen. Even so history should be protected by PW, the menu shows it and selecting it gives Total Power maximum day: W. last value: W. maximum value: W. Updated every seconds without any data.

As well, the menu 'login' appears at the bottom, not top ...

Hope this helps in nailing it down ..

tschoenfelder commented 6 months ago

i noticed this as well from time to time (0.8.84) sometimes i get the page, if i hit refresh a few times, sometimes ahoy reboots unexpectedly, if i hit refresh for too many consecutive times, with too little pauses between refreshes.

my working workaround for now: a self built php web interface and engine on apache or nginx web server, which only accesses the api of ahoy, works good and it's fine for me.

Thank you. I now recall: I moved to MQTT as the web interface requires authentication and token handling now ;_)

MetaChuh commented 6 months ago

Thank you. I now recall: I moved to MQTT as the web interface requires authentication and token handling now ;_)

if it's just that, it's simple: just add the auth parameter with your old password to your query. no token needed, and token as an option, thanks to @lumapu and our discussions while he was developing.

curl example with authentification: curl --header "Content-Type:application/json" --request POST --data '{"auth": "your_password", "cmd": "limit_nonpersistent_relative", "id": 0, "val": 50}' "http://your_ahoy_dtu_ip/api/ctrl"

hope this helps, if yes, please leave a thumbs up

tschoenfelder commented 6 months ago

Thank you. I now recall: I moved to MQTT as the web interface requires authentication and token handling now ;_)

if it's just that, it's simple: just add the auth parameter with your old password to your query. no token needed, and token as an option, thanks to @lumapu and our discussions while he was developing.

curl example with authentification: curl --header "Content-Type:application/json" --request POST --data '{"auth": "your_password", "cmd": "limit_nonpersistent_relative", "id": 0, "val": 50}' "http://your_ahoy_dtu_ip/api/ctrl"

hope this helps, if yes, please leave a thumbs up

Hello MetaChuh,

thank you!

I was not shure, as a password normally is expensive compared to a token and for me the manual reads like 'don't do it' ;_)

It worked for me and I will now try to check for stability.

tschoenfelder commented 6 months ago

Das Prolem hab ich auch sporadisch - wenn man dann zu oft refresh macht rebootet Ahoy - meistens einfach einige Sekunden warten und dann kommt der Rest vom Webinterface - ich vermute das da auch der Fehler der sporadischen Reboots liegt aber im Log ist leider nix zu sehen.

Danke. Ja, auch beobachtet, dann kommt aber auch in 90% der Fälle keine Loginmaske und wenn ja, danach auf kein Live-Tab. Und das bei dem Ahoydtu ohne eine Änderung der Einspeisung ...

tschoenfelder commented 6 months ago

Have installed 0.8.86 with tasmotizer and with erase flash. This forced me to reenter all entries, but since then it's much better. The logic when to show the password screen still seems 'strange', but it's workable now ...

fyi: Read grid profile is OK to not add another constraint

tschoenfelder commented 6 months ago

OK, it's not reachable again and /login not followed by full availability of all buttons ..

tschoenfelder commented 6 months ago

I added a 100uF between +5V and GND on the ESP (in addition to the 10uF on the transmitter. Better feeling, but no improvement. Hours later, the login mask doesn't appear or logging in leads to partial display only ...

tschoenfelder commented 6 months ago

I now downgraded to [GIT SHA: 6e0ab50 :: 0.6.3, the last version I found on my computer. It's up and running for 10 minutes now ;_)

If I don't face issues, I will downgrade the other device as well.

Will keep you posted!

tschoenfelder commented 6 months ago

0.6.3 didn't work out, but I went to my doc and found 0.6.3 not working in the past. So tasmotized 0.5.66 which seems to work without issues for 10 hours now. (besides the open topics moving me to upgrade to newer version). The second AHOYDTU next to it again worked after starting at sunset for a short time and then ran into the login issue and loosing connection to MQTT. At least I ruled out a general issue with WLAN connectivity in my setup.

tschoenfelder commented 6 months ago

OK, current state: THe one with 0.5.66 runs cleanly, the one with 0.6.86 has reboots in between (without any external setting of limit...)

lumapu commented 6 months ago

maybe you can test the minimal version which is more available: https://fw.ahoydtu.de/fw/dev/

tschoenfelder commented 6 months ago

maybe you can test the minimal version which is more available: https://fw.ahoydtu.de/fw/dev/

Hello Lumapu,

thank you. Will do. Add. info: Seeing another tracker, I removed the password, which improved the situation reg. seeing no menues at all even after passing .../login. As an additional info I added this screenshot. The green line is data from AHOYDTU (no password) via MQTT. Is it possible, that the spikes come from the internal watchdog stepping in? What is not visible from this graph: I have data in the green line prior to the spike -> There is no 'outage' prior to the spikes. 2024-03-07 08_30_53-volkszaehler org - web frontend

AHOYDTU 0.6.91 shows MQTT as not connected now. I will not be able to see the spikes now ;_) Log shows now: 08:50:40.518 I: com loop duration: 1518ms but as well 1000ms and seldom: 08:51:39.175 ----- 08:51:39.371 I: (#1) RX 40ms | 27 CH03 | 95 01 08:51:39.372 I: (#1) RX 149ms | 23 CH75 | 95 83 08:51:39.444 I: (#1) RX 24ms | 27 CH03 | 95 02 08:51:39.446 ----- 08:51:39.524 I: (#1) RX 30ms | 17 CH03 | 95 81 08:51:39.525 I: (#1) Inv loss: 4 of 26, DTU loss: 21 of 54 08:51:39.526 ----- 08:51:39.878 I: (#2) RX 35ms | 27 CH40 | 95 01 08:51:39.971 I: (#2) RX 45ms | 27 CH23 | 95 02 08:51:40.074 I: (#2) RX 56ms | 23 CH23 | 95 83 08:51:40.077 ----- 08:51:40.174 I: (#2) RX 49ms | 17 CH23 | 95 81 08:51:40.175 I: (#2) Inv loss: 2 of 25, DTU loss: 15 of 49. ACKs: 3 08:51:40.176 ----- 08:51:40.357 I: (#3) RX 37ms | 27 CH75 | 95 01 08:51:40.358 I: (#3) RX 80ms | 27 CH75 | 95 02 08:51:40.359 I: (#3) RX 133ms | 23 CH75 | 95 83 08:51:40.361 ----- 08:51:40.361 I: com loop duration: 1362ms That's the device with external antenna .

ANd another update: Where do I find the 'stop communication during night' button. It's still in the json, but not under settings, or?

tschoenfelder commented 6 months ago

Current state: 0.8.91 without MQTT shows: ts uptime 21207 (after last settings saved/reboot). 0.5.66 with MQTT shows; ts update 56628 (after last settings saved/reboot).

tschoenfelder commented 6 months ago

Current state: 0.8.91 without MQTT shows: ts uptime 31759 (after last settings saved/reboot). 0.5.66 with MQTT shows; ts update 122079 (after last settings saved/reboot). I will now activate 0.5.66 injection again and have to make my mind on converting down to 0.5.66 to keep the logging data ...

tschoenfelder commented 6 months ago

Current state: 0.8.91 without MQTT shows: ts uptime 12781 (after last Exception). 0.5.66 with MQTT shows; ts update 148166 (after last settings saved/reboot).

tschoenfelder commented 6 months ago

Current state: 0.8.91 without MQTT shows: ts uptime 44162 (after last settings saved/reboot). 0.5.66 with MQTT shows; ts update 71695 (after last settings saved/reboot).

MetaChuh commented 6 months ago

@tschoenfelder

many thanks for your feedback.

i can now confirm watchdog reboot issues with v0.8.83 to v0.8.91 on esp8266 under similar circumstances. the minimal firmware works stable, but it would lack mqtt implementation.

i'm not sure what could be done right now, except stay at v0.5.66 until maximum of v0.6.9, as the esp8266 lacks the memory for all the new features.

no good news, but it's probably getting more and more difficult to fit all new stuff into the smaller esp's.

if you need an esp drop in replacement, with the same pinout and form factor as the older esp8266 (d1 mini), have a look at the esp32 d1 mini from either az-delivery (not sponsored or affiliated), or any other seller you trust. (i use this one, because i was too lazy to make new carrier pcb's and cases for the bigger esp32 modules)

tschoenfelder commented 6 months ago

@MetaChuh : Thanks for the update. I will move back to 0.6.9.

And: Thanks for the link. I will get two devices and upgrade the HW. I need to ensure everything to work even after dying, so need a solution to work for the next 16+ years. A I think all you you doing a great job, I'd like to follow the upgrade path.

Have a nice weekend!

MetaChuh commented 6 months ago

@tschoenfelder

many thanks.

@lumapu just made an extra release for the esp8266 especially for this issue. the smaller release includes mqtt and has only the display and history graph removed to save some space.

you can get it from here, if you like to try it regarding stability, until your esp32 d1 minis arrive: fw.ahoydtu.de/dev/ahoy_v0.8.92/ESP8266

direct link to the smaller german firmware: 240310_ahoy_0.8.92_96eb787_esp8266-de.bin

direct link to the smaller english firmware: 240310_ahoy_0.8.92_96eb787_esp8266.bin

lumapu's dev notes:

0.8.92
added new environment `esp8266-all` which replace the original `esp8266`.
The original now only have `MqTT` support
but `Display` and `History` plugins are not included any more
https://github.com/lumapu/ahoy/issues/1451

greetings and a nice weekend to you too.

tschoenfelder commented 6 months ago

@MetaChuh @lumapu Hello,

thanks for the new version. I had planned to stay with the 0.6.9 until the ESP32, but as you took the effort, I installed the new de version and will report on the results. 0.6.9 worked the hole day ... OK, ESP doesn't revert back after update. Will not go out to check now but tomorrow ;_)

Good night!

MetaChuh commented 6 months ago

good morning @tschoenfelder

OK, ESP doesn't revert back after update. Will not go out to check now but tomorrow ;_)

sorry to hear that. i have just updated an esp8266 ahoydtu from v0.6.9 to v0.8.92 via over the air update, just to make sure the firmware works. (i used the german smaller firmware directly from the link above)

the update was successful and the esp8266 booted successfully (see screenshot).

Bildschirmfoto 2024-03-11 um 04 56 17

i then crosschecked a downgrade from v0.8.92 to v0.6.9 via over the air update. except the warning, that the firmware might not be suitable for this platform, a rollback to v0.6.9 worked too (see screenshot time and date)

Bildschirmfoto 2024-03-11 um 05 07 13
tschoenfelder commented 6 months ago

Good morning @MetaChuh ,

I hope you live east from Germany, otherwise you got up quiet early ;_= Thank you for taking the time!

The ESP8266 with one inverter only worked with the up/downgrade very stable, this on has 4 inverters. Both are close to the WLAN repeater with good RSSI, so it may be due to the short memory you mentioned. I tried a repower, but without success. I took it out of the garage and will tasmotize it this night when returning home and keep you in the loop.

Best regards,

MetaChuh commented 6 months ago

@tschoenfelder

hope you live east from Germany, otherwise you got up quiet early ;_= Thank you for taking the time!

unfortunately not, just kids that sometimes wake us up at the most impossible times 😂 (kudos for your thoughts and sharing)

The ESP8266 with one inverter only worked with the up/downgrade very stable, this on has 4 inverters. Both are close to the WLAN repeater with good RSSI, so it may be due to the short memory you mentioned. I tried a repower, but without success. I took it out of the garage and will tasmotize it this night when returning home and keep you in the loop.

we are sorry, if we might have worsened things, by making a new smaller release (@lumapu) and pointing it out (@MetaChuh ) as your setup was working again with using v0.6.9. (insider: hope you live a long and prosper life, longer than all of our combined projects)

please forgive us, it was just to get more experiences, in hope to keep the esp8266 platform up and running for the first adopters and beyond.

many thanks and greetings, metachuh

tschoenfelder commented 6 months ago

Hello @MetaChuh,

no need for sorry or reason to have to forgive! I appreciate all your efforts! I try to do whatever helps you and relieves from searching for the root cause.

Reg. this point: Last evening I tasmotized (without erase) the new, small german version (comming from the english 0.6.9). I received a funny result (pls. take a look at the two version number: ahoy_update I fixed the timezone setting from -12 to -1 (Europe persistet), had to reset the PIN numbers (using the old layout) and did save/reboot. The inverters are seen now, the bottom version number is correct. The german version looks strange after being with english for so long, but everything looks fine!

Thank you!

I will keep you posted!

Best regards, Torsten

tschoenfelder commented 6 months ago

Hello @MetaChuh ,

after the last update I now see right now:

0.8.92 (4 inverter) with MQTT shows: ts uptime 92227 (after last settings saved/reboot). 0.5.66 (1 inverter) with MQTT shows; ts update 317094 (after Hardware Watchdog).

I observed no issues by now.

Thank you!

MetaChuh commented 6 months ago

@tschoenfelder

thank you for your feedback, and glad you have not observed any further issues 👍🙏

note: i'm just a humble janitor & community member, which might or might not be helpful.

on every post at github, the dedicated role of everyone is visible at the right side of the header. eg.: owner (@lumapu) member (permanent member of a project) contributor (all who's personal code was implemented in a project's release and/or branch)

greetings, metachuh

tschoenfelder commented 6 months ago

Good morning,

current state: 0.8.92 (4 inverter) with MQTT shows: ts uptime 176295 (yesterday 92227) (last Software/System restart). 0.5.66 (1 inverter) with MQTT shows; ts update 28779 (yesterday 317094) (last Hardware Watchdog).

So, both do their work, the watchdoc seems to be required on the 0.5.66 version.

@MetaChuh : Understood, But all you do relieves lampu from doing it (like hining me to the ESP32 replace version, the hint for 0.6.9 still being OK and the hint for 0.8.92 ... Together is more than the sum of it's parts. So: Thank you as well (as well as lamapu!)

tschoenfelder commented 6 months ago

I upgraded both systems to 0.8.92 (last on yesterday afternoon). As part of this, I switched D3 and D4 according to current recommendation.

Seems to work from my side. The ESP with 1 inverter receives via REST and auth (empty string as I deactivated the PW for the website) the updates. Looks OK to me now!

Thank you @lumapu @MetaChuh

tschoenfelder commented 5 months ago

Hello all,

again an update. Overall: It seems to work for me being on ESP8266 and 0.8.92-de on both devices. Updates are: 60708 and 60705 with reboots scheduled during night. But no watchdog jumped in.

All I needed is working.

Thank you!

Best regards, Torsten

MetaChuh commented 5 months ago

@tschoenfelder thanks, it's very good to hear that all needed is working. if you are completely satisfied, please close this issue as solved.

thx and greetings metachuh

tschoenfelder commented 5 months ago

Thanks for the support given! Best regards, Torsten