Chat freely about anything...

User avatar
By penright
#85580 Been messing around with ESP-Now that I need for a battery push-button. It sends a message via ESP-Now to a gateway. The gateway will forward an MQTT message. It confused me some until I connected the dots. Sometimes it would work and others it would not. After displaying the WFI channel that the gateway connected to the AP and reading that ESP-Now is locked to the connect to AP. Make sense one radio one channel. I have not forced my AP to channel 1, I hope it does not have any interference. Even if I could change ESP-Now client to a different channel, which I don't think I can, I have the issue of figuring out which one the gateway is currently running on.

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.