ESP8266 as Node via MQTT
I would like to ask for some help!
My idea is to have ESPs nodes with connected sensors or with relays around the house. They would communicate with Mycontroller running on orangepi.
I managed to do so, I used the Mqttgatewayclient sketch, undefined the radio part.
It works like charm, but as soon as I activate another node, it will have the same nodeID(0) as the first node even though I defined the MY_NODEID 2.
So the controller doesn't know what to do, it mixes the data from the 2 (or more) nodes.
Probably gateways always will be nodeid 0. What do you think where can I modify the source code to use the defined nodeid when sending or receiving messages via mqtt?
@blacksheepinc it should be possible to use the mqtt prefix to distinguish between different nodes. No need to modify the library code.
Yeah, I see it now. It works, thanks!
But as for curiosity, would it be too difficult to modify as I mentioned?
I will try to mimic mysensors message api with a simple esp pub/sub library to have more control for my need soon.
would it be too difficult to modify as I mentioned?
I don't know