Hi guys,
on my server where HA is running I have set up several cron jobs which monitor the internet connection, both connectivity itself as well as speeds. It will be written out as CSV file.
What I would like to have is that this data is shown as diagram in home assistant which is regularly updated.
Can this be done? Googling for it I mainly find solutions where only a single import is done, and are rather complicated.
Actually I have just changed my approach in that I have removed the cron jobs, and instead set up command_line sensors in HA with the appropriate intervals, which record a single actual value each. I have then enabled recorder/history for those 3 sensors exclusively, so I would be able to use the history graph card to show all the values in a diagram.
Seems to work well, and its probably a more HA-solution than reading CSV files.
Only thing thats a bit weird is that, although I have defined timeouts of several minutes for each sensor, HA prints this upon startup:
hass[8574]: 2021-03-25 10:03:21 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform command_line is taking over 10 seconds.
My limited understanding of HA is that on startup the sensors reach out to their endpoints.
Maybe your sensor endpoint is not ready at this initialisation stage.
Well, the sensors issue shell commands, namely ping as well as speedtest-cli (python package), where the latter takes around 20s to finish. So this is to be expected, that each update of the sensor takes some time, thats why I increased the timeout value from default.
It just seems like this parameter is ignored at least for the startup of HA.