wildlifeai / wildlife-watcher-mobile-app

Mobile app to communicate with the Wildlife Watchers
Other
3 stars 1 forks source link

Improve how the `heartbeat` command works #40

Closed Burzo closed 6 months ago

Burzo commented 6 months ago

According to @acutetech the heartbeat command works as follows:

Heartbeat rate is stored on the device as 1 byte (and can be sent via LoRaWAN as 1 byte). The 2 MS bits select seconds, minutes, hours, days and the 6 LS bits are the number of these. Setting zero turns off heartbeat messages (probably unwise, and there will be practical limits (min and max) on what should be sent by the app and accepted by the device.) So to set the heartbeat you should send messages like: "heartbeat 30s", "heartbeat 25m", "heartbeat 4h", "heartbeat 1d". Rather than sending seconds. If you ask, I can change the response to "get heartbeat" to display in that form (30s, 25m, 4h, 1d).

Let's fix our implementation to reflect the above.