Hi , Let me write it down my Requirement
Current InfluxDB Schema
[
{“measurement”:“mem”,
“tags”:{“device_mac”:“BC572903F2AD”,“host”:“BC572903F2AD”},
“fields”:{“temp”:29.64,“humidity”:59,“vbatt”:3063,“rssi”:-68,“device_temperature”:29.64,“device_humidity”:59,“upload_time”:“2023-11-15 12:09:06.600”,“x0”:-78,“y0”:-500,“z0”:-875},
“timestamp”:“2023-11-15T06:39:14.646Z”}
]
I Want to build a InfluxDB Query API using php or fastapi where I can get the following result in one line json ,
-
List all devices latest values
-
Device_temperature
-
Device_humidity
-
Upload_time
-
Timestamp
-
X
-
Y
-
Z
-
Rssi
-
Vbattery
-
List all devices which are missing or having no values from the past 48hrs , List of Items to be checked from an Array , where an Array will contain device_mac address .
-
Search MySql Key and find the point 1 . and Point 2 from InfluxDB and return all values in json .
-
Get Count of Devices which have Low temperature between two date-time for a group of device_mac values
-
Send InfluxDB Alerts to an Endpoint if a Device_Temperature for any specific device_mac matches criteria
-
Working hrs time
-
Temperature / humidity / rssi / vbatt
-
Enable / Disable Criteria