Hi new personal project, just to have a feedback.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
skyark
Posts: 3
Joined: Fri Nov 26, 2021 8:14 pm
Contact:

Hi new personal project, just to have a feedback.

Post by skyark » Tue Jan 04, 2022 4:10 pm

Hi, I'm new in this micropython world, and I'm really interested.

I developed a personal project. It's a over engineering ON/OFF timmer switch for my electric boiler.
It's really simple but I'm trying to take the most of it.
I havent even complete the Read.me section of the github so this is a simple explanation.

The hardware is the Heltec ESP32 Lora v2 with an OLED, 2 button switch for ON/OFF and reset, 1 out that controll a group of rellays an input that confirm that it's ON and a termometter DS18B20.

This report with an MQTT broker (mosquitto 2.0.11) and has 2 json files, one named standby.json that saves the last ON/OFF and timmer state and a secret.json that saves the configuration information needit, like Pub, Sub and address for the mqtt, ntp server address, ssid and password for the wifi and the timmer limit.

The MQTT payload it's send and received in json format with a time stamp.

Use 3 libraries that I found here in the forums mqtt_as, uping and ssd1306.

Most of the commented files are in spanish but it's not that complicated.

Hope you guys can take look and send me a feedback.

https://github.com/skyark21/Boiler_Control_Micropython

User avatar
skyark
Posts: 3
Joined: Fri Nov 26, 2021 8:14 pm
Contact:

Re: Hi new personal project, just to have a feedback.

Post by skyark » Sat Jan 08, 2022 3:10 pm

I was having this problem.

I wasn't notice but the program was rebooting somehow and one time it corrupt the memory flash.
But I could catch a message.

Code: Select all

Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception). 
Debug exception reason: BREAK instr 
Core  0 register dump:
PC      : 0x400803c0  PS      : 0x00060336  A0      : 0x8009240c  A1      : 0x3ffd8230  
A2      : 0x00000003  A3      : 0x00060b23  A4      : 0x00060b20  A5      : 0x00060b23  
A6      : 0x00000001  A7      : 0x00060023  A8      : 0x00000001  A9      : 0x3ffd97b0  
A10     : 0x3ffc3d28  A11     : 0x00000000  A12     : 0x00060d23  A13     : 0x00060d23  
A14     : 0x00000001  A15     : 0x00060023  SAR     : 0x0000001b  EXCCAUSE: 0x00000001  
EXCVADDR: 0x00060d13  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  

Backtrace:0x400803bd:0x3ffd8230 0x40092409:0x3ffcccd0 0x400db412:0x3ffcccf0 0x400db426:0x3ffccd10 0x400db455:0x3ffccd30 0x400e4908:0x3ffccd50 0x400dbedf:0x3ffccdf0 0x400dbf26:0x3ffcce10 0x400dbf86:0x3ffcce40 0x400dba85:0x3ffcce60 0x400e1cad:0x3ffcce80 0x400e1dda:0x3ffccea0 0x400e44c1:0x3ffccec0 0x400dbba0:0x3ffccf60 0x400e1cad:0x3ffccf90 0x400e4419:0x3ffccfb0 0x400dbba0:0x3ffcd050 0x400e1cad:0x3ffcd0b0 0x400e1dda:0x3ffcd0d0 0x400e44c1:0x3ffcd0f0 0x400dbba0:0x3ffcd190 0x400e1cad:0x3ffcd1c0 0x400e1cd6:0x3ffcd1e0 0x400eea47:0x3ffcd200 0x400eedc5:0x3ffcd290 0x400eee29:0x3ffcd2b0 0x400d5481:0x3ffcd2d0


ELF file SHA256: 1cf8b3226081b288

Rebooting...
Making some research found out that the wifi connection was happening in the Core 0, and when you create a async task that intervein with the wifi you can have some problems, and I am doing exactly that with the mqtt_as library.
But checking and testing found out that only happend with qos=1.
I have been testing with the qos=0 and it looks good.
Has anyone expereience somthing like this?

Post Reply