mc0110 / inetbox2mqtt

communicate over mqtt protocol to simulate a truma inetbox
MIT License
85 stars 18 forks source link

MemoryError: memory allocation failed, allocating 776 bytes #55

Closed lembnau closed 5 months ago

lembnau commented 1 year ago

Hi,

nach ein paar Stunden bekomme ich im seriellen Monitor (Putty) diesen Fehler und es findet keine Kommunication mehr statt

mc0110 commented 1 year ago

which device? which mode (os-mode or standard)? what do you mean with "no communication" -> http, mqtt, lin

mc0110 commented 1 year ago

Normally, when you are in http-communication, you see this more often (unfortunately, the chips don't have enough RAM and micropython unfortunately packs the "normal" code into the RAM area

lembnau commented 1 year ago

Error

This is the log

mc0110 commented 1 year ago

The error is not really a software error. A memory error is triggered when you try to fetch the subscription. This is not possible in the versions that is in the repo. Without a complete log and details about the version and also the hardware you are using, I can’t help.

Carstens-Paulette commented 6 months ago

IT seams that I have the same issue. I will try to get some detailed logs about it. In case, the ESP is simply running out of memory, how to deal with it? One approach would be to switch off the controller by the MQTT receiver. Im my case the VenusOS, which fortunatly have relays. Or is it possible to reset the ESP on low memory?

Follow up to be expected.

kind regards

Carsten O.

mc0110 commented 6 months ago

Hi Carsten,

that is very unlikely. Inetbox2mqtt is now very often used and has been tested for many months. Are you using the LAN connection and the WOMOLIN hardware? I really need the logs and the point at which the ESP32 exits. I myself run the code on an RPI, which has a larger RAM area. Jan has used the newer ESP32s, but the memory is switched via a mapping, which the micropython does not support.

Carstens-Paulette commented 6 months ago

In the moment, the connection is by WiFi. If I connect my laptop to my router by cable, the LED on the router lights, connecting the TiN-Controller, the LED stays off. I think, I first have to enable the physical EtherNet Port of the WomoLiN TiN-Copntroller.

`Der Ethernet PHY verwendet den KSZ8081RNA-Chip, der eine externe Taktquelle (25 MHz) benötigt, die über den IO16-Pin des ESP32 bereitgestellt werden muss.

Um das Ethernet PHY zu konfigurieren, wird folgender IDF Software Befehl verwendet: eth->phy_reg_write(eth, ksz80xx->addr, 0x1f, 0x80)

found in: https://gitlab.womolin.de/public-repository/esp32-lin-software `

I hope to supply more and deeper information at the weekend.