Combining Serial and MQTT/Ethernet Gateway
-
Hello,
I'm about to make my first gateway and since I want the flexibility to switch controller, since I'm note sure if I want to run Indigo or OpenHAB, I thought of building a gateway that has the Ethernet module installed on the board. Then if I want to use it as a serial gateway for Indigo I can just re-flash the Arduino with the Serial Gateway firmware instead, and if I want to use MQTT or Ethernet - I'll just re-flash with those firmwares.
Now since the radio needs to be soldered differently on the Ethernet/MQTT gateway, is it sufficient to just change the pin locations in the Serial firmware? In other words I'll just change the following line:
MyGateway gw(DEFAULT_CE_PIN, DEFAULT_CS_PIN, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, 6, 5, 4);
To:
MyGateway gw(5, 6, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN);
Is that correct? I'm not sure what the 6, 5, 4 pins are for though?
Also: Is it possible to hook up the MQTT gateway into the router instead, and still let the controller interact with it?
-
Or you can compile the serial gateway with SOFTSPI enabled if you don't want to rewire.
-
@hek Hmm, what do you mean? That I build the Ethernet Gateway, and when I want to Serial fw, I compile it with SOFTSPI so I don't need to change pin locations?
-
I made a GW sketch that could handle serial and ethernet simultaneously (by reboot). If ethernet cannot obtain IP through DHCP (cable not inserted) it reverts to acting as serial GW. Unfortunately, ethernet GW sketch with DHCP is too big to fit an Arduino Nano without some form of tweaking to the code (on development branch). For that reason I have not published my sketch.
But it is not that difficult to merge the two sketches anyway if you wanted to try it.
-
any chance you can send me the dual serial/ethernet code?
Thanks
-
@lafleur I abandoned it due to the fact that my Nano cannot fit it together with signing support.
Suggested Topics
-
Stabile Controller
Troubleshooting • 5 Mar 2015, 14:08 • C.r.a.z.y. 8 Mar 2015, 15:34 -
Openhab2 + MySensors MQTTClientGateway + discovery
Development • 22 Sept 2016, 15:30 • CrankyCoder 22 Sept 2016, 18:47 -
Switching from v1.5 MQTT gateway to ESP8266 MQTT Client gateway
OpenHAB • 1 Feb 2016, 18:41 • mbj 8 Mar 2016, 22:07 -
My final setup to get MySensors and OpenHab communicating via MQTT
OpenHAB • 28 Jul 2016, 04:10 • Eric Buhring 21 Jun 2017, 20:06 -
💬 MDMSGate
OpenHardware.io • 10 Jul 2016, 19:42 • openhardware.io 2 Jul 2019, 06:44 -
WizNet5100 ethernet module chip temperature
Troubleshooting • 21 Jan 2015, 17:08 • bomber 25 Jan 2015, 22:13 -
ESP8266MQTTClientGateway
Bug Reports • 30 Jan 2016, 10:26 • mbj 30 Jan 2016, 14:16