widapro / wledPixel

Dot matrix panel management
MIT License
66 stars 12 forks source link

MQTT config after reboot is empty #24

Closed doreks closed 9 months ago

doreks commented 1 year ago

hi!

first of all, congratulations on the development of this wonderful project.

I have a WeMos D1 Mini (esp8266), pro model. everything works perfectly, but I have noticed that working with mqtt in client mode, every time the wemos is restarted it loses the configuration of the mqtt server and its user/password

i have configured two zones , both of them from 0 to 4.

any idea why im facing this issue?

AchimFelsdrache commented 1 year ago

thats my Problem to. And after a reboot the working mode is from mqttclient to manual.

martusi61 commented 1 year ago

Also I lose username and password in the mqtt fields

AchimFelsdrache commented 1 year ago

yes thats is my problem also

doreks commented 1 year ago

We just can wait for the fix.

widapro commented 1 year ago

Thanks for your feedback. I also faced this problem. I am currently working on a solution. As a temporary solution, I propose to return to the previous version of the firmware.

martusi61 commented 1 year ago

Grazie per il tuo feedback. Ho anche affrontato questo problema. Attualmente sto lavorando a una soluzione. Come soluzione temporanea, propongo di tornare alla versione precedente del firmware.

Thanks Widapro, actually that's what I did, version 2.4 is more stable.

peetje2729 commented 1 year ago

thanks for the nice project. I found if you add a extra zone and not use it. it wil work. It only doesn't save the last zone

widapro commented 1 year ago

Could you please test this new version? I made some changes to the algorithms for saving and reading the configuration from memory. Everything has been working correctly on my device for a day now, without reboots, and all settings are saved after a power outage. wledPixel-v2.5.1b_WeMos_D1_mini.esp8266.bin.zip

peetje2729 commented 1 year ago

Hi, I installed 2.5.1b and it remembers the settings but on my display it stops and keep showing the ipnumber.

martusi61 commented 1 year ago

I decided to upgrade to 2.5.1b, but it's true that it doesn't lose the other configurations anymore, but the number of lines keeps disappearing blocking the whole display. It happens all the time,it is unusable for me. He'll go back to 2.3, despite the problems he worked better.

widapro commented 1 year ago

but the number of lines keeps disappearing blocking the whole display

Could you please make a picture of it? Because I don't clear understand what lines are blocking your display.

martusi61 commented 1 year ago

sorry, I wrote wrong, it is the number of zones that from 2 should be passed to "null"

martusi61 commented 1 year ago

Screenshot_20230222-034105~2 The number of zones which is currently "2" becomes empty, and the lines of the zones become 3. Obviously the firmware is no longer able to correctly address my two lines of display and freezes. It also happens with the current 2.3 version, but very rarely.

martusi61 commented 1 year ago

Screenshot_20230222-091803~2 This is what the problem looks like, to fix I have to fix the number of zones to 2 and apply

widapro commented 1 year ago

Check out this version: wledPixel-v2.5.2b_WeMos_D1_mini.esp8266.bin.zip I changed filesystem type, now it's lighter than before. I hope it helps prevent erasing config after rebooting.

@martusi61 I did some changes in UI to fix your issue. Please test it too.

martusi61 commented 1 year ago

Grazie per il tuo lavoro, l'ho appena installato, ti farò sapere. Quando tutto sarà funzionante, sarebbe utile aggiungere il salvataggio della configurazione.

widapro commented 1 year ago

Could you also guys help me to test this version: wledPixel-v2.5.3b_WeMos_D1_mini.esp8266.bin.zip

I changed the approach of mounting FS. Now it mounts only when required to read or write a config file. And all other times FS does not mount at all. It should rescue memory which is not enough for all operations.

martusi61 commented 1 year ago

to I was trying 2.5.2b but after a few hours Ok, the displays froze, the web interface doesn't work, ]all the parameters are wrong, sometimes they also contain random numbers, i have photo.. At the moment I have flashed version 2.3 and reconfiguring it is working I don't know for how long. Now I will try 2.5.3b. Thanks, I'll let you know.

martusi61 commented 1 year ago

After three days of continuous testing I can confirm that the problem has disappeared, the display has never frozen and the configuration has never been lost again. Thanks a lot for your work.

martusi61 commented 1 year ago

