The numbered zones can differ per system as there are several thermal sensors, so you need to find out what your zones are numbered. Run both to check out:
ls -l /sys/class/thermal/thermal_zone*
cat /sys/class/thermal/thermal_zone*/type
The numbered zones can differ per system as there are several thermal sensors, so you need to find out what your zones are numbered. Run both to check out:
ls -l /sys/class/thermal/thermal_zone*
cat /sys/class/thermal/thermal_zone*/type
Here is the result
root@pve:~# ls -l /sys/class/thermal/thermal_zone*
lrwxrwxrwx 1 root root 0 Oct 28 17:12 /sys/class/thermal/thermal_zone0 -> ../../devices/virtual/thermal/thermal_zone0
lrwxrwxrwx 1 root root 0 Oct 28 17:12 /sys/class/thermal/thermal_zone1 -> ../../devices/virtual/thermal/thermal_zone1
lrwxrwxrwx 1 root root 0 Oct 28 17:12 /sys/class/thermal/thermal_zone2 -> ../../devices/virtual/thermal/thermal_zone2
lrwxrwxrwx 1 root root 0 Dec 7 14:49 /sys/class/thermal/thermal_zone3 -> ../../devices/virtual/thermal/thermal_zone3
root@pve:~# cat /sys/class/thermal/thermal_zone*/type
acpitz
acpitz
iwlwifi_1
x86_pkg_temp
I have changed mine from 5 to 3 now the error is gone. But I got new one…
Traceback (most recent call last):
File "/root/rpi-mqtt-monitor/src/rpi-cpu2mqtt.py", line 158, in <module>
publish_to_mqtt(cpu_load, cpu_temp, used_space, free_space, uptime, total_space, memory)
File "/root/rpi-mqtt-monitor/src/rpi-cpu2mqtt.py", line 85, in publish_to_mqtt
client.connect(config.mqtt_host, config.mqtt_port)
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 912, in connect
self.connect_async(host, port, keepalive,
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 979, in connect_async
if port <= 0:
TypeError: '<=' not supported between instances of 'str' and 'int'
It looks like the mqtt package is not getting the right config from your script. Can you show the contents of it?
I assume the following command, be sure to check yourself
cat /root/rpi-mqtt-monitor/src/config.py
Here it is
root@pve:~# cat /root/rpi-mqtt-monitor/src/config.py
from random import randrange
# MQTT server configuration
mqtt_host = "192.168.178.34"
mqtt_user = "mqtt"
mqtt_password = ""
mqtt_port = "1883"
mqtt_topic_prefix = "rpi-MQTT-monitor"
# Messages configuration
# If this is set to True the script will send just one message containing all values
group_messages = False
# If this is set, then the script will send MQTT discovery messages meaning a config less setup in HA. Only works
# when group_messages is set to False
discovery_messages = True
# Random delay in seconds before measuring the values
# - this is used for de-synchronizing message if you run this script on many hosts.
# - if you want a fix delay or 0 you can remove the randrange function and just set the needed value.
random_delay = randrange(1)
# This is the time between sending the individual messages
sleep_time = 0.5
cpu_load = True
cpu_temp = True
free_space = True
used_space = True
total_space = True
voltage = True
sys_clock_speed = True
swap = True
memory = True
uptime = True
# Enable wifi_signal for unit of measuring % or wifi_signal_dbm for unit of meaning dBm
wifi_signal = False
wifi_signal_dbm = False
It looks like the package is expecting an integer, so try to remove the double quotes " around the 1883 port number in your config.
Thank you that worked! I really appreciate your help!
One more question. Even I have enabled via discovery_messages = True
MQTT integration in HA don’t see sensors. But I can see them via MQTT Explorer
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: 'NUC : Versione Hassio {{states(''sensor.hass_version'')}}'
secondary: '- {{states(''sensor.ha_start'')}}'
icon: mdi:cpu-64-bit
fill_container: true
entity: sensor.processor_use
layout: vertical
style: |
ha-card {
background: transparent !important;
overflow: hidden !important;
box-shadow: none !important;
}
card_mod:
style: |
ha-card {
height: 102px;
background: url('/local/images/nuc10-hero.jpg') center;
background-size: cover;
background-blend-mode: overlay;
background-color: rgba(var(--rgb-card-background-color), 0.8);
{% if is_state('light.geekroom', 'on') %}
box-shadow: 0 0 20px rgba(0, 150, 136, 0.6);
{% endif %}
}
tap_action:
action: more-info
- type: custom:stack-in-card
mode: vertical
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.disk_use_percent
color: rgb(247, 222, 0)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 33
- 66
- 100
legend:
show: false
chart:
height: 240
- type: custom:mushroom-entity-card
entity: sensor.disk_use_percent
primary_info: state
secondary_info: name
name: DISCO
icon_color: yellow
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -90px;
width: 140px;
margin-left: auto;
margin-right: auto;
background: transparent !important;
}
card_mod:
style: |
ha-card { --ha-card-background: rgba(0, 0, 0, 0);
mini-media-player-background-opacity: 0
--ha-card-box-shadow: none; }
- type: custom:stack-in-card
cards:
- square: false
columns: 3
type: grid
cards:
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.memory_use_percent
color: rgb(247, 8, 0)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 33
- 66
- 100
legend:
show: false
chart:
height: 140
- type: custom:mushroom-entity-card
entity: sensor.memory_use_percent
primary_info: state
secondary_info: name
name: RAM
icon_color: red
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -57px;
width: 140px;
margin-left: -4px;
margin-right: auto;
background: transparent !important;
}
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.processor_use
color: rgb(0, 82, 247)
max: 100
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 33
- 66
- 100
legend:
show: false
chart:
height: 140
- type: custom:mushroom-entity-card
entity: sensor.processor_use
primary_info: state
secondary_info: name
name: CPU
icon_color: blue
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -57px;
width: 140px;
margin-left: -4px;
margin-right: auto;
background: transparent !important;
}
- type: custom:stack-in-card
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.temperatura_processore_nuc
color: rgb(247, 124, 0)
max: 120
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 40
- 80
- 120
legend:
show: false
chart:
height: 140
- type: custom:mushroom-entity-card
entity: sensor.temperatura_processore_nuc
primary_info: state
secondary_info: name
name: TEMP
icon_color: orange
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -57px;
width: 140px;
margin-left: -4px;
margin-right: auto;
background: transparent !important;
}
card_mod:
style: |
ha-card { --ha-card-background: rgba(0, 0, 0, 0);
mini-media-player-background-opacity: 0
--ha-card-box-shadow: none; }
- type: horizontal-stack
cards:
- type: custom:stack-in-card
mode: vertical
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.cpu_speed
color: rgb(255, 87, 34)
max: 5
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 1
- 2.5
- 4
legend:
show: false
chart:
height: 240
- type: custom:mushroom-entity-card
entity: sensor.cpu_speed
primary_info: state
secondary_info: name
name: CPU SPEED
icon_color: deep-orange
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -90px;
width: 140px;
margin-left: auto;
margin-right: auto;
background: transparent !important;
}
card_mod:
style: |
ha-card { --ha-card-background: rgba(0, 0, 0, 0);
mini-media-player-background-opacity: 0
--ha-card-box-shadow: none; }
- type: custom:stack-in-card
mode: vertical
cards:
- type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.mariadb_database_size
color: rgb(66, 245, 96)
max: 5000
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
startAngle: -108
endAngle: 108
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
strokeWidth: 80%
margin: 0
fill:
type: gradient
gradient:
shade: light
type: horizontal
shadeIntensity: 0.3
inverseColors: false
opacityFrom: 1
opacityTo: 1
stops:
- 0
- 1500
- 3000
- 5000
legend:
show: false
chart:
height: 240
- type: custom:mushroom-entity-card
entity: sensor.mariadb_database_size
primary_info: state
secondary_info: name
name: HASSIO DB
icon_color: light-green
layout: vertical
card_mod:
style: |
ha-card {
margin-top: -90px;
width: 140px;
margin-left: auto;
margin-right: auto;
--ha-card-background: rgba(0, 0, 0, 0);
mini-media-player-background-opacity: 0
--ha-card-box-shadow: none;
background: transparent !important;
}
card_mod:
style: |
ha-card { --ha-card-background: rgba(0, 0, 0, 0);
mini-media-player-background-opacity: 0
--ha-card-box-shadow: none; }
- type: entities
entities:
- entity: binary_sensor.backups_stale
name: Stato Backup
secondary_info: last-changed
- entity: sensor.home_assistant_log_last_updated
name: Ultimo Aggiornamento
secondary_info: last-changed
style: |
ha-card {
background: transparent !important;
overflow: hidden !important;
box-shadow: none !important;
}
- type: horizontal-stack
cards:
- type: custom:mushroom-template-card
primary: RIAVVIO
secondary: ''
icon: mdi:restart
layout: vertical
icon_color: red
tap_action:
action: call-service
service: homeassistant.restart
data: {}
target: {}
style: |
ha-card {
background: transparent !important;
overflow: hidden !important;
box-shadow: none !important;
}
- type: custom:mushroom-template-card
primary: SPEGNIMENTO
secondary: ''
icon: mdi:power
layout: vertical
icon_color: blue
tap_action:
action: call-service
service: hassio.host_shutdown
data: {}
target: {}
style: |
ha-card {
background: transparent !important;
overflow: hidden !important;
box-shadow: none !important;
}
- type: custom:mushroom-template-card
primary: LOGS
secondary: ''
icon: mdi:alert-circle-check-outline
layout: vertical
icon_color: orange
tap_action:
action: url
url_path: https://https://tarohomeassistant.duckdns.org:8123/config/logs
style: |
ha-card {
background: transparent !important;
overflow: hidden !important;
box-shadow: none !important;
}
Hi, I am trying to set up this card but in case I paste code I see nothing in card only message: No visual editor available for type 'custom:config-template-card'
Many thanks for your help.
This card is 100% yaml only.
I understand, many thanks. But I had a problem that card was plain, nothing on it, but when I deleted all variables it is working:
- states[''sensor.disk_use_percent''].state
- states[''sensor.homeassistant_version''].state
- states[''sensor.disk_total''].state
- states[''sensor.disk_use''].state
- states[''sensor.memory_use_percent''].state
- states[''sensor.processor_use''].state
- states[''sensor.cpu_temperature''].state
Should I define it somewhere? Many thanks!
Can somebody help me to setup the background image >?
This is my config type: custom:hui-entities-card
title: ‘Gigabite Brix OS: Ubuntu 20.04.1 LTS’
show_header_toggle: ‘off’
style: |
ha-card { border-radius: 20px; }
entities:
It would be a bit easier if you post the code in code tags as described in this post at the top of each forum.
I have exactly the same problem do you find a solution ?
Tell me please. Is it possible to get process download data for individual applications installed from Home Assistant.
I’m hoping someone can help me troubleshoot getting my ProxMox sensors to show up. It seems pretty strange that they worked initially, but then some kind of update stop them from being discovered. I’ve even uninstall mqtt and the mosquitto broker addon, and reinstalled both yet they still do not report.
I setup the monitor from post 42 by Hs82H, and after few tweaks for python3 got it working. The script seems to run, no errors. And I then check with mqtt explorer and see the sensor results showing. But homeassistant still won’t show them
This what I see with mqtt explorer.
I see the sensors, but it is also reporting a status of offline? The mosquitto broker is running and I see the connections from Proxmox. And the mqtt integration is also running. Both the mqtt integration and proxmox are both set for topic prefix of homeassistant as well. And the mqtt integration has discovery turned on.
From my understanding the mqtt should be picking up the devices automatically?
Any help or trouble shooting is greatly welcomed.
Thanks,
PT
slight change of tack, but I spotted this today, added to my system, and 5 minutes later have everythingg working perfectly. Super easy way to pull all your proxmox stats, and your VM/LXC stats.
dougiteixeira/proxmoxve: Proxmox VE Custom Integration Home Assistant (github.com)
Well, I couldn’t get HACS to find the repository. But a quick manual install and up and running with that integration in 5 minutes. And its great that I can see all system stats and also the VMs. I also run HomeAssistant on the ProxMox as a VM and can even see that information there.
But I would still like to try and troubleshoot why the MQTT script is sending the data, but not showing up in HA.
Could you share the yaml for this view? I like how the bar and graph look combined!
Hello, really nice, please can you post your code for the “Synology” ?
I’m sorry, not using this anymore and think my code has gone