Hi all,
I searched a solution about my problem but I can’t find anything useful so I have to create a new post :\
Introduction:
I switched from Docker HA to Hass.IO few days ago.
My ex HA installation was composed by:
HA 0.97
InfluxDb
Grafana
I installed all stuff in a new ssd so it is a clean install. After installing HassIO (on Xubuntu 19.04) I installed the influxdb addon and restored my old database (previously backupped) following this guide.
After backup was restored I restored my grafana dashboard too without any problems: everything is up and working
Problem:
With previous installation I could create single chart containing 2 informations:
Room temperature
Switch status
In this way I could see room temperature variations when the AC was on or off (see attached picture) but now seems that AC status is gone.
As you can see in the picture the AC switch state was present before saturday and then disappeared.
All other charts (cpu temp, humidity sensors, system memory ecc ecc) works flawlessy except the switch status.
I tried with different queries and aggregations but no luck.
I can’t understand if problem is given by influxdb or by hassIO not sending influx switch statuses.
My current InfluxDB configuration in configuration.yaml is the standard one:
EDIT: I just tried to exec some queries on influx selecting state of other switches than the one connected to the ac (lights and plugs) with same result: I can see values until 08/31 (the day I installed HassIO restoring backup of previous influx installation), after that moment no more switch values on influx.
Nevermind I found the solution. I write it here just in case someone can find it useful.
In previous installation I had no “default_measurement” that’s why I had correct switch state in database. Removing that line from config restored everything
Just checked my config, and I did have “default_measurement” in it, but I cannot view results for any digital values, only analogue values are being returned successfully from a query.
SELECT mean("value") AS "mean_value" FROM "home_assistant"."autogen"."sensor.person_in_driveway" WHERE time > :dashboardTime: GROUP BY time(:interval:) FILL(null)
I just tried with switch.light_01 as entity and it works but I don’t have default_measurement. This config option tells influx where to store values if there is no measurement for that value. Try to remove it, put some data and then plot
Yes, it has been commented out of the config for a few days now. The state of the sensor has been changing, as I email camera pictures to myself when a person is detected on the drive.