Yea but that won’t work without the underlying code to provide the data to Home Assistant.
Here is the copy/paste it won’t work but as requested
entities:
- entity: sensor.cpu_temp
- entity: binary_sensor.rpi_undervolt
- entity: binary_sensor.rpi_has_undervolt
- entity: binary_sensor.rpi_throttled
- entity: binary_sensor.rpi_has_throttled
- entity: binary_sensor.rpi_frequency_capped
- entity: binary_sensor.rpi_has_frequency_capped
- entity: binary_sensor.rpi_softlimit
- entity: binary_sensor.rpi_has_softlimit
- entity: sensor.disk_use_percent
- entity: sensor.load_15m
- entity: sensor.processor_use
- entity: sensor.memory_free
- entity: sensor.memory_use
- entity: sensor.memory_use_percent
- entity: sensor.network_in_eth0
- entity: sensor.network_out_eth0
- entity: sensor.time_online
- entity: sensor.last_boot
show_header_toggle: false
title: Raspberry Pi System Status
type: entities
can you share the code that created those rpi_* sensors
Yes but please remember the following:-
You need it insert the IP address of your home assistant server and create and insert a Long-Lived Access Token from the users page.
I don’t think it will work on HASSIO as I believe it does not have the vcgencmd command. Although I think I read the was a docker that has that command (you will have to research) the will probably other issues with HASSIO but I don’t use it so your on your own.
It assumes that you have HTTPS and use standard port 8123 if not then you will have to amend the code to suit.
You need to create a executable file and set up a cron job to run every minute. Don’t ask me how that’s what google is for.
It does work, if you can’t get it to work it’s something you have done.
Good luck and let me know if you get it working.
#!/bin/bash
SERVER='xxx.xxx.xxx.xxx:8123'
TOKEN='YOUR TOKEN HERE'
#Flag Bits
UNDERVOLTED=0x1
CAPPED=0x2
THROTTLED=0x4
SOFT_TEMPLIMIT=0x8
HAS_UNDERVOLTED=0x10000
HAS_CAPPED=0x20000
HAS_THROTTLED=0x40000
HAS_SOFT_TEMPLIMIT=0x80000
#Get Status, extract hex
STATUS=$(vcgencmd get_throttled)
STATUS=${STATUS#*=}
#Undervolted
((($STATUS&UNDERVOLTED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Undervoltage", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_undervolt || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:shield-check", "friendly_name": "Undervoltage", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_undervolt
#Has Undervolted
((($STATUS&HAS_UNDERVOLTED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Undervoltage Since Boot", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_undervolt || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:shield-check", "friendly_name": "Undervoltage Since Boot", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_undervolt
#Throttled
((($STATUS&THROTTLED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "CPU Throttled", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_throttled || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "CPU Throttled", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_throttled
#Has Throttled
((($STATUS&HAS_THROTTLED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "CPU Throttled Since Boot", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_throttled || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "CPU Throttled Since Boot", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_throttled
#Frequency Capped
((($STATUS&CAPPED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Frequency Capped", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_frequency_capped || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "Frequency Capped", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_frequency_capped
# Has Frequency Capped
((($STATUS&HAS_CAPPED)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Frequency Capped Since Boot", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_frequency_capped || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "Frequency Capped Since Boot", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_frequency_capped
#Softlimit
((($STATUS&SOFT_TEMPLIMIT)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Softlimit", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_softlimit || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "Softlimit", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_softlimit
#Has Softlimit
((($STATUS&HAS_SOFT_TEMPLIMIT)!=0)) && \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:alert-circle", "friendly_name": "Softlimit Since Boot", "device_class": "problem"}, "state": "'on'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_softlimit || \
curl -k -X POST -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" -d \
'{"attributes": {"icon": "mdi:speedometer", "friendly_name": "Softlimit Since Boot", "device_class": "problem"}, "state": "'off'"}' https://${SERVER}/api/states/binary_sensor.rpi_has_softlimit
Does anyone have an answer to this question?
If I am understanding your question correctly, yes you would need to flash a new SD card for HASSIO to be used on a Raspberry Pi 4. It is per device (I think that is what you are asking) based on the hardware found here: https://www.home-assistant.io/hassio/installation/ . If that is not what you are asking please clarify. From the link you provided you would need to scroll mostly to the bottom and look for file like “hassos_rpi4-3.5.img.gz” (note the rpi4 reference in that file name). Me personally, I am going from a raspberry pi 3 to a 4 so I will need to flash a new sd card and upload some of my backup.
hi jake, are you using the 32 or 64 bit version on the pi4? I have pi4 sitting on my tablet waiting to install hassio.
Ive tried Hassbian on the pi4 and had issues. Hass.io is supposed to be for beginners but the procedure is all over the place. I digress. 2 questions for you. 1- Which buster version did you use? Also, my primary goal is to run nodemcu esp8266 products on this. 2- Have you done anything with those? I had issues trying to load them on Hassbian. Yaml would not upload or even compile. I updated some of the python scripts and had to debug one to get back where I was. No compile.
Sorry for the diatribe. Just the 2 answers is good.
I was one of the first users who downloaded an flashed through beta version for the Pi4.
Now the downloadlink changed from beta to RC.
I‘m asking if the beta version is able to update itself via the hassio system section to the newest version or if we need to reflash the RC.
Maybe @petro is able to answer this?
Don’t use raspberry pi!
I’ve had high temperatures even with a heatsink on the cpu so I’ve ordered a case with a fan. Its suuuuper loud on 5v, but you can barely hear it on 3.3v. Cpu temp sits at 38C now
Raspberry pi 4 works great, i’m just having issues with high load/io times. Dont know if is because i’ve had the same system running pn my old nuc before or maybe my sd card is too slow (using rpi4 only for testing).
P.s.
Lepo videt, da nas je nekaj it slo gor
Change SD card… it must be class 10… if problem still persists then there is some other configuration problem…
Personal to slovenc: Se strinjam…
Do you know someone who could know the answer to this?
Not sure what you want an answer to, the raspberry pi is a perfect fit with home automation, hassio is a different matter, I always found it to be much slower than a rasbian install, hassio always felt like a answer to a problem nobody had.
my question:
I pulled a beta version of hassio for the pi 4 weeks ago.
Now there is a RC for hassio on the pi4.
Does the beta version of hassio (pi4) update to the newest non beta version? Or do I need to flash RC and restore my backup to get to the newest version?
h4nc, I believe post 57 below answers your question:
Thanks.
The thing is I’m on HassOS 3.5, probably because I downloaded the beta when I flashed it.
There is still a button join Beta channel
.
Is there a way to switch to the latest release.
Or maybe I misunderstood that and there is no stable release yet for the Pi4.
I try to think how it might go if my dad tried setting up raspbian/hassio… what a disaster it would be. He wouldn’t even be able to figure out the most basic hassos install. That said, for some slightly more tech savvy folks, I think hassos is much more attainable. I am not half bad with linux myself, but honestly my hassio system serves as an alarm+automation appliance for my home so maintaining a linux server is out of the question. I already enough servers to maintain, and my wife/kids have to be able to keep things going while I’m out of town. So for me hassos solves a few of those problems.