I’m using influxdb and grafana and was curious whats best practice if i get sensordata like moisture from a soil sensor every 5 minutes but also want to save the location and plant it is measuring. Location and plant are not changed often, like every month or so.
Should i write this to the measurement Sensor1 every 5 minutes when there’s a new value? Or do i have to create another measurement and link it through an id or something? Or is it even possible to ask for f.e. WHERE location = Outdoor “and all following” so i just have to enter it once in the same measurement.
The goal is to create a dynamic graph that automatically shows all moisture values of all sensors located in the same room. In addition it should show the name of the plant in the legend for every sensor (like tomato).
A hint to the right direction would be awesome, searched several days with different answers.
I don’t have a lot of experience working with influxdb, but in general when it comes to timeseries databases there always a question regarding high or low cardinality. Timeseries databases don’t work good at all when you have high cardinality, i.e. huge amount of sensors, locations and plants. If you don’t have or expect that many sensors, locations and/or plants it could work to store everything in inlfuxdb, but you’ll need to test this.
I would suggest that you do some calculations of how many different sensors you expect to have, how many different locations (city name or geo points) and how many plants. After that there will probably be easier to give you advice on how to go forward.
I got 12 sensors with 4 different fields (moisture,conductivity,light and temperature)
4 locations
and 20+ names (plan was to give them unique names like tomato 1 f.e.)
seems like the best way to go is to take another db like mysql, right?
My goal was to use grafana as my visualization tool. Scripted dashboards then, right? Ask mysql which sensor is in which room and display all sensors in this specific room… and name them from mysql too. Or is there a better way? Atm i write location and name to a simple textfile. While thinking about it, mysql would be to much for 4+20 values… is it possible to read from that textfile from a scripted dashboard?