Hi,
I am running a simple PIR motion sensor with MQTT using mosquitto broker.
The problem is everything seems to be working fine. Except one thing.
When I enter the callback loop, after receiving a Particular message from the broker, I enter a second Function. But when i do mqtt publish, it does not publish a message.
More simplified, this is my process:
Enter callback.
Receive message from broker
IF (message == "xyz")
user_defined_function();
This user defined function runs the PIR sensor operation and i need it to publish as soon as motion is detected. It does glow a led when motion is detected. But it is not publishing.
What can be the problem?