Right now I am playing with the button on the sensor supplying power to the ESP then it sends the ESP-Now message. Then it just goes into a do-nothing loop waiting for the button release. My plan is to create a soft-switch that once the button is press, the ESP will execute until it turns itself off. I am waiting on parts to test that. Even then the button message has to be fast after the gateway sends the MQTT, then my home automation needs to react, example turn on/off a light.
Right now I am playing with the button on the sensor supplying power to the ESP then it sends the ESP-Now message. Then it just goes into a do-nothing loop waiting for the button release. My plan is to create a soft-switch that once the button is press, the ESP will execute until it turns itself off. I am waiting on parts to test that. Even then the button message has to be fast after the gateway sends the MQTT, then my home automation needs to react, example turn on/off a light.