pyCECpi - Case for Raspberry Pi Zero for pyCEC

Hi all,

I had been trying to find a neat solution for the raspberry pi zero that sits behind my TV to run pyCEC and interface to home assistant. I also had a problem that I don’t have many HDMI ports on my TV and could not waste one on the pi. This is the solution I came up with:

TotalGriffLock/pyCECpi: Building a raspberry pi into a robust HDMI-CEC IP interface


Hopefully it is useful to someone.

Cheers!

I had to do some research to see what CEC is and why I would want Home Assistant to interface with it.

Can you capture CEC commands in Home Assistant and then replicate then from, for example, an automation to turn on the TV and set the input source?

I am thinking- I have a security camera on my driveway, and it would be nice to turn on the TV and select the input from that camera.

Is there a standard list of CEC commands?

Yes, exactly that. The pyCEC / Home Assistant integration has existed for ages. I have a 2016 55" 4K HDR Samsung TV which is a year too early to support SmartThings but is too good a panel to justify replacing when it works fine as a screen. Adding this makes it HA controllable.

I do what you have suggested with a Unifi doorbell and Viewport. When the doorbell rings it turns the TV on (if it is not already), switches input to the viewport, switches the viewport to a view of the doorbell, then 20 seconds later switches it all back.

This case was just a way to tidy it all up and not lose an HDMI input.

Have a look here for more info about pyCEC and Home Assistant.