toblum / McLighting

The ESP8266 based multi-client lighting gadget
MIT License
1.05k stars 289 forks source link

MQTT Only works first time after compiling sketch #471

Open MaikoHermans opened 4 years ago

MaikoHermans commented 4 years ago

I just started using McLighting today figured I would spare myself the programming for the esp01s. I've enabled MQTT_HOME_ASSISTANT_SUPPORT so that I can use this to catch the mqtt messages with HAPNodeJS and also send messages to it.

What I did so far is test this all by monitoring my mqtt and sending commands on the home/<hostname>_ha/state/in channel. This works fine when I install the code on a clean esp01s (or whip everything from a esp incl WiFi settings). I'll connect to the esp wifi setup my wifi connection and mqtt connection (for which i use a local ip address for example: 192.168.1.20).

When I do this i see that what i push on the mqtt channel changes the LED. but if i then disconnect the esp from power and power it up again. none of the MQTT stuff is working other then the messages that are being persisted at startup. nothing is coming in and whatever i publish isn't handled.

does anyone know what could be going on?