RobinMeis / Junkers_1-2-4_ESP32

Ein ESP32 Arduino Sketch für die Steuerung einer Junkers Gastherme an einer 1-2-4 Schnittstelle
https://robin.meis.space/2019/07/03/junkers-therme-mit-wlan/
15 stars 6 forks source link

ESP reset loop #4

Open SayBello opened 3 months ago

SayBello commented 3 months ago

Hello,

i tryed your code and endet up in reset loop. After a while i found a solution for me. By moving the mqttConnect() function in the firmware setup

` PubSubClient client(espClient);

`

void setup() { .... .....
//mqttConnect(); / / client.setServer( MQTT_SERVER, //Server MQTT_PORT //Port ); client.connect( "heater", MQTT_USER, //Username MQTT_PASSWORD, //Username "heater/status", //Will Topic 2, //Will QoS 1, //Will retain "Offline" //Will message );

client.publish("heater/status", "Online", true); //Report as online subscribe(); client.setCallback(callback);

....... ....... ` it works for me,

Deutsch geht auch ;-)

SayBello commented 3 months ago

change in mqtt

bool mqttConnect()

to

void mqttConnect()

does the trick