Solving a long standing PITA!

Well, now that I have some serious time in with NR, MQTT, etc. I am going to solve a PITA. Most PC video cards do NOT support CEC (Consumer Electronics Control) protocol. Including the two video adapters I have in my core media hub, a Windows 10 desktop that is connected to several monitors and TV sets.

Here is the PITA, when the Windows 10 screen saver kicks in, the DCC compatible monitors go into low power mode or power off depending the configuration and version of DCC they support. But the TV sets, at least the ones I have don't talk DCC only CEC. So I writing a small .NET desktop application that monitors for the screen saver process start and stop, and when it senses such events, it sends via MQTT requests to my centralized Pi, and then said requests are translated to CEC commands, and bingo my CEC TV sets go into standby mode while the screen saver is active. PITA solved.

Anyone done anything like this? If so, would like to hear about it, might give me ideas on how to improve or change my pending implementation.

I already have the bones in place, given when my PC powers on or off, it sends MQTT commands to my centralized Pi, turning all kinds of things on and off as desired. Like if I walk into my home office, before for the sun is up? It is still dark? The light come on. It is so nice to not have to 'talk' to some device, that stuff just knows what to do, in context!

Are you using node-red-contrib-cec?

Surely this can be done in node?

Not sure if it the same thing. I use the ARP node which in my use can tell me if the TV is on or on Standby,if it on then the TV MAC address is in the ARP table it returns if its off its not.

So i do that as well for my PC, takes a couple mins before the ARP table refreshes but it useful
so it can update my Dashboard.. esp if i choose to turn with off via there original power buttons
and not via an automation script.

It is done in node... but for the Windows event log monitoring. The windows task manager sets up a task that monitors the windows (security) event log... when an event for lock or unlock system, or saver on or off, events hit, the task runs a small powershell script, that does MQTT publish, to NR.

I do not want to run NR on my Windows 10 desktop, so that limits the options. I also do not want to open any entry points into my Windows 10 desktop... so no exposing the logs to an external entity. Both of these methods would work of course, but for the fact that I want Windows 10 desktop of be as secure as possible with minimum effort or complexity.

Using the ARP is a nice idea. One my TVs are only connected via HDMI, so I have one HDMI port going to the Pi, and one HDMI port to the Windows PC. This is how I can send PC video and do CEC via Pi. The other TV is on the LAN, so I could use ARP for that one.

To watch the PC state I have a NR flow that just watches the PC via ping, and when the ping is successful and the TV state is off, I CEC on to the TV. When the ping fails and TV state is on, I CEC standby to the TV. This is similar in concept using ARP.

The only thing I can't do with my setup is determine the device signal source state for the TV via CEC. CEC can report power state, and a bit more, but it can't tell you what channel or volume level, and CEC standard specification can't even tell you which HDMI port is active, I really wish I could query the TV(s) for which HDMI port is active, with 4 HDMI ports, I can't assume that the PC to TV HDMI port is active all the time.

Oh, right now... Proof of concept done in PowerShell and Task Manager, final version will be a .NET app/service based. But so far, the PS/TM method works great. If the screensaver turns on or off the TV mirrors off and on. If I lock my desktop the TV turns off, and unlock the TV turns on.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.