Open gribouk opened 3 years ago
Home Assistant has it own system monitor which you can activate by adding following config to /config/configuration.yaml
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
arg: /
- type: disk_use
arg: /
- type: disk_free
arg: /
- type: memory_use
- type: memory_free
- type: memory_use_percent
- type: ipv4_address
arg: eth0
- type: processor_use
There are more options not mentioned here above but for temperature and clock speed you can add this code to /config/configuration.yaml
- platform: command_line
name: CPU Temp
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: "{{ value | multiply(0.001) | round(1) }}"
- platform: command_line
name: GPU Temp
command: "/opt/vc/bin/vcgencmd measure_temp"
unit_of_measurement: "°C"
value_template: '{{ value | regex_findall_index("=([0-9]*\.[0-9]*)", 0) }}'
- platform: command_line
name: CPU Clock
command: "/opt/vc/bin/vcgencmd measure_clock arm"
unit_of_measurement: "MHz"
value_template: '{{ value | regex_findall_index("=([0-9]*)", 0) | multiply(0.000001) | round(0) }}'
@synoniem Thank you for posting this.
@gribouk Please check the solution offered and let me know what you think.
I just added your code to my configuration.yaml file to check it out. I think you have an extra character at the very end of the last line of your second snippet. Probably just a cut-and-paste artifact. Otherwise, works fine. Here is more documentation on the systemmonitor platform.
I just added your code to my configuration.yaml file to check it out. I think you have an extra character at the very end of the last line of your second snippet. Probably just a cut-and-paste artifact. Otherwise, works fine. Here is more documentation on the systemmonitor platform.
That is indeed a cut and paste artifact. I did edit the message to remove that last character it should be ok now.
Hi,
I have the same kind of installation.
Can this card be used in combination with a hassio installation?
Thank you!
Checklist:
Release with the issue:
Last working release (if known):
Hardware, Operating System, Python version:
RPi 4, hassio OS... Description of problem: I am running Home Assistant installed from the image provided by the developer. After the boot sequence I am only allowed to enter the login and then I am logged in to the hassio OS, which does not support sudo command and other commons for general Linux. How do I install that sript? The RPi monitor card's manual says I have to install the MQTT2HA Daemon first, but Daemons's guide explains nothing on how to install itself under HA OS. Can onyone help me with that?
Run our report script 'genBugInfo' on your failing device and include the output here:
Python errors shown in the logs (if applicable):
Additional information: