Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display RPi4 EEPROM version information in HA #2586

Closed
cjmjmartens opened this issue Jun 10, 2023 · 1 comment
Closed

Display RPi4 EEPROM version information in HA #2586

cjmjmartens opened this issue Jun 10, 2023 · 1 comment
Labels
board/raspberrypi Raspberry Pi Boards invalid

Comments

@cjmjmartens
Copy link

Describe the issue you are experiencing

I am using the code below in command_line.yaml to display the RPi4 EEPROM version information in HA. Since a couple of weeks, this function is not working anymore. The entity is reporting "unknown".

- sensor: name: RPi Firmware command: | sh -c 'ts=$(/opt/vc/bin/vcgencmd bootloader_version | sed -E -n -e "s/timestamp (.*)/\1/p") && date -u -d @$ts -I'

In the system log, the following error is displayed:

Logger: homeassistant.components.command_line.utils
Source: components/command_line/utils.py:54
Integration: Command Line (documentation, issues)
First occurred: 22:19:17 (1 occurrences)
Last logged: 22:19:17

Command failed (with return code 1): sh -c 'ts=$(/opt/vc/bin/vcgencmd bootloader_version | sed -E -n -e "s/timestamp (.*)/\1/p") && date -u -d @$ts -I'

What operating system image do you use?

rpi4-64 (Raspberry Pi 4/400 64-bit OS)

What version of Home Assistant Operating System is installed?

10.2

Did you upgrade the Operating System.

No

Steps to reproduce the issue

  1. Add the following code to command_line.yaml:
    - sensor: name: RPi Firmware command: | sh -c 'ts=$(/opt/vc/bin/vcgencmd bootloader_version | sed -E -n -e "s/timestamp (.*)/\1/p") && date -u -d @$ts -I'
  2. Add the following code to configuration.yaml: "command_line: !include command_line.yaml".
  3. Restart HA
  4. Check status of "RPi Firmware" entity
    ...

Anything in the Supervisor logs that might be useful for us?

No information related to this issue

Anything in the Host logs that might be useful for us?

No information related to this issue

System information

System Information

version core-2023.6.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.3
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4880
Installed Version 1.32.1
Stage running
Available Repositories 1286
Downloaded Repositories 19
AccuWeather
can_reach_server ok
remaining_requests 34
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.2
update_channel stable
supervisor_version supervisor-2023.06.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 457.7 GB
disk_used 18.8 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.2), File editor (5.6.0), Home Assistant Google Drive Backup (0.110.4), Node-RED (14.2.2), AdGuard Home (4.8.9), UniFi Network Application (2.6.0), ESPHome (2023.5.5), Cloudflared (4.1.7), Z-Wave JS (0.1.83)
Dashboards
dashboards 1
resources 16
views 7
mode storage
Recorder
oldest_recorder_run 31 mei 2023 om 20:06
current_recorder_run 10 juni 2023 om 22:18
estimated_db_size 379.22 MiB
database_engine sqlite
database_version 3.41.2

Additional information

No response

@agners agners added board/raspberrypi Raspberry Pi Boards invalid and removed bug labels Jun 12, 2023
@agners
Copy link
Member

agners commented Jun 12, 2023

Note that when you use a command sensor, this command is executed in the context of Home Assistant Core, which is not the same Home Assistant OS. So this is not a OS related issue.

That said, it seems that vcgencmd moved from /opt/vc/bin/vcgencmd to /usr/bin/vcgencmd, presumably because Alpine Linux package raspberrypi-userland changed the path of that program between v3.17 and v3.18. So you'll have to adjust the path of your command.

@agners agners closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/raspberrypi Raspberry Pi Boards invalid
Projects
None yet
Development

No branches or pull requests

2 participants