Serial Gateway restarting
My serial Gateway (2.1.1) is restarting in some situations. I have already replaced the hardware. It is running on an 3.3V Arduino. I am using an uncostomized version of the serial gateway sketch. Only the baud rate is reduced because of the 8 Mhz Arduino. The recommended capacitor is in place. I am using the "Newbie PCB" with an dedicated voltage regulator.
After some testing it seems that the restarts always occur when the gateway fails to transmit a message to a node. I had one node that was temporary offline. This node is normaly activated via some lua scripts in domotics. While it was offline this always caused a gateway restart.
2017-04-19 23:27:00.450 EventSystem: Event triggered: Heizung Arbeitszimmer_2 2017-04-19 23:27:00.600 MySensors: Gateway Ready... 2017-04-19 23:27:00.676 MySensors: Gateway Version: 2.1.1 2017-04-19 23:27:01.801 MySensors: Gateway Ready... 2017-04-19 23:27:01.877 MySensors: Gateway Version: 2.1.1
I have an LED actuator node which is only reliably reachable via a repeater. It seems like the gateway tries to reach it directly which sometimes fails. In these situations the switching is delayed by about 2 seconds and according to the logs the gateway restarts.
This does not occur with nodes near the gateway.
Is this a bug or expected behaviour? Or am I doing something completely wrong?
boozz last edited by
I now and then experience the same, but in my case it seems that a lack of messages sent to the gateway cause the restart
try to define parent id on the far node so that it always tries to connect via the repeater and see what happens
Does this affect messages sent from the gateway to the node, too? I found nothing in the documentation about this.
it affects the node that always uses the repeater and doesn't try to reach for the gateway directly.
and add the ID of the repeater
This has improved the overall latency for my node much, thanks.
Anyway the serial gateway still seems a little buggy regarding the handling of broken messages, right?
What do you mean?
It should not restart.
Ok, then it must be something else. Don't you have a regular Uno to try?
The restarts seem to have stopped after setting a static parent. But the gateway should never restart because of some failed transmission imho.
Ok, now I can reproduce another bug that causes the serial gateway to restart:
2017-04-26 11:09:51.760 MySensors: Node: 14, Sketch Name: Molgan 2017-04-26 11:09:51.761 MySensors: Node: 14, Sketch Version: 1.0 2017-04-26 11:09:51.780 (MySensorsGw1) Lighting 2 (Security Sensor) 2017-04-26 11:09:51.928 MySensors: Gateway Ready... 2017-04-26 11:09:52.004 MySensors: Gateway Version: 2.1.1
I have built several nodes based on the Ikea Molgan hack
I am using the included sketch without modifications.
Every time one of these nodes starts up, the gateway restarts. Without a starting Molgan node I did not see a single gateway restart for 24 hours.
@Jan-Gatzke There's nothing special about the Molgan sketch, so I seriously doubt the Molgan causing a gateway restart.
To be able to really help, we'll need more info:
- What radio are you using?
- Are you also using MySensors 2.1.1 to build your sensors?
- You state you're using a "dedicated voltage regulator". For what? What do you use as power supply?
- Foto's of your setup; it has helped others in the past...
Initially you reported restarting issues when the gateway tried to sent to nodes which were offline. For an nRF24 this causes the radio to excessive retry sending each message, placing a burden on the power supply. My first guess would be you have a power supply issue on the gateway.
Another thing you could try is running your gateway on a 16Mhz ATMega. In general the gateway is the part in your network that needs to process the most data, and therefore would require a 'powerful' processor.
- Radio is nrf24l01. The version with antenna and pa + lna . http://www.ebay.de/itm/272260489477?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT .I have wrapped it in aluminum foil which improved the communications much. MY_RF24_PA_LEVEL is set to RF24_PA_HIGH.
- Yes, most of my nodes including the molgans are also 2.1.1. Some other nodes are still 1.8.
- I am using Rev 7 of this board: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors . I have connected it to the 5V Line of my Raspberry Pi. Power Supply is good, the rpi runs fine and stable. On the board there is a 3.3V regulator + the recommended capacitors. I also have an additional capacitor (47 uF) soldered directly to the nrf.
@Jan-Gatzke Perform following tests (in this order):
- Test with a regular nRF24L01, non-amplified
- Power from a separate 5V power supply
- I assume you're using the suggested LE33ACZ? It can only supply 100mA (if you get the original ones, not China clones) and the amplified nRF24 is said to draw over 100mA. You wouldn't be the first having issues (see here). Try powering from a separate 3V3 power supply, bypassing the regulator on the Easy/newbie PCB.
Do you see a difference between 1.8 and 2.1.1 Molgans?
oops, missed this limitation of the LE33. I will replace it by an ASM1117 and test again. Thx.
@Jan-Gatzke Please perform the other tests first!
Also make sure to get a real AMS1117,! I've got some China clones that have a hard time producing even 100mA...
@Yveaux I really don't know whether this is a genuine chip. But I can still reproduce the problem after replacing the LE33. Tested with a non amplified nrf24, too. Same problem.
I have restarted two other nodes with an older version of mysensors (2.0 or 1.8). The gateway did not restart.
@Jan-Gatzke so it doesn't reproduce then? Or only with 2.1.1?
Correct. I have tested this with some other nodes. This seems only a problem with the molgan nodes. Even other nodes with 2.1.1 work without problems. Differences I see with the Molgans is the use of the internal oscillator and the use of the smd version of the nrf.