ESP8266 WiFi gateway port for MySensors
-
I managed to upload on mac, but had to fiddle around before I got it working.
Added this text after my experience.
"This NodeMCU board normally can be flashed automatically and shouldn't need bootload/reset buttons to be pressed. If you see error, try changing baudrate from from 9600 to 57600. Still problems? Hold flash and press reset. Start upload in IDE while keeping flash-button pressed until upload starts." -
I followed the steps above, and I'm even able to upload sketches, however I only get this in serial monitor:
load 0x4010f000, len 1264, room 16Bad module maybe?
EDIT: After choosing the right board (v.1.0) and applying the fix above from @fleinze, it seems it is working now...
-
Hi,
I'm having problems running ESP8266 gateway. When I reset my nodes or trying send command from controller to node (dimmer, realy etc.) my gateway reset itself. I try using different ESP-s (I'm using ESP-12), power supplys and radio modules.
On serial monitor I get this error:

-
Hi,
I'm having problems running ESP8266 gateway. When I reset my nodes or trying send command from controller to node (dimmer, realy etc.) my gateway reset itself. I try using different ESP-s (I'm using ESP-12), power supplys and radio modules.
On serial monitor I get this error:

@krajcl What catches my eye is the client command echoed by the gateway: "Client 0: 44;255;3;0;6;"
The 0 at the end seems to be missing -- This could be a gateway issue (are you using the standard ESP gateway sketch, or did you make any modifications?) which causes e.g. the command parser to crash.Could you give a more detailed description of your setup? Which controller are you using, what does the network look like (nr. of sensors, repeaters etc.).
-
-
@Yveaux I'm using standard ESP gateway sketch (I reinstalled Arduino IDE, download latest mysensors library). At the moment I'm using MYSController as controler (for testing), I only have one node active (standard humidity sketch - only changed node id).
@krajcl The last command from the controller seems to be a response to the sensor to indicate metric or imperial units are used (internal command 6). The payload should be either 'M' or 'I'.
I'm not familiar with MYSController, but is there some setting influencing the unit system? Can you check if it has a valid value?
I can't replay the situation right now, so anything you can do yourself to track the problem would really help. -
I'm definitely not a expert at all on the topic, but could it be that a ftdi-usb adapter doesn't provide enough power to ESP, and it eventually hangs when wi-fi transmissions drawn too much power? (according to the specs, ~150mA when transmitting) .
Just trying to help with some (probably dumb) brainstorming. ;-)
-
@Yveaux I tried function (clear routing table) in MYSConroller. This is result:
Client 0: 0;0;3;0;10;C
Client 0: 6;0;3;0;10;Cctx: cont
sp: 3ffeabe0 end: 3ffeaf20 offset: 01b0When I try this function for gateway, evrything works fine, but for other nodes - gateway resets
-
@Yveaux I tried function (clear routing table) in MYSConroller. This is result:
Client 0: 0;0;3;0;10;C
Client 0: 6;0;3;0;10;Cctx: cont
sp: 3ffeabe0 end: 3ffeaf20 offset: 01b0When I try this function for gateway, evrything works fine, but for other nodes - gateway resets
@krajcl When this message is addressed to the gateway (0;0;3;0;10;C) it does not get sent over the air by the radio.
When you send it to node 6 (6;0;3;0;10;C), it will send the message to the node, using the radio.Can you please answer this: Will it crash with just any message sent to the nodes using the radio, or only when sending internal messages to nodes (internal messages to nodes have the first value unequal to 0 and the third value set to 3, like 6;x;3;x;x;x) ?
-
Is it possible to set a fixed IP adress and bypass DHCP? My router sometimes messes up his DHCP-table and reassigns all adresses. Then I would have to correct the IP in my controller which I want to avoid.
@Anduril The ESP8266 Arduino port uses the same API as the standard Arduino WiFi library.
This means you should be able to use WiFi.config() to set a fixed IP address.Change the following line in Esp8266Gateway.ino
(void)WiFi.begin(ssid, pass);into something like (untested!):
IPAddress ip(192, 168, 0, 123); /* Set to whatever IP address you'd like the gateway to have */ WiFi.config(ip); (void)WiFi.begin(ssid, pass);Please report back your experience!
-
I got this working on an 0.9 version of the nodeMCU ( the Yellow board ). It has some code upload issues, which are slightly worse on OS X than Linux, but usually a couple of tries with holding down the button as @hek mentioned usually does the trick. I do not have any TCP/IP clients pointed at it currently, but I also get lots of watch dog timer resets, which seem somewhat random, as it will run and log messages for somewhere between 15 mins and 10 hours.
It is just being powered by USB and I have not swapped NRF modules yet, so one of those may likely be the culprit, but just wanted to chime in with a (mostly) successful setup.
thanx
-
Hello all,
is there anybody setup MQTT gateway and it's working fine? how many node wifi gateway can handle?
Could you please share me Wifi MQTT Gateway code.
Thank you all and have a nice day
