Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heishamon is no longer accessible #587

Open
martinstein1964 opened this issue Nov 20, 2024 · 15 comments
Open

heishamon is no longer accessible #587

martinstein1964 opened this issue Nov 20, 2024 · 15 comments

Comments

@martinstein1964
Copy link

Hello, unfortunately I have had problems with the connection for 1 week.
After about 10 hours, heishamon is no longer accessible and no longer returns data to Home Assistant. After a restart, the connection will then run again for a few hours. Whether over Wi-Fi, lan, with external power supply or without.
What about?
Love Greetings
Martin Steinmann

@MiG-41
Copy link
Contributor

MiG-41 commented Nov 21, 2024

What kind of version you have ?
Reset done how ?

@martinstein1964
Copy link
Author

Heishamon Large V5 with firmware 3.6.

@MiG-41
Copy link
Contributor

MiG-41 commented Nov 22, 2024

So nothing will happen if you update it to 3.8 https://github.com/IgorYbema/HeishaMon/tree/main/binaries/model-type-large

But if this is still happening , you will nedd to make more logs ,what is going on.

@IgorYbema
Copy link
Contributor

Are you using MQTT only? Or also web-calls? The webserver code has a bug which causes heishamon to freeze sometimes. Try not to use the webserver and web-calls to see if that helps

@Raab4884
Copy link

Hallo,

meine große Platine findet das WLAN nicht mehr.

Ich kann auch kein Reset machen.

@krzbor
Copy link

krzbor commented Nov 29, 2024

For me, HeishaMon had been working flawlessly for over a month. Unfortunately, since yesterday, problems started to appear – very infrequent reporting, frequent connection restarts with the MQTT broker, and occasional ESP reboots. It was practically impossible to connect to HeishaMon. Ping showed 70-100% packet loss and very long response times. Clearly, something was wrong with the WiFi.

So, I turned off the router and restarted the ESP. In AP mode, everything worked perfectly and very quickly. After restarting in STA mode, the problems returned. The solution turned out to be:

Turning off the WiFi router,
Restarting the ESP,
Connecting in AP mode,
Starting the WiFi router and waiting a few minutes for it to fully boot,
In HeishaMon (in settings), reselecting my network and saving the changes,
Restarting the ESP.

After this, everything started working. I suspect there’s a bug in the program related to enabling dual-mode AP+STA. When I had trouble connecting, I could see the HeishaMon WiFi, even though it shouldn’t be visible (as it should be operating in STA mode at the time).

Ultimately, I disabled the "Enable WiFi hotspot when not connected" option, and I hope this will resolve the problem. I’ve already performed one software restart, and everything worked correctly.

@IgorYbema
Copy link
Contributor

It is indeed possible to see the the AP when it should be only on STA. But that should not impact the performance. This is a bug and I still need to fix that.
But what could be possible is that it was running on another wifi network with same SSID and password. Do you have multiple wifi AP's?
Currently heishamon with v3.8 will only pick the first SSID it finds that matches. It doesn't check for the quality. So maybe it connected to another station further away

@krzbor
Copy link

krzbor commented Nov 30, 2024

I know that STA+AP generally do not cause issues. However, for me, it was a signal that something was wrong after the restart. Practically, it was impossible to connect to HeishaMon; free memory dropped to 10% (normally, it's at 70%). There were sporadic responses to pings, constant connections to the MQTT broker, and virtually no communication through the web application. Restarts every few hours. It was pure chaos.

Such behavior of the ESP8266 often indicates a failure to yield control back to the processor (via yield() or delay(0)), which should be done no less frequently than every 50ms. Otherwise, WiFi-related issues start to arise. However, in this case, it might be that direct access code was activated in AP mode along with access code in STA mode, creating some massive confusion.

@IgorYbema
Copy link
Contributor

Owh you are using the small heishamon, as you are talking about the ESP8266?

@krzbor
Copy link

krzbor commented Nov 30, 2024

Yes, small heishamon

@IgorYbema
Copy link
Contributor

I did see AP+STA enabled on the ESP32 (large) heishamon and was looking to fix that. But I haven't seen that issue on the ESP8266 version before. I'll check that too

@Raab4884
Copy link

Raab4884 commented Nov 30, 2024 via email

@IgorYbema
Copy link
Contributor

@Raab4884
can you try reflash the software using USB-C cable and https://espressif.github.io/esptool-js/
you need the firmware file: https://github.com/IgorYbema/HeishaMon/blob/main/binaries/model-type-large/HeishaMon.ino.esp32-v3.8.complete.bin
flash it to address 0x000 (tool defaults to 0x1000)

@Raab4884
Copy link

Raab4884 commented Nov 30, 2024 via email

@IgorYbema
Copy link
Contributor

Hallo,

meine große Platine findet das WLAN nicht mehr.

Ich kann auch kein Reset machen.

@Raab4884 you said this. But now you say it actually works? Then you don't need to reflash.

"flash it to address 0x000 (tool defaults to 0x1000)" means when you use the flash tool for reinstalling the firmware file, make sure you flash it to that address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants