Lovelace Raspberry Pi Status Card

Am new to the entire HA scene, so please bear with me.

  1. I was able to get HA working in the supervised mode, got the Daemon working and and able to check status and the MQTT message.

Now when I got to my Configuration for the MQTT, I see the entities, but all the results are not available. In addition, I did get HACS and used the front end to get the card. But I am not sure how to add it to Lovelace.

Thanks in advanceScreen Shot 2021-10-05 at 10.57.15 PM

Screen Shot 2021-10-05 at 10.58.00 PM

When you see the {hostname} you have the Daemon config.ini not edited correctly. There should never be a value in braces if the config.ini is correct.

Sorry I missed this when you first reported it. -Stephen

Have you used HACS to install the RPI Monitor Card itself?

Hi, I’ve just installed this and all up and running ok, however can I just run a quick query past anyone that’s using this.?
The lovelace card for mine is showing ‘Storage use 72%’ and the Sensor Card is showing ‘Fs free prcnt 72’.
The first to me implies that it’s using 72% currently, whereas the latter I’d take to be saying there’s 72% free?

Hello. Install from hacs the integration. But even though the js file is loaded I can’t find any entity. I don’t quite understand something. If I have Home assistant OS installed, what do I have to do besides installing the integration? I have MQTT installed for other reasons. But what else should I do? Thank you very much

Hi everyone I’m using the code
Lovelace Raspberry Pi Status Card, but I have a problem on the Home assistant board I can see the information of the raspberry on which I have loaded Volumio, while I see instead the information of either the raspberry Deluge or the raspberry NAS, but not both. Basically I see only 2 of 3 cards could you help me understand the problem I followed to the letter what is described in the guide. thank you

@claudiovillani58 please check the unique id for each of your RPi’s - it is affected by values in your config.ini files on each of the RPi’s. If two of your RPi’s happen to use the same unique id then you will only see two instead of all three. Use a utility ( e.g., Mqtt Box, or MQTT Explorer) to see what’s being reported from each RPI - when you see three different values then you should see all three RPis on your home assistant board.

Thanks Stefano for your quick reply, tomorrow I will do the tests and I will let you know the result

Hi Stefano, I take some time before asking you for new info or giving you my information as you requested. I’m using MQTT explorer but I still have to understand where the error I described in the first message is. I’m afraid I have some problem on Home Assistant like something is left dirty. With MQTT Explorer it seems that the IDs of the other Raspberry are unique everyone has their own I will investigate and let you know thanks
Claudio

Hello Stefano, here I am to ask you again how to see the daemon information for a single raspberry on Home Assistant?
As I mentioned previously, I have 4 Raspberry divided as follows:
Home Assistant
Deluge
Volumio
NAS
Now when they are all up and running, I find myself that on the Home Assistant board dedicated to collecting the Raspberry temperature monitoring information, sd occupation etc, I only see the info for Raspberry Deluge and Volumio and I don’t see those of the NAS.
If I turn off Deluge and restart Home Assistant then I see those of Volumio and the NAS.
In this regard, I looked at the DAEMON configuration of each one that I am attaching below and they are the same in everything. I cannot understand if the distinction between the Raspberry NAS and Deluge must be made within this configuration if you could tell me where?
For completeness using MQTT Explorer I also captured the info of both the Raspberry NAS and Deluge individually and I saw that both have a unique “id identifiers”, but when they are both active I can monitor either only the Raspberry NAS or only the Deluge it is as if one wrote on the other.
I premise that the Home Assistant configuration is completely new.
Can you help me?
Thanks Claudio

NAS

