This how-to shows how to automatically show your security camera feed to your TV. In this tutorial, I am using a Samsung TV, but should be applicable to other TVs with minor changes here and there. I am also using Orange Pi

Flow (Super quick summary):

Camera motion triggered -> Send to openHAB

openHAB triggers PIP on TV

PIP video feed comes from the Orange Pi through the COAX cable.

SOME NOTES

For my TV (and any other TVs I have owned), you can only PIP with a digital signal and an analog signal. In the case of my TV, the primary display is the HDMI feed, and the PIP display comes from the COAX feed. Most TVs work this way. I still yet to find and own a TV that PIPs two HDMI signals at once.

I have been asked many times (forum, and in person) how I am able to do this Automatic PiP. My initial setup was actually different than this HOW-TO. Instead of using Samsung TV Binding, I am controlling the PiP using my Samsung TV’s EXLINK port. The EXLINK port is a support/developer port in RS232 (UART). I have an ESP8266 connected to this UART port using correct TTL levels. Whenever I explain this to whoever asks, they have no idea what I am talking about. So I recreated the Automatic PIP on my other TV, but instead I am using Samsung TV Binding as demonstration/POC.

1. Requirements

A. Hardware

Note: Get them wherever you can get them the cheapest. I already had them laying around. I just went to Amazon for a quick search and pasted the first link I could find so you know which ones I am talking about.

Samsung TV

(OPiZero)Orange Pi Zero
I am using Orange Pi zero since it’s more lightweight than the bigger Raspberry Pi. It also has an ethernet jack unlike the rPi zero.

Notes:
For my setup, I am not just using a blue iris feed, my URL points to a small web page with a few scripts. This small web app has a websocket connection to OH to trigger what shows on the web page. For example, based on a rule, instead of displaying the feed, I display a caller ID whenever someone calls. If you are not familiar with javascript/web, I suggest just using HABPanel as the URL for step 2.A.4.a. This is optional. You can always just use your webcam/blueiris feed.

You can also use something else than chromium. I was initially using mplayer to play the Blue Iris stream on a headless OPiZero, but I figured chromium is better since I can easily create the web page.

tvpip_familyroom_switch_noscript is just another item I can toggle without triggering any rule.

Some caveats with Samsung TV Binding
When you send a PIP command, you cannot tell if it was successful or not. Usually it is. The issue here is that if there’s any timing issue with your Blue Iris or you already have the PIP on. What happens is BlueIRIS will still send the POST request, OH will issue the PIP command, and PIP will instead turn off (assuming PIP was already ON). With EXLINK, when you send a PIP, it gives you feedback/response through the UART port. The issue is mitigated/handled by the rule.

4. Rule

Note how we do not process the OFF state. We do this in a timer. This way, our item can receive multiple "ON"s and we only process it if the timer is not running already.

I highly recommend everyone to use isRuleEnabled as I did above. This allows me to enable/disable a rule with just a variable value change.

The BlueIRIS “OFF” configuration (screenshot above) is for demonstration purposes only. My OH do not process the OFF at all. I do this from the rule above… But I can see this useful for other people. BlueIRIS can send a POST request once the motion has “ended”

5. Hardware Setup

Attach your 3.5mm cable to orangePi TV OUT jack

Attach the other end of this cable to your CoAX converter

Attach coax to your tv coax.

Test pip work (even without signal)

Notes on hardware

I am not using a converter. I made my own. Note that coax is expecting RF signal. Im also not using the orange pi expansion board, I soldered mine to the orange pi pins (GND and pin 13)

If your TV does not currently have an OH binding, and your TV does not have a developer port, you can still automate PIP using an infrared remote module. I did this on my old TV in the garage using ESP8266 and some IR emitters.

Instead of using Samsung TV Binding, I am controlling the PiP using my Samsung TV’s EXLINK port. The EXLINK port is a support/developer port in RS232 (UART). I have an ESP8266 connected to this UART port using correct TTL levels. Whenever I explain this to whoever asks, they have no idea what I am talking about.

I do. My KEY_PIP_ONOFF command only opens a dialog and I would love to access the PIP in one go.
Could you share that set-up, please?
I don’t mind a PM.
I have a spare ESP board
I have a TTL level converter
Would love to see more details, thanks

The EXLINK is specific to Samsung. I would suggest checking first if your Samsung TVs have an EX-LINK port, and that you can enable UART through the Service Menu (google-able). Some Samsung TVs, even though they have an EX-LINK port, are “read-only” ports.