I have a silly solution that’s been working well enough for my needs:
shell_command:
set_wallpanel_brightness: ssh -i /config/id_ed25519_thinksmart -o StrictHostKeyChecking=no [email protected] 'echo {{ level }} > /sys/class/backlight/backlight/brightness'
wallpanel_restart_dashboard: timeout 10 ssh -i /config/id_ed25519_thinksmart -o StrictHostKeyChecking=no [email protected] './dashboard.sh'
id_ed25519_thinksmart
is just a SSH key I generated in my HA config directory, whose pubkey I deployed to the ThinkSmart device (in ~/.ssh/authorized_keys
).
'./dashboard.sh'
is just a shell script on the device that kills Firefox and starts it again in Kiosk mode. In practice I never really need to do this, but it’s nice having a way to force the device back into its “good” state if needed. Just to be safe, I have an automation trigger this nightly.
These become actions that you can call in Scripts/Automations, e.g.
action: shell_command.set_wallpanel_brightness
data:
level: 1000 # Any number 0-4095 works here
I’m not sure what command would turn the display completely off and back on (dpms doesn’t seem to be available), but a backlight brightness of 0
is extremely dim and not distracting IMO.
You can also use SSH commands to populate sensors / read values:
command_line:
- sensor:
name: ThinkSmart View Used Memory Percentage
unique_id: wallpanel-ssh-used-memory
command: ssh -i /config/id_ed25519_wallpanel -o StrictHostKeyChecking=no [email protected] -- free | grep Mem | awk '{print $3/$2 * 100.0}'
unit_of_measurement: '%'
scan_interval: 15