DanM
December 10, 2018, 9:58am
1
Hi,
I dont allow access to my HA instance from the outside, and so instead make heavy use of a polling only telegram bot. One of this things I would love to access is the recent history for devices as a graph. Im guessing that the way this might would would be to make an image and then send that. Is there any known way to do this? (Im on hass.io ).
Thanks.
I’ve not done it myself but you may be able to use Grafana to generate bitmap graphs form the HA database
Hi! Did you find a solution? I am facing the same problem.
DanM
August 6, 2019, 8:41am
4
Im afraid not. I just switched to home assistant cloud and now I just look at the graphs…
h4de5
(Andi)
April 1, 2021, 8:57pm
5
i know this is an old thread, but i wondered if someone has come up with a solution for this in the meantime (without setting up grafana)
similar questions:
Hi,
Is there a chance to integrate a history-graph into a mail notification? I have already created a notification which is working with normal text and temperature state attributes.
- id: '123'
alias: text email when door is open
initial_state: true
trigger:
- entity_id: binary_sensor.door_contact_1
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: " The door is open \n\nTemperature 1 is: {{ states.sensor.temperature_1.state }} "
…
I’d like to send history graphs (temperature etc.) as an image via telegram API. What is the best way to create such an image? Do I really have to extract the data via SQL myself (as described here: https://www.home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/ ) and push it through gnuplot?
Or is there a simpler way to tell for example the history graph component to store the output somewhere?
+1 looking for similar feature
If somehow we are able to generate a image from history graph or from sensor. Most likely we can push it via telegram
3 Likes
ejko
(ejko)
July 31, 2023, 10:13pm
6
Is there still no simple solution?
Maybe that is the solution )
raffler
(raffi)
February 1, 2024, 2:41pm
8
so i wanted to have the same feature and was able to pull it off
i made a post for it, here is the link:
hi everyone, this is my first post, also new to this forum…
not super experienced HA user, but willing to learn.
should actually be studying… but u know… tinkering is more interesting
I wanted to be able to receive a 24h plot of the temperature recorded upon request over telegram.
I will try to explain hoping i can nudge people into the right direction if they want to do the same.
u will need:
sensor
Python Scripts for Home Assistant (GitHub - AlexxIT/PythonScriptsPro: Advan…
1 Like
I’ve built on @raffler ’s solution and started sending a power graph to my telegram.
See this thread:
Hi,
This was massively helpful. I have no background in SQL, Python or HA development but I’ve managed to make it work for my case.
The above python code did not initially work for me. Below are the issues I had:
I use MariaDB so sqlite3 was not working (or at least that was my conclusion) and the SQL query fails where the 24-hour timestamp is calculated.
My temperature data had “unavailable” states that were getting imported and messing up the plot.
When CSV was being read, the temperature…
DrMor
(Yoav)
July 19, 2024, 2:36pm
10
I read all the posts here after looking for a solution like that for a very long time (In my case I wanted to send the image of sensor history as a whatsapp notification, but it’s the same concept).
I ended up with a much simpler solution, you basically export the sensor information to Google Sheets, the Sheet creates a graph and the graph can have a link you can access which is basically an image. This works beautifully and is very easy to set up. I included a step-by-step guide here:
tom_l
July 19, 2024, 10:46pm
11
DrMor:
a much simpler solution
Still to much of a cludge for me to bother implementing.