MQTT Gateway - Stuck on "Started!"
-
Arduino IDE: 1.6.5
OS: Windows 8.1
MySensor Library: 1.4I started out by wiring up the W5100 Ethernet Module, NRF24L01+, and DCcduino UNO (Arduino Uno Clone) as per the Ethernet Gateway guide (http://www.mysensors.org/build/ethernet_gateway). I then:
-
Downloaded the 1.4 MySensors Library from http://www.mysensors.org/download/
-
Unzipped the Arduino-Master.zip file and copied the "Libraries" folder in to my sketch book folder.
-
Restarted the Arduino IDE and loaded the MQTT Sketch
-
Defined a static IP and port
#define TCP_PORT 1884 IPAddress TCP_IP ( 192, 168, 1, 50 ); byte TCP_MAC[] = { 0x02, 0xDE, 0xAD, 0x00, 0x00, 0x42 };I am using 1884 so it dos't conflict with my existing Mosquitto MQTT Server
- I edited RF24_config.h to enable soft-spi
/*** USER DEFINES: ***/ //#define FAILURE_HANDLING //#define SERIAL_DEBUG #define MINIMAL //#define SPI_UART #define SOFTSPI /**********************/When I upload the sketch everything seems to load fine. I can ping the gateway and get a valid response. When I look at the serial monitor window all I see is
Started!I am pretty sure there should be more in the serial monitor window. I am not able to connect to the gateway with a MQTT Client though (using MQTTlens Chrome App). I don't have any sensors online yet, just trying to get the MQTT Gateway up and running and then test using it with OpenHAB (or maybe HomeGenie).
Looking for some assistance, troubleshooting steps, etc. Any help is appreciated. Thanks!
-
-
I also started with the MQTT gateway without success. I use the w5100 Ethernet Module with NRF24L01+ and arduino pro mini as it is shown in the image below:

As you can see the Ethernet LEDs are on and in general TX and RX are flashing. However, I cannot ping the gateway and the IP that I selected is not shown in my router.
Pro minis LED is also always on and I suspect that this is an error. When I look at the serial monitor window I see only:
Started!When I start openhab, I get "Error starting broker connection" and I also fail to connect to MQTT with MQTT.fx.
Do you have any suggestions on troubleshooting? I have triple checked all the wiring, power supply etc.
Update:
I connected the w5100 Ethernet Module to an Arduino UNO and verified that it works properly. -
Arduino IDE: 1.6.5
OS: Windows 8.1
MySensor Library: 1.4I started out by wiring up the W5100 Ethernet Module, NRF24L01+, and DCcduino UNO (Arduino Uno Clone) as per the Ethernet Gateway guide (http://www.mysensors.org/build/ethernet_gateway). I then:
-
Downloaded the 1.4 MySensors Library from http://www.mysensors.org/download/
-
Unzipped the Arduino-Master.zip file and copied the "Libraries" folder in to my sketch book folder.
-
Restarted the Arduino IDE and loaded the MQTT Sketch
-
Defined a static IP and port
#define TCP_PORT 1884 IPAddress TCP_IP ( 192, 168, 1, 50 ); byte TCP_MAC[] = { 0x02, 0xDE, 0xAD, 0x00, 0x00, 0x42 };I am using 1884 so it dos't conflict with my existing Mosquitto MQTT Server
- I edited RF24_config.h to enable soft-spi
/*** USER DEFINES: ***/ //#define FAILURE_HANDLING //#define SERIAL_DEBUG #define MINIMAL //#define SPI_UART #define SOFTSPI /**********************/When I upload the sketch everything seems to load fine. I can ping the gateway and get a valid response. When I look at the serial monitor window all I see is
Started!I am pretty sure there should be more in the serial monitor window. I am not able to connect to the gateway with a MQTT Client though (using MQTTlens Chrome App). I don't have any sensors online yet, just trying to get the MQTT Gateway up and running and then test using it with OpenHAB (or maybe HomeGenie).
Looking for some assistance, troubleshooting steps, etc. Any help is appreciated. Thanks!
-
-
I had a similar problem, when I used the voltage regulator of my arduino and I had to use a separate regulator. Do you have enough power for the ethernet module?
-
Hi FotoFieber,
I can confirm it´s not a power issue:
-Ethernet is connected to 5V
-When using the MySensors Ethernet Gateway Sketch with my setup, everything is working fine. Because I would like to use Openhab and MQTT I need to use the MySensors MQTT Gateway Sketch. And here I have the problem that no MQTT messages come in, the only output I get from Serial monitor is "Started!".So I am using a Nano and because of my ENC28J Ethernet module I use the UIPEthernet Library instead of the Ethernet Library. I am pretty sure it´s some code problem.
-
I have already done that. Although the Ethernet module works correctly (I've checked that with a simple Ethernet sketch) either the Ethernet or the MQTT gateway seems to work. The only message I get on the serial monitor is something like started, yet I cannot ping the gateway.
-
@siod I am using the W5100 Ethernet module so there is no need to change the library. Funny thing...I just compiled bot MQTT and Ethernet GW without any problems. They seem to work and I finally can ping them.:bowtie:
The only thing that I changed is that now I use an official Arduino UNO and not the pro minis. I will try the circuit with the mini again and I will update my post.
-
W5100, sure, should have read your first post again. No need for the UIPEthernet library, of course.
Ok, thanks for the hint, as I am using a nano testing with an uno could be an option. Will wait for your updated post first...
@siod I tried again with an unofficial Arduino UNO R3. None of the gateways is working. I get the same symptoms with the pro minis (which are also unofficial boards from China).
- Could someone comment of the official/unofficial board issue?
- I suppose it could be useful to start a compatibility list for the gateways.
UPDATE: I attach a picture with the two boards that do not work correctly with the Ethernet and the MQTT gateway sketch. I managed to compile and upload the sketches to the boards without any problem. In the serial monitor I get the proper message showing that the GW has started, however I cannot ping it.
UPDATE 2: I removed the photos that I have posted earlier since all the boards seem to work correctly. See post below.
-
@hek I am pretty sure that this is not the case. I have a quite decent power supply. Attached is a picture of my stone age 10MHz oscilloscope. Although old with some tilt issues (I have to fix that) it is quite enough for identifying a poor power supply. As you can see there are no decoupling issues.

UPDATE: Finally, after experimenting for more than a week, the gateway seems to work even with the unofficial Arduino boards! Unfortunately I don't know what the problem was. I would blame the power supply but the gw now works with all boards and with three different power supplies (bench power supply, PC usb port and cell phone chargers), including those (cell charger, desktop usb port and laptop usb port) I was using before.
In case i find what the problem was I will post it here. Of course I now have to get the gw working with one of the software controllers, probably with Domoticz.
Thanks for your contributions!
-
mmh, that´s very strange. Did you change anything in your code? I can´t test right now but will give you more info the next days.
-
Uploaded sketch on my original Arduino Uno, made same connections, did not change anything in the code:
- Serial Monitor is showing nothing -.-
edit: can I use an Uno using the same code for the nano? :suspect:
edit2: Testing Nano again. Unconnected Ethernet module from nano, still only geting "Started!" message. Uploaded Ethernet Gateway Sketch and everything is fine again. -> So it must have to do sth. with the code. :hurtrealbad:
edit3: Now tested different nanos, still the same problem with every Nano. Holy, I don´t have any more ideas...:finnadie:edit4: I shit bricks...I downloaded the whole MySensors Library again, installed it and uploaded the sketch again: IT WORKS ! ! ! :feelsgood:
Some file must have been missing...WTF. Well, thanks anyway guys, have fun with your sensors. :godmode: -
Not as tidy as other gateways, yet its something. I got bored and didn't open holes for LEDs. I'll do it after I am sure that it works. For the moment I am able to ping it successfully. I am thinking now that an Arduino nano is more appropriate for a GW. The USB port can be used to monitor and reflash the gateway.

PS. I am pretty sure now that the power supply was the problem. The AC to DC unit that I was using (12V) could provide just 0.5 Amps an probably this is not enough for all the components to work properly. Has anyone measured what is the max current required from such a GW?