{“info”: {“timestamp”: “2022-07-18T16:43:56+02:00”,
“rpi_model”: “RPi 4 Model B r1.5”,
“ifaces”: “e,w,b”,
“host_name”: “raspberrypi”,
“fqdn”: “raspberrypi”,
“ux_release”: “bullseye”,
“ux_version”: “5.15.32-v7l+”,
“up_time”: “4 days, 19:27”,
“last_update”: “2022-07-13T20:13:38+02:00”,
“fs_total_gb”: 32,
“fs_free_prcnt”: 13,
“networking”: {“eth0”: {“IP”: “192.168.178.35”,
“mac”: “e4:5f:01:b0:91:80”},
“wlan0”: {“IP”: “192.168.178.36”,
“mac”: “e4:5f:01:b0:91:81”}},
“drives”: {“root”: {“size_gb”: 32,
“used_prcnt”: 13,
“device”: “/dev/root”,
“mount_pt”: “/”},
“mnt-musica”: {“size_gb”: 1024,
“used_prcnt”: 53, “device”: “/dev/sda1”,
“mount_pt”: “/mnt/musica”},
“mnt-backup”: {“size_gb”: 1024,
“used_prcnt”: 81, “device”: “/dev/sdb1”,
“mount_pt”: “/mnt/backup”}},
“memory”: {“size_mb”: “7898.922”,
“free_mb”: “7415.949”},
“cpu”: {“hardware”: “BCM2711”,
“model”: “ARMv7 Processor rev 3 (v7l)”,
“number_cores”: 4,
“bogo_mips”: “432.00”,
“serial”: “10000000561b74bf”,
“load_1min_prcnt”: 0.0,
“load_5min_prcnt”: 0.0,
“load_15min_prcnt”: 0.0},
“throttle”: [“throttled = 0x0”,
“Not throttled”], “temperature_c”: 41.3,
“temp_gpu_c”: 41.3, “temp_cpu_c”: 40.4,
“reporter”: “ISP-RPi-mqtt-daemon v1.6.0”,
“report_interval”: 5}}

{“name”: “Rpi Used Raspberrypi”,
“uniq_id”: “RPi-e45f01Monb09180_disk_used”,
“unit_of_measurement”: “%”,
“stat_t”: “~/monitor”,
“val_tpl”: “{{ value_json.info.fs_free_prcnt }}”,
“~”: “home/nodes/sensor/rpi-raspberrypi”,
“pl_avail”: “online”,
“pl_not_avail”: “offline”,
“ic”: “mdi:sd”,
“avty_t”: “~/status”,
“dev”: {“identifiers”: [“RPi-e45f01Monb09180”]}}


DELUGE

{“info”: {“timestamp”: “2022-07-18T21:04:40+02:00”,
“rpi_model”: “RPi 4 Model B r1.4”,
“ifaces”: “e,w,b”,
“host_name”: “raspberrypi”,
“fqdn”: “raspberrypi”,
“ux_release”: “bullseye”,
“ux_version”: “5.15.32-v7l+”,
“up_time”: " 3:51",
“last_update”: “2022-07-13T09:55:16+02:00”,
“fs_total_gb”: 32, “fs_free_prcnt”: 13,
“networking”: {“eth0”: {“IP”: “192.168.178.33”,
“mac”: “e4:5f:01:67:f1:8d”},
“wlan0”: {“IP”: “192.168.178.34”,
“mac”: “e4:5f:01:67:f1:8e”}},
“drives”: {“root”: {“size_gb”: 32, “used_prcnt”: 13,
“device”: “/dev/root”, “mount_pt”: “/”},
“mnt-torrents”: {“size_gb”: 64, “used_prcnt”: 29,
“device”: “/dev/sda1”,
“mount_pt”: “/mnt/torrents”}},
“memory”: {“size_mb”: “3838.922”,
“free_mb”: “3463.617”},
“cpu”: {“hardware”: “BCM2711”,
“model”: “ARMv7 Processor rev 3 (v7l)”, “number_cores”: 4,
“bogo_mips”: “504.00”, “serial”: “10000000844dfbe2”,
“load_1min_prcnt”: 0.0, “load_5min_prcnt”: 0.5,
“load_15min_prcnt”: 0.0}, “throttle”: [“throttled = 0x0”, “Not throttled”],
“temperature_c”: 41.8, “temp_gpu_c”: 41.8,
“temp_cpu_c”: 41.4,
“reporter”: “ISP-RPi-mqtt-daemon v1.6.0”, “report_interval”: 5}}

