I’m currently working on a project where I have a arduino which is delivering the current temperature to the mosquitto broker (running on home-assistant).
I can already read the data transmitted to the broker with a client running on my pc.
Now I’m trying to get this data (temperature) into a database.
At the moment I have the mariadb running (started with the ADD-ON STORE).
In my configuration.yaml file I have the following:
Your shell command won’t run unless you tell it to.
Use an automation to start it with HA (I guess it goes into a loop by itself)
Alternatively you can add the recorder component and configure it to record to a MariaDB, you’ll get exactly that.
Please elaborate…
which database ?
how do I get access to the data received via the mosquito broker, in which db is it stored for long term.
I’d still like to be able to decide how where i want to start it via a python script as depending on conditions I might want to put it to a MariaDB or into a InfluxDB to be displayed via Grafana.
G
You can also use a MQTT sensor to get the MQTT stuff into a sensor (and hence the db). I was using this to create a usage sensor for my ISP usage using mosquitto_pub in a shell command and then a MQTT sensor to get data from the broker into a sensor.
I ended up abandoning doing it like that because hass.io doesn’t have mosquitto_pub available… I still have the working scripts here in my repo though. Look in the first file - the zip file for instructions and the scripts.
thanks will do.
but thats not my question above.
my question is more in the direction of, should i run my entire consolidation of information and graphs on the HA platform, or should i push all energy values to OeM and graph there and just run the workflow and sonoff switching on the Ha.
sorry… I’m the confused one, getting confused between different posts.
I was asking, “which database” based on the comment: “It is already placed in a database, you are replicating what home assistant does already.”