Moteino Gateway Dashboard stopped updating node info

Started by Tony Weil, January 20, 2018, 09:08:54 PM

Tony Weil

I have a Pi Gateway running 8.10, MightyHat and several WeatherShield nodes that have been working for months. Today, one of the nodes stopped updating the web based Moteino Gateway Dashboard. I tried "Restarting app" from the Moteino Gateway Dashboard Menu several times, but it still did not update the Dashboard. I could see on the MightyHat LCD display that the node was communicating with the Gateway. I also tried replacing the battery, restarting the node, and watching it transmit from the Serial Monitor, but no luck. Although this seems unrelated, at the time the node stopped updating, I was making changes to a user-metrics.js file in the UserMetrics directory, creating both well and poorly written events (I was learning), "Restarting app" from the  Moteino Gateway Dashboard Menu, and applying the Events to the node in question.

I finally just deleted the node on the Moteino Gateway Dashboard, and the next time the node transmitted, it updated the Dashboard display. In hindsight, I probably should have tried rebooting the Pi Gateway and MightyHat as a last resort. If it had worked, I might not have lost data for the node. Any idea why the Gateway stopped updating the node's info and how I could have recovered more gracefully?

Thanks,
Tony

PS: Are there any write-ups about editing the metrics.js or a user-metrics.js file? I'm stumbling along reasonably well so far.


Felix

Hey Tony,

Could be several reasons, but if the nodes are still communicating to your MHat, it means the RF side is OK and something's going on with the Pi.
If you changed code, that could fail partially or totally. Look for clues in gateway.sys.log for any errors.
If a new/custom/changed user metric fails, the gateway will likely still load but that metric will not show anymore (since it's broken).
A bad SD card, can make it appear as things work when in fact certain things don't, like writing to the SD, a bit elusive to debug. If the SD card is failing, it will require a reinstall.

In such cases, the only certain way to debug is to start from a "known working set". Then add/remove the parts you customize to ensure those did not break something. Beyond that it can be the system (likely) or hardware (unlikely).

I don't have documentation on the code itself, except the comments and the mightyHat and Gateway page.