{“name”: “Rpi Monitor Raspberrypi”,
“uniq_id”: “RPi-e45f01Mon67f18d_monitor”,
“dev_cla”: “timestamp”, “stat_t”: “~/monitor”,
“val_tpl”: “{{ value_json.info.timestamp }}”,
“~”: “home/nodes/sensor/rpi-raspberrypi”,
“pl_avail”: “online”, “pl_not_avail”: “offline”,
“ic”: “mdi:raspberry-pi”,
“avty_t”: “~/status”,
“json_attr_t”: “~/monitor”,
“json_attr_tpl”: “{{ value_json.info | tojson }}”,
“dev”: {“identifiers”: [“RPi-e45f01Mon67f18d”],
“manufacturer”: “Raspberry Pi (Trading) Ltd.”,
“name”: “RPi-raspberrypi”,
“model”: “RPi 4 Model B r1.4”,
“sw_version”: “bullseye 5.15.32-v7l+”}}


Dati per configurazione file: config.ini

Configuration file for RPi-Reporter-MQTT2HA-Daemon

Source: https://github.com/ironsheep/RPi-Reporter-MQTT2HA-Daemon

Uncomment and adapt all settings as needed.

Some settings can be configured by environment variables.

If an env variable is set, it takes precedence over settings in this file

[Daemon]

Enable or Disable an endless execution loop (Default: true)

#enabled = true

This script reports RPi values at a fixed interval in minutes [2-30], [Default: 5]

#interval_in_minutes = 5

default domain to use when hostname -f doesn’t return a proper fqdn

#fallback_domain = home

[MQTT]

The hostname or IP address of the MQTT broker to connect to (Default: localhost)

Also read from the MQTT_HOSTNAME environment variable

hostname = 192.168.178.30

The TCP port the MQTT broker is listening on (Default: 1883)

Also read from the MQTT_PORT environment variable

port = 1883

Maximum period in seconds between ping messages to the broker. (Default: 60)

#keepalive = 60

by default Home Assistant listens to the /homeassistant but it can be changed for a given installation

likewise, by default this script advertises on the same default topic. If you use a different

discovery prefix then specify yours here. [default: homeassistant]

discovery_prefix = homeassistant

NOTE: The MQTT topic used for this device is constructed as:

{base_topic}/{sensor_name}

The MQTT base topic under which to publish the Raspberry Pi sensor data topics.

#base_topic = home/nodes

The MQTT name for this Raspberry Pi as a sensor

#sensor_name = rpi-{hostname}

The MQTT broker authentification credentials (Default: no authentication)

Will also read from MQTT_USERNAME and MQTT_PASSWORD environment variables

username = mqtt_user
password = bioversityundesa2018

Enable TLS/SSL on the connection

#tls = false

Path to CA Certificate file to verify host

#tls_ca_cert =

Path to TLS client auth key file

#tls_keyfile =

Path to TLS client auth certificate file

#tls_certfile =

ok, maybe I see what’s happening.

In each of your config files uncomment the above line.

Then change the value to be appropriate to your host name:

  sensor_name = rpi-nas

-or-

   sensor_name = rpi-deluge

Then restart the daemon on each and see if they both appear.

If you send me the advertisement info for each I can better see what’s happening.
You sent the advert for different sensors for the NAS and DELUGE RPi’s - it would be better if you sent the advert. data for the same sensor .
(meaning you sent DISK USED sensor: “uniq_id”: “RPi-e45f01Monb09180_disk_used”, and MONITOR sensor: “uniq_id”: “RPi-e45f01Mon67f18d_monitor”)

Send the _monitor sensor data for both instead so they can more directly be compared.

Anyway, this should help you. I think your systems just need an adjustment to their config.ini files.

I look forward to hearing…

Regards,
Stephen

Good evening Stefano finally following your suggestions I was able to get individual information for the NAS and DELUGE as you said You were just a matter of writing in the config.in the value rasy-xxxxx
Thank you for your contribution and if I need to, I will disturb you again.
I must also thank you for suggesting the use of MQTT Explorer, a really great tool.
Thanks Claudio

