Hey @SimonE,
Your dream has been through surgery. The best I can do is expose on/off, plus brightness where the panel has a backlight, through an extended API. Your IR remote, a script, Home Assistant or the Manager’s Screen tab can then switch the panel. It came in 0.10.5; get 0.10.6, the current one.
Why your script went quiet: with glass-evo holding the screen there is no Touch Display plugin, so no X server on a Pi, so xset is talking to an empty room. Hence “Unable to determine monitor status”.
What “off” means. Glass uses the strongest switch the panel offers, in this order:
- backlight: a panel with a kernel backlight, such as the official Pi touch displays. Properly out, no backlight power drawn.
- dpms: an HDMI screen and friends. The connector goes to standby (KMS/DRM on a Pi, X on x86).
- dark: nothing to switch. The screen shows black and nothing is drawn, and the Manager owns up that it is dark, not off.
Off holds through playback. Music does not wake a panel you switched off by hand; only the API, the Manager or a touch does. The state survives a restart of the display, and a reboot starts with the panel on. Only the player’s own screen is switched; remotes, the Face tab and Anymote are left alone.
The state:
curl -s 'http://localhost:3000/api/v1/pluginEndpoint?endpoint=glass_screen'
Switch it with on, off or toggle:
curl -s -X POST -H 'Content-Type: application/json' -d '{"endpoint":"glass_screen","data":{"power":"toggle"}}' http://localhost:3000/api/v1/pluginEndpoint
Brightness, backlight panels only, up to the maxBrightness the state reports:
curl -s -X POST -H 'Content-Type: application/json' -d '{"endpoint":"glass_screen","data":{"brightness":120}}' http://localhost:3000/api/v1/pluginEndpoint
From another machine, put the player’s address in place of localhost.
Your script, with xset swapped for the endpoint. The USB ports stay yours:
#!/bin/bash
API=http://localhost:3000/api/v1/pluginEndpoint
state=$(curl -s "$API?endpoint=glass_screen")
if [[ $state == *'"power":"on"'* ]]; then
echo "Screen is ON => Turning OFF"
curl -s -X POST -H 'Content-Type: application/json' -d '{"endpoint":"glass_screen","data":{"power":"off"}}' "$API"
uhubctl -l 3 -a 0
elif [[ $state == *'"power":"off"'* ]]; then
echo "Screen is OFF => Turning ON!"
curl -s -X POST -H 'Content-Type: application/json' -d '{"endpoint":"glass_screen","data":{"power":"on"}}' "$API"
uhubctl -l 3 -a 1
else
echo "Unable to determine screen status"
fi
If the screen is all you want, toggle does it alone and the script shrinks to one curl line. The wiki also has a lircrc example, a Home Assistant rest_command and the Manager’s own route:
Now the small print. The clinic does not keep every screen ever made in the cupboard. This has run on a Pi 5 with the Touch Display 2 (backlight) and on x86 with X (dpms). HDMI on a Pi and the first Touch Display have not been run here. The logic says they should work, but the crystal ball is still in for repairs. If your panel does not do what is written above, the Screen tab shows which means it used. Report it as post 2 asks, full log included, and the patient gets seen.
Kind Regards,