Read the statement by Michael Teeuw here.
MMM-PIR-Sensor-Lite modification
-
Ok. I think I understand the strategy here. I will just need to figure out the proper HDMI CEC code that I need. Thanks. I’ll let you know how things progress…
-
@Freddy_boy you could copy it out of the ext screen module which worked… (if u still have the older repo installed somewhere)
thats what I did when I was testing PIR and other sensors a year or so ago
-
I attempted to run the CEC commands manually, but that doesn’t work. I just keep getting active source unknown error message. Unfortunately, I don’t have the original EXT-Screen module because I attempted to perform an update on the module, so I only have the updated module. Perhaps the updated module has updated code? But I don’t know where to look for the required commands. I’ve looked at the EXT-Screen.js file and the node_helper.js file and I don’t see anything that looks like a CEC command. Also, the files are difficult to view, as the entire code is written on a single line, so you need to search for text strings to find anything.
-
@Freddy_boy said in MMM-PIR-Sensor-Lite modification:
Also, the files are difficult to view, as the entire code is written on a single line, so you need to search for text strings to find anything.
yes, he has minified the code to prevent others using it… or learning form it…
does this work to list the cec devices?
echo 'scan' | cec-client -s -d 1
-
From SSH connection:
pi@raspberrypi:~ $ echo ‘scan’ | cec-client -s -d 1
opening a connection to the CEC adapter…
requesting CEC bus information …
CEC bus information===================
device #1: Recorder 1
address: 1.0.0.0
active source: no
vendor: Pulse Eight
osd string: CECTester
CEC version: 1.4
power status: on
language: engcurrently active source: unknown (-1)
pi@raspberrypi:~ $ -
Update: I’m not sure how it happened, but I believe that my monitor had the controls disabled. It is an LG monitor using Simplink, and when I enable it, I can now see the device:
pi@raspberrypi:~ $ echo ‘scan’ | cec-client -s -d 1
opening a connection to the CEC adapter…
requesting CEC bus information …
CEC bus information===================
device #0: TV
address: 0.0.0.0
active source: yes
vendor: LG
osd string: TV
CEC version: 1.3a
power status: on
language: engdevice #1: Recorder 1
address: 1.0.0.0
active source: no
vendor: LG
osd string: CECTester
CEC version: 1.3a
power status: on
language: engcurrently active source: TV (0)
However, when I attempt to turn OFF the monitor using the CEC control commands, it doesn’t seem to work. The commands appear to be working (ie. no error messages returned), but the monitor remains ON when I issue the standby command. I also use the ‘power’ command to check the status of the monitor, and it confirms that it is ON.
pi@raspberrypi:~ $ echo ‘pow 0.0.0.0’ | cec-client -s -d 1
opening a connection to the CEC adapter…
power status: on
pi@raspberrypi:~ $ echo ‘standby 0.0.0.0’ | cec-client -s -d 1
opening a connection to the CEC adapter…
pi@raspberrypi:~ $ echo ‘pow 0.0.0.0’ | cec-client -s -d 1
opening a connection to the CEC adapter…
power status: on
pi@raspberrypi:~ $ -
I have also tried:
sudo echo ‘standby 0.0.0.0’ | sudo cec-client -s -d 1but got the same result…
-
@Freddy_boy ok, I have a CEC tv which I can turn OFF, but not back on…
-
Yes, but this used to work previously. I suspect that none of the commands are working (even if no error message is returned). I attempted other commands, and they also do not seem to work. For example, I tried to change HDMI inputs, and the monitor remains at the same input. I think I need to determine if I can get ANY HDMI CEC command to work at all. It seems to be a missing step somewhere…
-
@Freddy_boy I have not studied the CEC commands