gmag11 / EnigmaIOT

Secure sensor and gateway platform based on ESP8266 and ESP32
https://gmag11.github.io/EnigmaIOT
MIT License
237 stars 48 forks source link

FR: Is there a way to seperate MQTT client from ESP-Now controller? #51

Open JoostAB opened 1 year ago

JoostAB commented 1 year ago

I was wondering if there is already a way implemented to seperate MQTT client from ESP-Now controller, so that I can build the gateway from two seperate esp's. That way the ESP-Now network can use it's own channel. I searched the code but could not find it.

dgcasana commented 1 year ago

At this moment the Esp-Now channel (WiFi) is already selected when configuring the gateway so you can use a different channel than your WiFi, I do not know if that is your question. On the other hand in examples you have "GatewayDummy" in which you could implement for example an output to serial port, (in the first version 0.5 two esp8266 communicated per serial port were used one for Esp-Now and another for WiFi / mqtt). An implementation with serial port output would be very good, I would connect it directly to my raspberry, removing load to mqtt (tasmota, zigbee2mqtt ...)

JoostAB commented 1 year ago

Problem is that the wifi channel can change. In that case the esp-now channel has to follow. I know a node will search for the controller if it can't connect on the old channel, but there will be a down-time. Also, with a lot of nodes the esp-now network will interfere with your wifi if it's using the same channel. Why was that changed after 0.5?

JoostAB commented 1 year ago

I forked the repo and I'll see if I have time to create a two-step gateway option.

rajtan commented 3 weeks ago

I have not tried it with EnigmaIOT but did successfully test it with other esp-now test runs. You may use serial communication (may be softserial as well). You send the esp-now messages or the messaages to be published to serial port, which is connected to other microcontroller or computer, wherein you run a serial listening server. Upon successful transfer of message to the port (you may optionally add CRC) you simply publish it from the MQTT client on the other system.

dgcasana commented 2 weeks ago

On earlier versions (until 0.5) EnigmaIot works whit two ESP8266, one for EspNow, one for mqtt (WiFi) connected by serial port. Maybe you were referring to this

El sáb, 15 jun 2024, 21:02, rajtan @.***> escribió:

I have not tried it with EnigmaIOT but did successfully test it with other esp-now test runs. You may use serial communication (may be softserial as well). You send the esp-now messages or the messaages to be published to serial port, which is connected to other microcontroller or computer, wherein you run a serial listening server. Upon successful transfer of message to the port (you may optionally add CRC) you simply publish it from the MQTT client on the other system.

— Reply to this email directly, view it on GitHub https://github.com/gmag11/EnigmaIOT/issues/51#issuecomment-2170533187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7NRUMGDRRH655UKZGHZRTZHSFVZAVCNFSM6AAAAABJL5CF7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZQGUZTGMJYG4 . You are receiving this because you commented.Message ID: @.***>