mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 90 forks source link

Gateway Last Seen #465

Closed seant100 closed 5 years ago

seant100 commented 5 years ago

The gateway last seen is never updated and after some time it says the gateway is "Down" with the red icon. All other sensor nodes are working.

jkandasa commented 5 years ago

@seant100 I have added a fix for this issue. You can check with SNAPSHOT version.

When a gateway node(node Id: 0), goes down. Gateway will be reloaded. Status updated wrongly. I hope I have fixed this wrong status update.

jkandasa commented 5 years ago

@seant100 I tested this in my environment for the last 5 days. works well. If you see this issue in your environment kindly reopen this issue.

seant100 commented 5 years ago

@jkandasa Sorry for the delay. I installed the latest snapshot today and checked 2 hours later and the Gateway node is down. So the problem is still there. Also, you state you trigger a reload when the node goes down. I have rules setup that send me an email if a node goes down. So that method means I will still get Gateway is down emails. Can you not assume a Gateway is working if any of its Nodes are working. Since all traffic essentially comes from the Gateway then you can set the "Last Seen" on the Gateway when ANY data is received from any node.

seant100 commented 5 years ago

@jkandasa I just added a sendHeartbeat() and wait(60000); into the gateway sketches loop. That seems to work fine now so far ...