NEWS
RPI-Monitor Adapter - display_power?
-
Hallo!
Wäre es möglich über "vcgencmd display_power 1" den aktuellen Status der HDMI Anschlüsse in einem DP zu erhalten? Sogar steuerbar???
Warum? Ich habe ein Touch in der Wand verbaut, das sich leider nicht über Blacklight ansteuern läßt. Mit einer Javacript Funktion schalte ich aktuell den HDMI Ausgang des RPI4 ab und ein.Meine Function:
node_ssh = require('node-ssh'); ssh = new node_ssh(); ssh.connect({ host: '192.168.xxx.xxx', username: 'pi', password: 'total_sicher' }).then(() => { ssh.execCommand("vcgencmd display_power 0"); # oder mit "1" ein })
Quelle:
display_power [0 | 1 | -1] [display]Show current display power state, or set the display power state. vcgencmd display_power 0 will turn off power to the current display. vcgencmd display_power 1 will turn on power to the display. If no parameter is set, this will display the current power state. The final parameter is an optional display ID, as returned by tvservice -l or from the table below, which allows a specific display to be turned on or off.
vcgencmd display_power 0 7 will turn off power to display ID 7, which is HDMI 1 on a Raspberry Pi 4.
Display ID
Main LCD 0
Secondary LCD 1
HDMI 0 2
Composite 3
HDMI 1 7To determine if a specific display ID is on or off, use -1 as the first parameter.
vcgencmd display_power -1 7 will return 0 if display ID 7 is off, 1 if display ID 7 is on, or -1 if display ID 7 is in an unknown state, for example undetected.
Lieben Dank für Eure Meinung im Voraus!
mxa -
@metaxa Hi,
bist du weiter gekommen?Ich überlege gerade/ google:
Meine Überlegung - MQTT
Der RPI4 publisht den aktuellen Monitor state. Dann kann man via ioBroker ganz einfach den gewünschten Status reinschreiben. Wenn der Dann geändert wird (on/off) muss halt der RPI entsprechend vcgencmd display_power 1 bzw. 0 setzen.Sowas sollte doch machbar sein.
Guck mal- gerade gefunden:
https://www.thedigitalpictureframe.com/control-your-digital-picture-frame-with-home-assistents-wifi-presence-detection-and-mqtt/Das sieht wirklich nachdem aus,w as ich gesucht habe!