@BulldogLowell Happend to me recently too, but was a lot longer than 7 days of operation before it happened. Rebooted the gateway and reloaded vera to correct it. Seems like it would be very difficult to track down the cause since it happens so infrequently but the fact that it happens at all is disconcerting.

@Dan-S. I'm thinking it may be power related. The Ethernet shield is a power glutton and the RF takes its share. I'm using a 5V standard USB cable to power but that may drop off too much if both the radio and the ethernet shield are drawing power.

I'm going to try scoping it with the existing power supply and then try bumping up the power or adding some capacitors to the ethernet shield's power. I tried earlier to power it with 12Volt (1200mA) power supply but the boards just got too damned hot. (that contributes to my worry that the chinese boards i have been buying are really powered correctly).

I think a 9V power supply may improve the situation... When I'm home I'll post the traces with a few power options. We really should have a definitive reference guide to building and powering these gateways and sensors. It may be difficult though, due to the possible number of varieties available for purchase.

One thing I really want to focus on for the MySensors extension is reliability. Version 1.4.1 seems to solve the radio problems for me, but I would like to solve my intermittent gateway issues. It doesn't seem to be in software, since so many others don't complain about losing the connection to their ethernet gateway.

Since so many folks suffer from power issues... this may be a fun thing to focus on so that many can benefit.

I agree that it is likely a power issue. I am using a 9v regulated power supply for the UNO/Ethernet board combo and a separate standard 5v smartphone power supply (regulated to 3.3v by an AMS117) to power the radio to try to eliminate any power issues. Maybe that's why my setup lasts longer between failures.

@BulldogLowell
I experienced a similar problem a few months ago. The problem is that the MySensors-plugin sets the failure flag (luup.set_failure(true)) and the only way to reset this is to restart/reload Vera. It should be possible and rather simple to implement a reset button in the plugin to restart only the plugin.
But I wanted the plugin to try to restart by itself and created a keep-alive function to test communication and if that fails even to try to reset the communication. This is done by trying to reopen the connection to the gateway, which only can be done by the plugin.

I copied and pasted a little from the lua-file and found some other stuff about keep alive-functions/timers on the internet.

I changed the L_Arduino.lua in the following way:

Add these lines of code to the end of the startup function just before 'end':

This function now tries to reopen the connection to the gateway when the plugin can't send a command to the gateway. If even this doesn't work it sets the failure flag as before. NOTICE that I use "Variable5" in my VariableContainer with ID #18. Remove these lines or adjust them to your situation!!

Last thing you have to do is to add the function openConnectionToGateway which you can put right before sendCommandWithMessageType:

function openConnectionToGateway()
log("openConnectionToGateway()")
-- Set the last update in a human readable form for display on the console
local timestamp = os.time()
local variable = tVeraTypes["LAST_UPDATE"]
local unit = luup.variable_get(ARDUINO_SID, "Unit", ARDUINO_DEVICE)
local timeFormat = (unit == 'M' and '%H:%M' or '%I:%M %p')
luup.variable_set("urn:upnp-org:serviceId:VContainer1","Variable4",os.date(timeFormat, timestamp),18)
-- End
local ipa = luup.devices[ARDUINO_DEVICE].ip
local ipAddress = string.match(ipa, '^(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)')
local ipPort = string.match(ipa, ':(%d+)$')
if (ipAddress ~= nil) then
if (ipPort == nil) then ipPort = IP_PORT end
log('Using network connection: IP address is '..ipAddress..':'..ipPort)
luup.io.open(ARDUINO_DEVICE, ipAddress, ipPort)
end
end

This function takes care of reopening the connection to the gateway. NOTICE that I use "Variable4" of my VariableContainer with ID #18 to show the moment this function was called. Remove this code or adjust it to your situation!!

Don't know if this it what you want but it works perfectly for me! Never had to reload Vera because of the gateway loosing connection for a short moment of time!

@BulldogLowell
Oh, I'm sorry! I missed the line where you wrote that you have to restart the gateway to get it to work again. In my case it was sufficient to reload Vera. So my solution probably won't help you...

Very strange though that you are able to ping the gateway but that there is no communication with the plugin. What happens when you reload Vera? Do you get the error-message immediatly or after some longer time?

The only place in the lua-code of the plugin where this error message is set is in the function sendCommandWithMessageType when luup.io.write(cmd) is failing.
In theory this should be solved by reloading Vera, unless your communication is still failing.
You might want to examine (read: Google) what could be the cause of luup.io.write() to fail.

Just to add that I am using 1.4.1 library and SOFTSPI was defined when compiling the EthernetGateway. And since the EthernetGateway responds to ping and receives sensor values I assumes it is working properly.

Is there another way to confirm the proper operation e.g. with telnet to the port 5003 or how to issue similar simulated request that Vera does when calling getVersion?

ok great thread as I want to also change to an Ethernet gw
But here is the rookie question, after there has been a ping to the gw there is lots of info shown in these dissussions ie unit8 .....
o;0;3;9 read.....
and many others, at this time it is mostly gibberish to me but have looked at the mysensors ver 1.4
I just want to understand and learn what you guys are posting and why.
One silly last question is I am using lib 1.4 is the github download now lib 1.4.1? and do I need to upgrade?
Yes this old dog is still learning!, it is a blast the people are very helpful.