This page last changed on Oct 04, 2013 by puthplaza.


I finnaly found a way to turn on my samsung TV with openremote. Possibly it will help somebody out here.
I hooked up a raspberry pi with raspbmc installed as a media center. It´s connected via HDMI.
Openremote is also running on another raspberry pi.

Step 1.
Create a .sh file on raspbmc that turns on the TV (/home/pi/
This file contains: (cec client seems to be in the standard raspbmc distr.)
echo "on 0" | cec-client -s

Step 2.
Create a .sh file on the openremote controller that calls the file in step 1.
This file contains:
ssh pi@ bash -l -c "/home/pi/" > /dev/null

Step 3.
Make sure no password is required when U start the file in step 2.
Here's the howto:
Note: OpenRemote is running as root on my raspberry. Make sure there's a passwordless login for user root.

Step 4.
Create a command in Openremote which calls the file in step3 (Shell execution protocol) and hookup your button to call it in your design.

Note: Don.t forget to make the sh files executable. ( chmod +x )


How to tell if your TV is on or off:
Step 1.
Create a file called on your openremote server. contains:

for i in {1..3}
onOff=$((ping -c 1 $1 >/dev/null && echo on) || echo off)
#printf "${onOff}"
if [ $onOff = "on" ]
sleep 1
printf "${status}"

Step 2.
Create a command in openremote

Step 3.
Hookup a sensor to command in step 2

Note: I also use this ping script to ping my smartphone. This way OpenRemote can detect if I'm home.

tv ping.png (image/png)
pingscript.png (image/png)

Michel, nice post. Do use {code}...{code} instead of the html tags to include your code. No back slash in {code} closing tag!

Posted by pz1 at Oct 04, 2013 12:01

Done! Thank you.

Posted by puthplaza at Oct 04, 2013 12:03

Nice I wish Samsung would be able to use Wake-On-Lan though.

Posted by mredeker at Oct 05, 2013 21:26
Document generated by Confluence on Jun 05, 2016 09:32