@@ -23,6 +23,7 @@ type ProvenceData struct {
|
|||||||
CO2PPM int `json:"co2_ppm"`
|
CO2PPM int `json:"co2_ppm"`
|
||||||
Temp float64 `json:"temp"`
|
Temp float64 `json:"temp"`
|
||||||
Humidity int `json:"humidity"`
|
Humidity int `json:"humidity"`
|
||||||
|
Battery int `json:"battery"`
|
||||||
Window bool `json:"window"`
|
Window bool `json:"window"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +136,8 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("[Main] Received gateway=%s node=%s -> campus=%s room=%s\n", gatewayID, nodeID, campus, room)
|
batteryLevel := dp.GetValues().Battery
|
||||||
|
log.Printf("[Main] Received gateway=%s node=%s -> campus=%s room=%s (Battery %d%%)\n", gatewayID, nodeID, campus, room, batteryLevel)
|
||||||
|
|
||||||
// Re-create the datapoint with campus/room tags for Influx
|
// Re-create the datapoint with campus/room tags for Influx
|
||||||
influxTags := []point.Topic{
|
influxTags := []point.Topic{
|
||||||
|
|||||||
Reference in New Issue
Block a user