Closed vzorglub closed 6 years ago
Sorry, could you please provide more info? What type of request do you use? Is it scheduled request or request via request/* topic?
I use a scheduled request:
import socket
mqtt_broker = 'localhost' # default: 'localhost'
mqtt_port = 1883 # default: 1883
mqtt_clientid = 'psmqtt-1'
mqtt_username = 'username'
mqtt_password = 'password'
mqtt_clean_session = False
mqtt_qos = 0
mqtt_retain = False
mqtt_topic_prefix = 'psmqtt/pizero/'
#mqtt_topic_prefix = 'psmqtt/' + socket.gethostname() + '/'
mqtt_request_topic = 'request'
schedule = {
"every 1 minute" : [
"cpu_percent",
"virtual_memory/percent",
"boot_time",
"sensors_temperatures/*",
],
"every 60 minutes" : "disk_usage/percent/|", # slash replaced with ve$
"every 3 hours" : {
"boot_time/{{x|uptime}}": "uptime",
}
}
I see. Could you please ensure that you use the latest version of psmqtt? I've checked your configuration and it works OK at my box
Do I just replace the psmqtt.py file with the new one?
psmqtt.py + handlers.py
Nope, not working I'll do a fresh install from rasbian image anyway in a few days time and let you know how it goes Thanks
Nope, Fresh raspbian install I am using a pizero
same error?
No, no errors, but no message...
On Wed, 19 Sep 2018, 12:55 Eugene Schava, notifications@github.com wrote:
same error?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eschava/psmqtt/issues/9#issuecomment-422773654, or mute the thread https://github.com/notifications/unsubscribe-auth/ASmb4PRMnEzCz_vpeKNERn0HHALWUQKvks5ucjC_gaJpZM4WcTA4 .
How do you check the output?
You can try
mosquitto_sub -t -v psmqtt/#
command to see all messages sent by psqmtt
Also I've committed minor change that should improve messages sent for sensor_temparatures request
I use node-red mqtt node subscribed on # I get the other 3 messages from the pi
Still the same, I have changed handlers.py with your latest code but no luck.
Ok, I have done a bit of research and it appears that the psutil library doesn't work for sensors_temperature on raspberry pis:
Thanks for your research! Subscribing to the original issue
The original issue was closed. Maybe you have more influence in getting it reopened
On Fri, 21 Sep 2018, 09:21 Eugene Schava, notifications@github.com wrote:
Thanks for your research! Subscribing to the original issue
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eschava/psmqtt/issues/9#issuecomment-423454363, or mute the thread https://github.com/notifications/unsubscribe-auth/ASmb4PYw8oX4y3QNp42CN3XhkL9g84-pks5udKGGgaJpZM4WcTA4 .
It's reopened without my influence :)
That's great. Millions of raspberry pis out there...
On Wed, 26 Sep 2018, 15:28 Eugene Schava, notifications@github.com wrote:
It's reopened without my influence :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eschava/psmqtt/issues/9#issuecomment-424735960, or mute the thread https://github.com/notifications/unsubscribe-auth/ASmb4P-eX3Uy2gEGroeAsu4hZ6tuRfMFks5ue473gaJpZM4WcTA4 .
There is a specieal command to view rasperry pi temperature. Some info here: https://pimylifeup.com/raspberry-pi-temperature/
Running in bash:
$ /opt/vc/bin/vcgencmd measure_temp
temp=42.0'C
Maybe psmqtt could call that process on raspberry pies
Hello, I get an error:
Exception: Element 'sensors_temperatures' in 'sensors_temperatures/*' is not supported
When using psmqtt on a rapsberry pi zero Has the CPU temperature been implemented for raspis yet?