daniel-jong / esp8266_p1meter

DSMR5 P1 meter to mqtt using esp8266
GNU General Public License v3.0
145 stars 54 forks source link

how to change settings, troubleshoot? #28

Open thijsdeschildre opened 1 year ago

thijsdeschildre commented 1 year ago

The MCU won't connect to MQTT. I can't figure out how to access or change the settings. After a lot of searching, I figured out the option "erase flash: all flash contents" erases all settings, so I can start from a blank config again. I enabled debugging for as many things as possible, and it doesn't show any relevant data for why MQTT connections fail. Home Assistant's mosquitto log also fails to show anything relevant.

On the serial output I get:

23:14:43.629 -> MQTT connecting to: Homeassistant.local:1883
23:14:43.629 -> MQTT connection attempt 1 / 10 ...
23:14:43.768 -> :ref 1
23:14:46.791 -> :urn 47
23:14:46.791 -> :urd 2, 47, 0
23:14:46.791 -> :urd 1, 47, 2
23:14:46.791 -> :urd 1, 47, 3
23:14:46.791 -> :urd 2, 47, 4
23:14:46.791 -> :urd 2, 47, 6
23:14:46.791 -> :urd 2, 47, 8
23:14:46.791 -> :urd 2, 47, 10
23:14:48.985 -> :ctmo
23:14:48.985 -> :abort
23:14:48.985 -> :ur 1
23:14:48.985 -> :dsrcv 0
23:14:48.985 -> :del
23:14:48.985 -> MQTT Connection failed: rc=-2