WiFi2MQTT
Feb 03rd, 2020 | by: Paul EnrightCategory: Electronics Basic Circuits

Create a Zigbee like network using the ESP-Now protocol.
The sensors will use the ESP-Now to talk to a gateway that will then publish MQTT messages that Home Automations can consume. My Home Automation of choice is HomeAssistant. I don't think that should affect any design decessions, but I wanted to be full disclosure.
While I am waiting for parts to do the soft-switch, I am creating a branch to experiment with the gateway detecting the second press. Since the node is powered only when the button it press (currently) then maybe if the node is still running after a second, then it sends a second message. The gateway would then send a long-press MQTT message.
PHOTO GALLERY
The first two pictures show my current testing ESP-12.
I have hack up a perfboard with an ESP-12F.
While doing the first one I missed the pull-up/down resistors. SO I had to hack some resistors on to my hack.
The second one was a little more thought out with lessons learned from the first try.
The video shows how fast you boot, send a message.
The screen in the background is showing what and when the gateway receives a message.
You can look at the led on the node board (one shown in video) for how long the button is pressed.
It is tied to power and is independent of the ESP.
The 4th picture is of the board I was making to test in real life.
The ESP-12F module that on it was one that I tried to wire up as the second one, but I mess up and had solder splashes.
I can it to load the sketch, and according to the serial debug monitor, it is sending the message via ESP-Now.
But I am not seeing it arrive at the gateway. I may have messed up the antenna or I have it too close to the perfboard.
I saw where someone said they had an issue when the ESP is too close to the battery. The said you have to be away from metal the distance of the length of the antenna.
I have ordered some ESP developer boards and more ESP-12F. So this is on hold for now, but you can get an idea of where I am heading.
I will do some custom PCB for the final design.
→
←

GateWay, Node, and cable (Power/Programmer)

First Button board with battery
Noob 19129
Please try a hrefhttpswwwgooglecomGooglea before asking about a hrefhttpswwwweseematsucomforumphpmodviewthreadtid7086pid3083294page3165extrapage3D1pid3083294Useful Product Websitea 5f79e0b