WiFi MQTTGateway
-
it is possible to make so NRF24L01+ -> ESP8266 instead of (WIZNET (W5100) ETHERNET MODULE and ENC28J60 ETHERNET MODULE)
-
Most probably, but someone needs to hack this together.
-
I have a working prototype. In the near future I will present it
-
I did it.
But rules this forum do not allow show my project. However, you can find it on the web: wifi gateway mysensors
-
@LuckyFIA
A commercial solution without the source would not a be real solution for me...
-
@Timurufa
Have you found a solution?On the ESP8266 you can run NodeMCU which supports MQTT. It should be quite simple to develop a lua-script on the ESP8266, which would act as gateway between a Mysensors-Serial-Gateway and MQTT.
-
The Arduino port for ESP8266 (https://github.com/esp8266/Arduino) has made major progress over the last months.
It should be relatively easy to get MySensors running on ESP8266 Arduino and either bridge the serial protocol or run an MQTT broker/client on it.
-
It seems that the MySensors library is heavily targeted at the AVR architecture. I'm trying to make it compile for the ESP8266 Arduino, but it will take time.
-
If you look at the development branch some hardware separation has been done. Should be much easier to port for the ESP.
-
Maybe in the first phase we can use an Arduino as an intermediate and use the serial gateway to talk with the esp and only implement (what is already implemented by this chip community) the WiFi and MQTT connectivity.
-
I was playing with NodeMCU on the ESP8266. With lua-script I could send and recieve MQTT messages via serial port to mosquitto.
Plan a: modify http://forum.mysensors.org/topic/524/mqtt-client-gateway/27
- remove pubsubclient
- remove ethernet support
- use serial communication to the ESP8266 to send and recieve MQTT messages
- write lua startup scripts for ESP8266
Plan b: use the original serial gateway sketch on the arduino and implement the logic on the ESP8266 with https://github.com/esp8266/Arduino. As pubsubclient is working on the ESP8266, the mqtt client gateway sketch should be easy portable to the ESP8266.
Please vote for plan a or b.
-
I was thinking about doing same thing, but during summer. I have no time for moment. And don't know if I will success. What I think:
- Luckyfia idea is interesting. I have done a small board to plug Huzzah8266 with atsha+rfm69+nrf but it is not tested : https://github.com/scalz/MySensors-HW/tree/master/MysensorsGW_huzzah (I need to add a power connector)
- I think a MQTT client GW would be interesting because we could let Mosquitto manage. But a MQTT Broker GW is interesting too of course.
- for porting, I know that souliss have already done some work to implement some libs (radio...) on esp. Maybe it could help...
- I would prefer connect rf module with spi to esp like LuckyFia did . Maybe it is in my head, but I think maybe comm would be faster and better managed...But I think it is much more work.
A or B??? very similar, but maybe B is cleaner. I don't know.
It is very interesting project. Maybe I am wrong but with MQTT we could have easily multi GW with multi radio type in same network (of course if GW is MQTT client).
-
@scalz said:
I...
It is very interesting project. Maybe I am wrong but with MQTT we could have easily multi GW with multi radio type in same network (of course if GW is MQTT client).You are not wrong. MQTT is the integration hub in my setup and I have multiple sensors/actors:
- mysensors NRF24L01+
- mysensors RFM69 (not yet tested)
- netatmo
- homematic (with homegear)
- FritzBox telephony
- router (Edgerouter, to disable/enable internet for specific IPs)
- pushover
- OpenHab
'Wiring' between the different systems is done with node-red.
Porting the whole library to ESP8266 is to much work for me.
-
nice setup. I use jeedom (I like it, it is very powerful and compatible with lot of things too) and sure node-red is a good addition to controllers, for some tasks or it can help to dev some plugins I think.
for esp8266, I don't know very well esp yet, but I was software developer, so it's just a question of time I think. And you are right, it needs lot of work. Too bad LuckyFia has not shared it.But we will get same thing I hope.
-
@FotoFieber I found NodeMCU to be highly instable. Random crashes, watchdog timeouts etc etc... Very frustrating...
Arduino port seems to much more mature.
-
Managed to run MySensors on ESP8266 (RF24 connected to HSPI of ESP8266): I'm using the dev branch with some nasty hacks here and there - but so far so good. Tested RepeaterNode and SerialGateway sketch - both working. Currently testing core functionality. PR to be prepared.
-
-
wow. it is a good news. I'll follow your work for sure.
thank you for sharing. there are smart guys here I think. it is great
-
Great to hear you're making progress!
Not sure it will help you, but there is some ongoing work in this branch that might be interesting for you:
https://github.com/mysensors/Arduino/tree/gateway-refactoring/libraries/MySensors
This branch allows the gateway node to be a sensor as well and an embryo for cleaning up the gateway transport and protocol layers.
Currently only support serial and ethernet (as client) but I guess it could be helpful when running on the esp as well.
-
Excellent progress.
Waiting to see this...
-
@tekka hello, any progress on the ESP8266 gateway ?
Can you pls share some code (even if it's incomplete/hacked)
Thanks
-
@Manolis-N please continue in this thread:http://forum.mysensors.org/topic/1870/esp8266-wifi-gateway-port-for-mysensors/1