dh1tw / remoteRotator

remoteRotator lets you expose a local antenna rotator (azimuth / elevation) to the network
MIT License
44 stars 5 forks source link

WebUI: occasionally rotators disappear randomly #18

Closed dh1tw closed 4 years ago

dh1tw commented 4 years ago

Using remoteRotator version v0.5.2 using nats as the messaging broker.

Symtoms: Randomly a rotator disappears and reappears from the WebUI within the same moment. The log states:

2020-04-20 00:45:52.664425 I | removed rotator (Tower2)
2020-04-20 00:45:52.799524 I | added rotator (Tower2)
dh1tw commented 4 years ago

As it turns out, each service (rotator) is broadcasting a message to a registry topic every 10 seconds, confirming that it is still available. There is an independent go-routine which checks in certain intervals if those broadcasts from the registered services (rotators) have been received. Unfortunately, the interval is set also to 10 seconds which can create this rapid disappearing and re-appearing of a rotator within the WebUI. This has been mainly observed in systems where the webUI is running on a different machine somewhere else on the internet (outside the local network).

This problem has been fixed with commit 2bca895 and will be included in version v0.5.3.