24 - 48 Hours
Posted: Tue Jan 24, 2017 2:48 pm
As a recent exploration into Lua, I've been moving some devices around the house from the Arduino implementation to Lua. I have currently two Lua nodes that report sensor data to a webserver. Now, I'm a fairly experienced programmer and I'll figure it out eventually, but wondering if folks here could point me in the right direction.
The Arduino nodes run for around two months without intervention from me. The Lua ones, so far, about two days. This is likely my fault, however it's not the usual suspects. The heap is fine, and the node does not crash it simply does not post data any more (to be clear, the Arduino nodes on the same network are fine). If I send an HTTP request to it (in its hung state) it then reboots.
Are there issues with the net, socket and tmr modules that make sure the node can't stay up for any length of time? Pretty sure the tmr module is ok as it still fires even though the net and socket modules hang. As an aside, the net module reports 200OK on POST or GET even if network connectivity has been cut. Makes diagnostics somewhat harder.
Is there a stable ROM I should be testing against? Good fun this Lua stuff, just finding it a little hard to get some stability.
The Arduino nodes run for around two months without intervention from me. The Lua ones, so far, about two days. This is likely my fault, however it's not the usual suspects. The heap is fine, and the node does not crash it simply does not post data any more (to be clear, the Arduino nodes on the same network are fine). If I send an HTTP request to it (in its hung state) it then reboots.
Are there issues with the net, socket and tmr modules that make sure the node can't stay up for any length of time? Pretty sure the tmr module is ok as it still fires even though the net and socket modules hang. As an aside, the net module reports 200OK on POST or GET even if network connectivity has been cut. Makes diagnostics somewhat harder.
Is there a stable ROM I should be testing against? Good fun this Lua stuff, just finding it a little hard to get some stability.