💬 Building an Ethernet Gateway
-
The first one will not compile since the #include <SPI.h> is missing
-
Hello guys,
Can anyone help me with modify this to work with W5500 Ethernet module?
Please advice us what need to be modified and why it needs to be modified.
Thanks you very much.@WizarDEAD the information in https://forum.mysensors.org/topic/2901/my-ethernet-gateway-board-w5500 might be useful.
-
Hi Guys,
I'm using a Wiznet W5100 Ethernet module.
The pins are described as following (I added a numbering myself:

The MySensors Gateway uses different terms, am I 'translating' them correctly?

@Chucky_69
Looks right! -
Maybe I just overlooked that, but is it possible to statically define netmask and gateway in the sketch? I'm using ENC28J60.
-
@mfalkvidd , yes I also found this in MQTT GW example, thanks.
This seems to be not working on my ENC28J60 - as I can see the the default gateway setting is not taken into account. I will test with W5100.Edit: I confirm that these settings work properly with W5100, just tested.
-
I just spent a long time troubleshooting my problems trying to set this up and I thought I would share. I followed this tutorial and everything was a breeze except my unit kept rebooting and I couldn't figure out why. I thought for the longest time it was the power supply but it ended up being the version of Arduino IDE I was using. I found some answers https://forum.mysensors.org/topic/4628/solved-mysensors-2-0-ethernet-gateway-enc28j60-restart-ip-issue/46 and https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time that got me down the right path. I downgraded to "Arduino IDE 1.6.11" and that worked. I completely uninstalled arduino from my system and just started over with the older version. I assembled everything as I had done before and it just fired right up. The mysensors library I used was 2.0.0 and again it all worked perfectly. I was amazed. I didnt have to comment out the debug or do anything other than follow the tutorial EXCEPT only use 1.6.11 to upload it all.
Hope this helps someone in the future. -
I just spent a long time troubleshooting my problems trying to set this up and I thought I would share. I followed this tutorial and everything was a breeze except my unit kept rebooting and I couldn't figure out why. I thought for the longest time it was the power supply but it ended up being the version of Arduino IDE I was using. I found some answers https://forum.mysensors.org/topic/4628/solved-mysensors-2-0-ethernet-gateway-enc28j60-restart-ip-issue/46 and https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time that got me down the right path. I downgraded to "Arduino IDE 1.6.11" and that worked. I completely uninstalled arduino from my system and just started over with the older version. I assembled everything as I had done before and it just fired right up. The mysensors library I used was 2.0.0 and again it all worked perfectly. I was amazed. I didnt have to comment out the debug or do anything other than follow the tutorial EXCEPT only use 1.6.11 to upload it all.
Hope this helps someone in the future.@hoggin At least according to my experience, just downgrading the AVR Board Definitions to <=1.6.11 using the Board-Manager within an recent version of the IDE should have done the trick; downgrade of the other libs including mysensors (2.1.1) was not necessary.
In Addition: For the serial Gateways this kind of trouble seems to be solved since version 1.6.18 of the AVR-Board definitions (shipped since several weeks).
-
@hoggin At least according to my experience, just downgrading the AVR Board Definitions to <=1.6.11 using the Board-Manager within an recent version of the IDE should have done the trick; downgrade of the other libs including mysensors (2.1.1) was not necessary.
In Addition: For the serial Gateways this kind of trouble seems to be solved since version 1.6.18 of the AVR-Board definitions (shipped since several weeks).
-
@rejoe2 Perhaps you are correct. I am not nearly as well versed in this stuff as others. I was working on the Ethernet project so I didn't spend much time messing with the serial end of it.
@hoggin I don't have experience with the ethernet part and just wanted to point out that your solution may be a little "overdone" (but I'm not sure about that).
Anyhow: Perhaps you should add a remark wrt. to this to your other post doubling the info you wrote here to avoid others doing tho long round instead of the direct way? -
-
I have a Vera but I'm moving some of my stuff over to OpenHab. So on one side I was using the standard W5100 GateWay on the other I need the MQTT GateWay. The major difference is in the "define MY_PORT" one is 5003 and the other is 1883. Is there a way to do both? Thanks.
-
@mpp said:
Would it be possible to build an MQTT gateway using the ESP8266 WiFi Gateway?
Yes, the MQTT gateway works on ESP as well.
-
@hek just tested the gateway sketch on an esp with an rfm69 and it looks really promising. Would it be possible to communicate with moteino's or do I have to create arduino+rfm69 nodes running the mysensor sketch?
Moteino is a low power wireless Arduino compatible development platform based on the popular ATmega328p chip used in the Arduino-UNO, making it 100% compatible with the Arduino IDE (programming environment) ... They are compatible with any other Arduino clones that use the popular HopeRF RFM69 transceiver
so they should work just fine. Just upload one of the MySensors example sketches to the moteino and try.