OpenMQTT Gateway 1.6 MQTT ESP restart not working consistently

Status: Hardware Version: LYWSD03MMC B1.7, Software Version: 4.4

Sensor in LowPower Mode X
Advertising Type = PVVX (Custom) AdFlags X
Advertising Interval = 2500ms
Measure Interval = 2
Connect latency = 1000ms
RF TX Power = VANT+0.04dbm

Custom config HEX string: 55911000002802a9313104b400

Here is a BLE firmware without the WebUI, as the issue seems to appears when sending data to the WebUI. Could you try it ?

To update:

  1. Download the firmware from here and unzip it from the smartphone/computer you are going to use to connect to the ESP32

  2. Erase the ESP32 within the WebUI (Configuration-> Reset configuration)

  3. Connect to the Web portal access point from your smartphone/computer

  4. Click Update, select the firmware file and wait a few minutes until you get “Update successfull”

  5. Reconfigure the board into the Web portal access point

It’s running now. I will report back.

It’s still throwing exceptions:

N: Send on /SYStoMQTT msg {“uptime”:1803,“version”:“version_tag”,“disc”:false,“ohdisc”:false,“env”:“esp32dev-ble”,“freemem”:105044,“mqttp”:“1883”,“mqtts”:false,“msgprc”:174,“msgblck”:0,“maxq”:4,“minmem”:49072,“tempc”:62.78,“freestck”:2340,“eth”:false,“rssi”:-55,“SSID”:“XXXXXX”,“BSSID”:“XX:XX:EB:A0:3E:41”,“ip”:“”,“mac”:“XX:XX:F9:CE:72:B4”,“lowpowermode”:-1,“modules”:[“BT”]}
N: Send on /BTtoMQTT msg {“bleconnect”:true,“interval”:55555,“adaptivescan”:true,“intervalacts”:55555,“intervalcnct”:3600000,“scanduration”:10000,“onlysensors”:false,“randommacs”:false,“hasspresence”:false,“prestopic”:“presence/”,“presuseuuid”:false,“minrssi”:-100,“extDecoderEnable”:false,“extDecoderTopic”:“undecoded”,“filterConnectable”:false,“pubadvdata”:false,“pubuuid4topic”:false,“ignoreWBlist”:false,“presenceawaytimer”:120000,“movingtimer”:60000,“forcepscn”:false,“tskstck”:2648,“crstck”:4020,“enabled”:true,“scnct”:28}
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400d7c60 PS : 0x00060830 A0 : 0x800d7cfa A1 : 0x3ffcff60
A2 : 0x3ffd0000 A3 : 0x00000001 A4 : 0x0000003a A5 : 0x3ffd0000
A6 : 0x00001908 A7 : 0x00000000 A8 : 0x800d7c58 A9 : 0x3ffcff40
A10 : 0x3ffd0000 A11 : 0x0000007b A12 : 0x00000028 A13 : 0x3ffd0028
A14 : 0x00001908 A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000000d LBEG : 0x40091ced LEND : 0x40091cfd LCOUNT : 0xffffffff

Backtrace: 0x400d7c5d:0x3ffcff60 0x400d7cf7:0x3ffcff80 0x400e4d0a:0x3ffd0050 0x400e4de7:0x3ffd0420 0x401ca6c3:0x3ffd0440 0x400e6239:0x3ffd0460 0x400ddbc9:0x3ffd04a0 0x40113789:0x3ffd04e0

ELF file SHA256: 0dae531a2e4b44e5

ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
entry 0x400805e4
************* WELCOME TO OpenMQTTGateway **************
[ 169][E][Preferences.cpp:50] begin(): nvs_open failed: NOT_FOUND

It’s throwing an exception at scan 28. I have bleconnect set to false.

@1technophile It’s been throwing exceptions randomly. Any other ideas?

@1technophile I hope you can get the instability figured out. I like the idea of a multiprotocol gateway but the instability is a serious problem. I have two other identical ESP32 modules running TasmotaBLE listening to the same devices that haven’t reset at all.

Hi @pwm802,

Which BLE devices do you have that you are receiving and decoding with OpenMQTTGateway? I’m wondering if it has to do with a specific device decoding issue.

Also, do you you a white-list to restrict the decoding of only your devices? As possibly some neighbour’s or passing devices might cause this? If you are not using a white-list would you mind setting one, restricted to the MAC addresses of your own devices, to see if the behaviour changes at all?

1 Like

My issue is that I don’t reproduce this.
I need to flash my LYWSD03MMC with the same version as yours but it will take time due to the holiday time.

I have some other non sensor BLE devices within range of the OpenMQTT and TasmotaBLE modules. I will set up a whitelist of the LYWSD03MMC sensors and retest.

@1technophile @DigiH Based on what I saw on forum posting, I tried to setup a white list via MQTT and I did not see any response from the device in the console or MQTT. It does not appear to use the white list after publishing the list via MQTT.

Here is what I sent via MQTT.fx:


{“white-list” : [“A4:C1:38:00:XX:XX”, “A4:C1:38:63:XX:XX”, “A4:C1:38:D7:XX:XX”, “A4:C1:38:12:XX:XX”]}

I’m clearly missing something.

I’m pretty sure your gateway name is different to the example default OpenMQTTGateway :wink:

You can see the correct gateway name in the incoming topic of the MQTT messages, usually depending on which binary you installed.

Yes indeed. Too much cut and paste.

@DigiH @1technophile It’s still throwing exceptions with the white list.

@1technophile Did you ever get around to flashing that LYWSD03MMC firmware?

Not yet, let me try I will update here

I have updated to version 4.6

4:31:20 PM: Hardware Version: LYWSD03MMC B1.4, Software Version: 4.6, Sensor: SHTC3 (SHTV3)
4:31:20 PM: Custom config HEX string: 55851000002802a9313180b400

And don’t have restarts for now

If you are not having restarts then I guess the other non sensor BLE devices in range might be the causing the restarts but even with a whitelist, it would reset.

Did you try to update your LYWSD03MMC?

I will try updating the LYWSD03MMC firmware next week.