Screen Manager Recipe
-
I’m running a RP3 with an HDMI TV connecting cable but I’m unable to get the ScreenManager.js recipe working.
When I say my “pattern” it does shut the screen down for 2 seconds but it turns on again right away.
The opposite also don’t work, with the screen off, if I say Jarvis “pattern” he doesn’t turn the screen on.Could this be because I’m using a TV instead of a computer monitor?
I was wondering if I can use something like tvservice -o instead of the “vcgencmd display_power 0” the recipe itself? But I have no idea how…Thanks
-
Já experimentaste algum destes comandos?
sudo tvservice -o to turn off
sudo tvservice -p to turn onUm destes 4 exemplos deita o monitor abaixo.
Aparece o sinal sem hdmi. O problema é que depois não o consigo ligar.
Experimenta
1- vcgencmd display_power 0
2- sudo tvservice -o
3- DISPLAY=:0 xset dpms force off
4-xset -display :0 dpms force off -
maybe, if your TV is CEC, you can try
echo 'standby 0' | cec-client -s
Note: you have to install
cec-utils
packet to use CEC function
sudo apt-get install cec-utils -y
-
Awesome, thanks guys I’m going to try both
-
@bugsounet said in Screen Manager Recipe:
maybe, if your TV is CEC, you can try
echo 'standby 0' | cec-client -s
Note: you have to install
cec-utils
packet to use CEC function
sudo apt-get install cec-utils -y
I need to try this in the recipe, after installing the cec-utils, right?
It will be something like this?:commands: {
“SCREEN_TURNOFF”: {
soundExec: {
chime: “close”,
},
shellExec: {
exec: “echo ‘standby 0’ | cec-client -s”
}
},
“SCREEN_TURNON”: {
soundExec: {
chime: “open”,
},
shellExec: {
exec: “vcgencmd display_power 1”
}
}
}
} -
It works!!
How can I turn it on now? exec: “echo ‘standby 1’ | cec-client -s” ? -
to on
echo 'on 0' | cec-client -s
-
BINGO!! Thanks man, you rock!
-
Here’s the Recipe code for other people use if they need to use CEC:
/** Screen Manager /
/ Vocal commands script /
/ set partern in your language /
/ @bugsounet **/var recipe = {
transcriptionHooks: {
“SCREEN_TURNOFF”: {
pattern: “Turn your screen OFF in Your Own Language”,
command: “SCREEN_TURNOFF”
},
“SCREEN_TURNON”: {
pattern: “Turn your screen ON in Your Own Language”,
command: “SCREEN_TURNON”
}
},commands: {
“SCREEN_TURNOFF”: {
soundExec: {
chime: “close”,
},
shellExec: {
exec: “echo ‘standby 0’ | cec-client -s”
}
},
“SCREEN_TURNON”: {
soundExec: {
chime: “open”,
},
shellExec: {
exec: “echo ‘on 0’ | cec-client -s”
}
}
}
}exports.recipe = recipe // Don’t remove this line.
-
Don’t forget to save it with a different file name because it will reset on next update
-
@bugsounet said in Screen Manager Recipe:
Don’t forget to save it with a different file name because it will reset on next update
You bet! Thanks again
-
@bmachina
Hello,
For information, this recipe did not work for me.in effect,
echo ‘standby 0’ | cec-client -s
and
echo ‘on 0’ | cec-client -s
did not work for me.
The appropriate commands are:
echo standby 0 | cec-client -s -d 1
and
echo on 0 | cec-client -s -d 1
I have another problem, unable to make the recipe work as it was written in French.
It was necessary to replace the commands with “TURN ON” and TURN OFF "for this to work.
I am still trying to find a solution to this problem.
Hope this can help other people out.
Regards,
-
Awesome thanks for the update @Chris! These ones are also working for me but I do notice sometimes the older ones were returning ShellExec error but only sometimes. I will keep an eye on this ones now.
-
-
@bugsounet
Hello,
Thanks for the compliment.
as I am currently working on CEC utilities in order to save energy on the consumption of the TV connected to the magic mirror (rather useful in France with the price of electricity at the moment …). I looked for a module that could transform a USB camera into a motion detector for waking up and sleeping a CEC compatible screen.
I may have found a solution by modifying a few command lines on an existing module. I continue my tests. If people are interested, I will pass the procedure on.Regards,
-
@chris: humm… maybe another @bugsounet library for this…
-
This post is deleted! -
@chris x2