eschava / psmqtt

Utility reporting system health and status via MQTT
MIT License
158 stars 35 forks source link

View sensors in HA #17

Closed divemasterjm closed 3 years ago

divemasterjm commented 3 years ago

I have your program running, i can see it in mosquito broker but im unable to see it in homeassistant, can u please help me?

divemasterjm commented 3 years ago

i manage to view it manually adding, but ive got an error with temprature sensors in mac mini

eschava commented 3 years ago

what's the error?

divemasterjm commented 3 years ago

schedule = { "every 1 minute" : [ "cpu_percent", "virtual_memory/percent", "sensors_temperatures/*", ],

divemasterjm commented 3 years ago

ERROR:root:sensors_temperatures/: module 'psutil' has no attribute 'sensors_temperatures' Traceback (most recent call last): File "/Users/juanma/psmqtt/psmqtt.py", line 56, in run_task payload = get_value(task) File "/Users/juanma/psmqtt/psmqtt.py", line 81, in get_value value = handlers[head].handle(tail) File "/Users/juanma/psmqtt/handlers.py", line 283, in handle tup = self.get_value() File "/Users/juanma/psmqtt/handlers.py", line 311, in get_value return psutil.sensors_temperatures() AttributeError: module 'psutil' has no attribute 'sensors_temperatures' ERROR:root:sensors_temperatures/: module 'psutil' has no attribute 'sensors_temperatures' Traceback (most recent call last): File "/Users/juanma/psmqtt/psmqtt.py", line 56, in run_task payload = get_value(task) File "/Users/juanma/psmqtt/psmqtt.py", line 81, in get_value value = handlers[head].handle(tail) File "/Users/juanma/psmqtt/handlers.py", line 283, in handle tup = self.get_value() File "/Users/juanma/psmqtt/handlers.py", line 311, in get_value return psutil.sensors_temperatures() AttributeError: module 'psutil' has no attribute 'sensors_temperatures'

eschava commented 3 years ago

sensors_temperatures is supported by Linux and FreeBSD only, sorry https://psutil.readthedocs.io/en/latest/#psutil.sensors_temperatures

divemasterjm commented 3 years ago

what a pity, thanks for your help

exeljb commented 2 years ago

I know this is old and closed but I wanted to mention that there's an open source project called Fanny that's able to display CPU temps and fan speed. I'm curious how possible it would be to implement whatever method that project uses to get compatibility with this one.

The repo is at.... https://github.com/DanielStormApps/Fanny/

It would be great if i could get this on my mac mini that's running my home assistant instance.