When the movement sensor detects a movement (and it is marked as armed) the ESP i am using NodeMCU lost the connection to MQTT server and don’t response. I have uploaded the same code you put and i guess i have the same circuit š
Any feedback about it?
2 Answers
More information.. after execute theĀ client.publish(“home/office/esp1/motion/notification”, “MOTION DETECTED”);
I lost the connection to the MQTT server… (my mqtt uses user and password) and start to receive this
Attempting MQTT connection…
failed, rc=-2 try again in 5 seconds
Hi Cesar,
I need more informationĀ about your setup.
- Can you post your codeĀ on Pastebin.com?
- Everything else is working properly? For examples,Ā the sensor is posting data to the Node-RED UI?
- When you click the Arm button, do you receive the armed message back in the Node-RED UI?
Thanks