I had a ton of issues getting and keeping this thing working and it only gave 5 sensors. I switched to Glances, it can run on Linux, windows, Pi’s and it allows you to track much more about the hardware if you want. Also, it requires no messing with any annoying MQTT and took a fraction of the time to set up multiple pc’s and pi’s than it did to get RPi monitor to work on 1 pi.!

https://glances.readthedocs.io/en/latest/api.html
Screenshot from 2022-11-03 17-07-02|616x500

I tried the Glances integration, but it is missing some key sensor, most notably, network throughput. I have had no problems RPi-Reporter-MQTT2HA-Daemon once I read ALL the directions over the three GitHub links. (I missed how to get the command buttons working when the script is run as a daemon.)

The script is running well, and I have been customizing the sensors using templates, but for the life of me, I cannot figure out how to get the health chips/buttons to appear. https://github.com/ironsheep/lovelace-rpi-monitor-card/blob/562180b6a35bb76cbd332e15bf3d4c581048f58e/DOCs/images/newIndicatorsV2.png

If someone has done this, I’d really appreciate a nudge in the right direction.

Thank you.

Thanks for everyone’s help. Was able to get all 4 pi’s reporting and doing remote commands by following the guide.

There was some back and forth on setting this up on the HAS - anyone get that successfully completed? How can I have a card w/ the HAS Pi information? ended up just using systemmonitor

How do I get more data into the cards? i.e the IP address? I only have the 5 sensors created

First I am only just getting started on home assistant and trying to use the card on my home assistant running on a raspberry Pi 4. I have installed mqtt and terminal and ssh but I cannot work out how to get the daemon installed as I keep getting the error sudu is an unknown command. How do I get to where I can install it or do I need to do something different in Home assistant. I have the card installed and the java script so I assume once I get the daemon installed it will fly.

are you installing on a DIFFERENT rpi4 (not your HAS)?

Ok, so I am a dumb you know what! My mqtt config just never changes and I forgot about the sensor file format change a few versions back and was editing my old reference file, in the wrong format and was expecting the thing to work!

So, I love and use this card often… but I have hit a snag in my latest attempt with a new pi. I have built a pi terminal server for a couple of random devices that I want remote console access to, the pi is not online all of the time like my others. This is where the problem appears, I would like to create a card that appears when the pi is up and hides when the pi is down. The appear is very easy, just turn it on and wait… the disappear is not so easy, when I turn it off it never goes away!

I think the problem is that the main sensor is retained, and I do not know how to change that behavior.

If I turn the pi off and reboot HA, the card is properly hidden as the sensors return unavailable state.

Off state:
image

On state:
image

Card config:

type: conditional
conditions:
  - condition: state
    entity: sensor.rpi_ts_pi_home_rpi_monitor_ts_pi
    state_not: unavailable
card:
  type: custom:rpi-monitor-card
  entity:
    - sensor.rpi_ts_pi_home_rpi_monitor_ts_pi
  card_style: glance
  temp_scale: f
  temp_severity:
    - color: '#00e64d'
      from: 0
      to: 60
    - color: '#ff944d'
      from: 61
      to: 80
    - color: '#ff4d4d'
      from: 80
      to: 100
  fs_severity:
    - color: '#00e64d'
      from: 0
      to: 40
    - color: '#ff944d'
      from: 41
      to: 75
    - color: '#ff4d4d'
      from: 76
      to: 100

So further update… I found an mqtt topic that reflects the state of the pi…
image

And I added the following sensor to my mqtt.yaml included file:

    - name: "rpi_ts_status2"
      icon: mdi:lan
      state_topic: "home/nodes/sensor/rpi-ts-pi/status"

The mqtt broker sees the inbound state, but the sensor is never built or populated… it does not appear in developer tools as a sensor. Why, what in the hell am I doing wrong? I have dozens of sensors in my mqtt.yaml and all of them are working.