Ribbit-Network / ribbit-network-frog-software

The software for the Ribbit Network Frog Sensor
https://www.ribbitnetwork.org/
MIT License
9 stars 8 forks source link

Create aggregated sensor message #37

Closed keenanjohnson closed 1 year ago

keenanjohnson commented 1 year ago

Why

We need to find a way to connect the new V4 sensor software to the database used for the V1-3 sensors so that they show up on the public map: https://dashboard.ribbitnetwork.org/

How

As discussed on Discord, there are two possible paths:

The second option is advantageous as it eliminates the need for the sensors to hold the InfluxDB write key, which is a bit of a security risk.

In order to achieve this, the sensor should publish only one message to Golioth's LightDB service that contains the current state of all sensors. This eliminates the need for a complex backend service to aggregate the messages and hold the required state to write a datapoint into influxDB.

Testing

I have tested this on a test golioth fleet and confirmed all is well:

image
keenanjohnson commented 1 year ago

Hey @damz I know you might still be traveling, but will you be able to take a look at this soon?

keenanjohnson commented 1 year ago

It's been a few weeks, so I am going to merge this now to get the current v4 sensors hooked up to the map.