but today a strange thing happened, I found the display turned off and the WemosD1Mini restarting all the time. I solved by reprogramming the device again with your latest beta version 2.5.2b, then I reloaded the configuration and for now it has started working properly again. I will keep you informed about other situations. Thank you very much and good job.

martusi61 commented 1 year ago

unfortunately yesterday on my return from outside, I found the display restarting continuously, I reprogrammed it again with the 252b and reloaded the configuration.

martusi61 commented 1 year ago

Today I'm back reverted to 2.5.3b

martusi61 commented 1 year ago

Unfortunately v.2.5.3b stopped working today. After a perfect few hours it started clearing the configuration of the rows only. But everytime I put it back by fixing it to 2 lines after a minute or two it loses it again resulting in a leak. I also tried to reload the firmware, but without success, nothing changes, so it is unusable.

martusi61 commented 1 year ago

After resetting the row configuration a great many times. everything has inexplicably stabilized, now v.2.5.3b works again perfectly.

widapro commented 1 year ago

Thank you very much for your feedback @martusi61 ! I have two identical devices (both on vemos d1 mini). The firmware for both devices is the same, the latest. They are located in different places. So one device behaves similar to your scenario, and the second device has been working stably without any problems for more than a week. I noticed that the problem device is having difficulty with the wifi signal, the signal is weak. Perhaps this is where the problem lies. I continue to test and observe.

martusi61 commented 1 year ago

Thank you for your commitment. I just got home and found the display off again and the wemos D1 Mini restarting continuously, this time I reloaded v.2.5. My wifi is 5 meters away, plus I live alone in the mountains, I have no interference! I also can't understand.

martusi61 commented 1 year ago

I'm thinking... I have a display with 2 lines of 4 modules each which will have a certain current absorption despite keeping the brightness very low, Now let's assume that the absorption is excessive for the pins of the Wemos D1 Mini, could it not cause very different instability based on the specifications of the LEDs used? What do you think about it?

martusi61 commented 1 year ago

I checked some datasheets and I saw 2 things: I don't think there are current problems on the serial link, the Wemos supports up to 12mA per pin, however for the single display modules it seems that typically 320mA is needed with a maximum of 500mA , which multiplying by 8, are how many I have, they give me about 2,560 - 4,000 mA and they are not few, this good absorption could create voltage drops that would affect the functioning of the Wemos, in fact it requires at least 4.3 volts and a maximum of 6 volts. I want to try to change power supply to see what happens with the latest v.2.5.3b.

martusi61 commented 1 year ago

Now I've gone back to version 2.5.3b and changed power supply, this one should be more powerful.

martusi61 commented 1 year ago

Again, display off and Wemos D1 Mini constantly resetting itself. I reprogrammed with 2.5.3b but of the two rows of 4 max7219 modules I turned on only one. So now I've halved the current demand.

martusi61 commented 1 year ago

After 4 days of stability I can say that the problem hasn't occurred again. For this result I had to change the power supply and I turned on only one line of my display with the clock made up of 4 MAX7219 modules. The next step will be to understand if it's a power problem or the code that allows MQTT, in fact now I'll turn on the second line of the display with a second clock. I'll let you know.

martusi61 commented 1 year ago

Up to this point the display has worked fine, so it wasn't a power problem. Now I'm reconfiguring the second row with MQTT, and I also activated the connection to home assistant,we'll see what happens, I will let you know. Meanwhile, I noticed that the clock, compared to the home assistant, is 5 seconds behind, why? How do I sync it?

martusi61 commented 1 year ago

Here we are, after enabling MQTT the problem reappeared, I found the display turned off and the WemosD1Mini resetting continuously I'm quite sure that there is some bug in the code that manages MQTT, in fact in the past I had already opened a problem, by sending sequences of characters,coming from notifications from my Home Assistant, the system would reboot. That's where you need to look. I look forward to hearing from you.

martusi61 commented 1 year ago

After the last reset, I re-enabled MQTT but turned off sending home assistant notifications and it's working fine. Currently on display only some information is sent, such as temperatures, dates and more, but no longer the text of the Home Assistant's persistent notifications. I am now sure that some characters or sequences excessive number of strings, can cause code corruption.

widapro commented 9 months ago

A lot of stability improvements were made in the new release. Please check it: https://github.com/widapro/wledPixel/releases/tag/v2.6

martusi61 commented 9 months ago

I have already installed it and have it in testing, to be safe I have limited the length of the strings to 90 characters.