New to influxdb, I have it working and can send data from node red in json format.
My question is how to arrange the database?
A database for each type (i.e. weather, sensors, lights, motion etc..)
Or by location (i.e. lounge, dining, garden, garage).
Or all in one database and use tags..
As an example of my devices scattered across the whole house, each one publishing mqtt to my broker:
Zigbee2mqtt:
Aqara temp and humidity
Aqara motion
Aqara buttons
Aqara door sensors
Tasmota:
Sonoff S20 smart sockets
Sonoff basics
ESP8266's:
A dozen running custom Arduino code publishing to mqtt
Any advice is much appreciated before I get too far in my setup.
Example of my first attempt::
(Function node)
msg.payload = [
{
batteryPercent: msg.payload.battery,
humidity: msg.payload.humidity,
linkQuality: msg.payload.linkquality,
pressure: msg.payload.pressure,
temperature: msg.payload.temperature,
batteryVolts: msg.payload.voltage
},
{
topic: "Xiaomi_3_weather",
make: "Aqara",
location: "lounge"
}
];
return msg;
The database name is "mydb", measurement is "weather", and I am using tags as you can see.