ironsheep / lovelace-rpi-monitor-card

A Raspberry Pi status display Card for Home Assistant Lovelace
MIT License
195 stars 9 forks source link

Not Get correct CPU Temperature #16

Closed hellresistor closed 2 years ago

hellresistor commented 3 years ago

Checklist:

Description of problem:

Not Getting correct CPU Temperature Screenshot_2

I have an RPI4 4GB running debian 10 aarch64

ironsheep commented 3 years ago

Huh, unexpected... Sorry to hear.

Can you run a tool like MQTT Explorer to see what values are being sent by the daemon script from this RPi?

urielz commented 3 years ago

I have the same issue. I'm not experienced with MQTT explorer, how do I look at the values? I can see this output...

{"name": "Rpi Temp Rpi4", "uniq_id": "RPi-Mon_temperature", "dev_cla": "temperature", "unit_of_measurement": "C", "stat_t": "~/monitor", "val_tpl": "{{ value_json.info.temperature_c }}", "~": "home/nodes/sensor/rpi-rpi4", "pl_avail": "online", "pl_not_avail": "offline", "ic": "mdi:thermometer", "avty_t": "~/status", "dev": {"identifiers": ["RPi-Mon"]}}

ironsheep commented 3 years ago

@urielz you might take a look at youtube videos to help you understand MQTT Explorer: Something like: https://www.youtube.com/watch?v=pvuVjJ0AnrQ

Basically:

Until we know which is the cause we don't know what needs to be addressed/fixed. Does this make sense?

nabeelmoeen commented 3 years ago

EDIT: so the vcgencmd used to read the temperature is not available by default on ubuntu (and assuming it's the same for debian or any non-raspbian OS). to rectify the issue you have to install apt install libraspberrypi-bin this was followed by an error VHCI initialization failed to work around that sudo usermod -aG video <username> log off and log back in.

sources: getting vcgencmd on ubuntu Solution for VHCI Initialization failed error


Original Post hi, I have the same issue. one of my RPi 3B+ is working as expected, for the other I am getting incorrect results for the temp. image

The difference is:

ironsheep commented 2 years ago

@nabeelmoeen ok, this is useful information... Do you have the ubuntu install working correctly now? If so, I'll be adding installation notes for ubuntu platforms to add what you've found...

ironsheep commented 2 years ago

@hellresistor , @urielz does the solution mentioned above (not having vgencmd installed?) so install it and modify group permissions... does this solve your problem?

nabeelmoeen commented 2 years ago

@nabeelmoeen ok, this is useful information... Do you have the ubuntu install working correctly now? If so, I'll be adding installation notes for ubuntu platforms to add what you've found...

Yes, it's working fine after installation of the 2 packages

ironsheep commented 2 years ago

OK, I've updated the Daemon README so that Ubuntu users will see the need to install this extra package!

Oh, also, an updated version of the reporter daemon has just been released!

Thank you for reporting this! @nabeelmoeen

urielz commented 8 months ago

Coming back to this +3 years later! Thank you @ironsheep . It's working correctly now.

Note for Debian users: as with Ubuntu, you will need libraspberrypi-bin, however to install you need to add the repository to your sources (/etc/apt/sources.list), add:

deb http://archive.raspberrypi.org/debian/ dist main # where dist is your distribution

Also add gpg key otherwise the system will refuse to install from that source:

wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O raspberrypi.public.key sudo apt-key add raspberrypi.public.key