Jump to content


Photo
* * * - - 1 votes

IP control of a Samsung TV


  • Please log in to reply
34 replies to this topic

#16 mikefamig

mikefamig

    Cocoonut

  • Registered
  • PipPipPipPip
  • 3474 posts
  • Experience:novice
  • Hardware:Elk M1
  • Tech:UPB
  • CCTV:ip

Posted 22 November 2015 - 03:47 PM

Does this help at all? A few Samsung smart tv's are listed as targeted devices

 

http://developer.samsung.com/web-api



#17 wkearney99

wkearney99

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1498 posts
  • Location:Bethesda, MD USA
  • Experience:guru
  • Software:EventGhost, Girder, Mister House, NetRemote
  • Tech:X10-PLC, X10-RF, Z-Wave, ZigBee, RadioRA, RadioRA2, Crestron, xAP, xPL
  • Audio:Russound
  • Video:Windows Media Center
  • CCTV:analog, dvr
  • Phone:Asterisk, Grandstream, Linksys PAP2, OBi100/110, POTS, VoIP via ISP

Posted 22 November 2015 - 04:07 PM

Hmmm, might be.  I'm not quite prepared to spend time coding a solution to it.  

 

I'll have to see if iRule already supports it or not.



#18 BaduFamily

BaduFamily

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 236 posts
  • Twitter:cazwax
  • Experience:novice
  • Software:Harmony, Custom
  • Hardware:Elk M1, Custom
  • Tech:Custom
  • Audio:Custom
  • Video:AirPlay
  • CCTV:ip
  • Phone:POTS, VoIP via ISP

Posted 23 November 2015 - 06:42 PM

Last time I looked at that API it's intended for the creation of HTML5 apps running in the TVs sandbox.

Unfortunatly the TV has to be running for that type of app to respond.

 

hmm.

ESP8266 IR blasers are a thing

 



#19 Desert_AIP

Desert_AIP

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1847 posts
  • Location:Washington
  • Experience:average
  • Hardware:HAI OmniPro II, Ocelot, RUC-01
  • Tech:X10-PLC, UPB, ZigBee, Custom
  • Audio:HAI
  • CCTV:ip, dvr
  • Phone:POTS

Posted 18 March 2016 - 02:43 PM

necroposting this thread with a related question.

 

Total newb and in my infancy to programming and understanding the Raspberry Pi, python, Linux, etc.

Learning fast.  Great little box.

 

I have the Raspberry pi setup with CEC and can control the TV via the command line.

It also routes my IP cameras and displays them properly.

 

Now.

What type of command can I send from my Omni Pro to the RPi to trigger it send the CEC commands?

 

I'd really like to use an http post (is that the correct terminology?) or something via the network.

ssh in enabled on the RPi.

I don't want to use my last Omni serial port.

I could kludge together an Omni output relay to an RPi GPIO input.

There has to be something more elegant, something more "21st Century"

 

I'm having difficulty finding the right information regarding how to send the command to the RPi to trigger it and execute.

I think I can send an HTTP command from an executed button in Automation Studio (when my touchscreen pops up on the driveway camera), so that is the route I am exploring.

 

Thanks!



#20 BobS0327

BobS0327

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 468 posts
  • Software:Open Source Automation
  • Hardware:Custom
  • Tech:Z-Wave
  • CCTV:analog
  • Phone:Ooma

Posted 18 March 2016 - 04:30 PM

What type of command can I send from my Omni Pro to the RPi to trigger it send the CEC commands?

 

One possible option would be to use JomniLink on the RPI.  Jomnilink would receive notifications from the OP2 such as button pushes etc.  It would execute the CEC commands based on specific button pushes received.

 

JomniLink is on github at https://github.com/d...aldan/jomnilink



#21 BobS0327

BobS0327

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 468 posts
  • Software:Open Source Automation
  • Hardware:Custom
  • Tech:Z-Wave
  • CCTV:analog
  • Phone:Ooma

Posted 17 April 2016 - 05:06 PM

necroposting this thread with a related question.

 

Total newb and in my infancy to programming and understanding the Raspberry Pi, python, Linux, etc.

Learning fast.  Great little box.

 

I have the Raspberry pi setup with CEC and can control the TV via the command line.

It also routes my IP cameras and displays them properly.

 

Now.

What type of command can I send from my Omni Pro to the RPi to trigger it send the CEC commands?

 

I'd really like to use an http post (is that the correct terminology?) or something via the network.

ssh in enabled on the RPi.

I don't want to use my last Omni serial port.

I could kludge together an Omni output relay to an RPi GPIO input.

There has to be something more elegant, something more "21st Century"

 

I'm having difficulty finding the right information regarding how to send the command to the RPi to trigger it and execute.

I think I can send an HTTP command from an executed button in Automation Studio (when my touchscreen pops up on the driveway camera), so that is the route I am exploring.

 

Thanks!

 

I was fiddling around with some Java HTTP server code and maybe something like the following  server code would be of some help to you..

 

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;

public class OmniHttpServer {

    public static void main(String[] args) throws Exception {
        HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0);
        // http://XXX.XXX.XXX.XXX:8080/TV_On
        server.createContext("/TV_On", new TV_OnHandler());
        //  http://XXX.XXX.XXX.XXX:8080/TV_Off
        server.createContext("/TV_Off", new TV_OffHandler());
        server.setExecutor(null); // creates a default executor
        server.start();
    }

    static class TV_OnHandler implements HttpHandler {
        public void handle(HttpExchange t) throws IOException {
            // Place CEC command to turn TV on here    
            String response = "TV Turned On";
            t.sendResponseHeaders(200, response.length());
            OutputStream os = t.getResponseBody();
            os.write(response.getBytes());
            os.close();
        }
    }

    static class TV_OffHandler implements HttpHandler {
        public void handle(HttpExchange t) throws IOException {
            // Place CEC command to turn TV Off here
            String response = "TV Turned Off";
            t.sendResponseHeaders(200, response.length());
            OutputStream os = t.getResponseBody();
            os.write(response.getBytes());
            os.close();
        }
    }
}




The above code can also be executed from a browser.  For example to turn on tv enter http://xxx.xxx.xxx.xxx:8080/TV_On where xxx.xxx.xxx.xxx can be either your local or WAN IP address.  I'm thinking that somehow you can implement this HTTP command into your Automation Studio.  You would also have to add the appropriate CEC commands to the Java code.



#22 Sparkman1

Sparkman1

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 123 posts
  • Experience:average
  • Hardware:DSC, Custom
  • Tech:X10-PLC, X10-RF, Z-Wave, 1-Wire, Custom
  • Audio:Squeezebox
  • Video:Custom
  • CCTV:ip
  • Phone:VoIP via ISP

Posted 17 April 2016 - 06:40 PM

I use plink.exe which is a command line version of putty to turn on my LGTV using by issuing a CEC command from a Pi.  Not sure if you have a way to run plink with your system (I run it using HomeSeer).

 

Cheers

Al



#23 BobS0327

BobS0327

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 468 posts
  • Software:Open Source Automation
  • Hardware:Custom
  • Tech:Z-Wave
  • CCTV:analog
  • Phone:Ooma

Posted 18 April 2016 - 12:17 PM

Well, boredom set in and I modified DigitalDan's Jomnilink code to control any CEC enabled TV via a Leviton/HAI console.  The code that I posted on my github repo ONLY turns on a tv from a button push on the console.  In the demo, button 25, (TVOn) will send a command to the RPI which in turn will turn on the TV.  But it's a trivial task to implement additional functionality such as turning off the TV or selecting various channels such as NatGeo, American Heroes Channel etc.  Just check out the Main.java file for examples on how to  implement CEC calls.

 

My CECJomnilinkII github repo link https://github.com/B.../CECJOmniLinkII

 

DigitalDan's link https://github.com/d...aldan/jomnilink

 

Who says you can't bring an old 20th century controller into the 21st century.

 

 



#24 Desert_AIP

Desert_AIP

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1847 posts
  • Location:Washington
  • Experience:average
  • Hardware:HAI OmniPro II, Ocelot, RUC-01
  • Tech:X10-PLC, UPB, ZigBee, Custom
  • Audio:HAI
  • CCTV:ip, dvr
  • Phone:POTS

Posted 18 April 2016 - 03:56 PM

I've managed to turn the TV on and off with the RPi via CEC and select the RPi as the active source on HDMI4, but I have been unable to command it to return to HDMI1.

 

Does that Jomilink run in the environment of some other service running, or is it a standalone python script that can be placed anywhere and executed?

 

 

I looked at the Indigo Domotics linked above and it appears to be part of a larger package.  I am flummoxed as to how to use it.



#25 BobS0327

BobS0327

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 468 posts
  • Software:Open Source Automation
  • Hardware:Custom
  • Tech:Z-Wave
  • CCTV:analog
  • Phone:Ooma

Posted 18 April 2016 - 05:09 PM

Does that Jomilink run in the environment of some other service running, or is it a standalone python script that can be placed anywhere and executed?

 

The JomniLink app is a Java standalone app that can be located and executed from anywhere.  It's not a python script. You'll have to use the Apache Ant build tool to compile the Java code.  Once successfully compiled, you'll have to locate the JomnLinkII jar file and execute the jar file as indicated in the Readme.md file.  The JomniLink app receives notifications from the OP2 controller and processes the button notifications thru  LibCEC

 

 

I looked at the Indigo Domotics linked above and it appears to be part of a larger package.  I am flummoxed as to how to use it.

I'm somewhat confused by  the "Indigo Domotics" term.  Nothing in the two links I posted refer to "Indigo Domotics".  I would suggest you download my CECJomniLink github package.  Find the folder that contains the build.xml file. You must then execute  ANT in that folder.  This will compile all the source code.  If you have a successful compile, you will find a JOmniLinkII jar file in the build/jar folder.  This jar file is executed as follows:

java -jar jOmniLinkII.jar 192.168.1.101 4369 00:01:02:03:04:05:06:07:08:09:0A:0B:OC:0D:0E:0F

The app is very verboose.  So, wait until you see the message indicating the the "Communication thread is running" before activating any buttons.



#26 Desert_AIP

Desert_AIP

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1847 posts
  • Location:Washington
  • Experience:average
  • Hardware:HAI OmniPro II, Ocelot, RUC-01
  • Tech:X10-PLC, UPB, ZigBee, Custom
  • Audio:HAI
  • CCTV:ip, dvr
  • Phone:POTS

Posted 18 April 2016 - 11:38 PM

Indigo Domotics was linked on the previous page.

Speaking of somewhat confused...you lost me at Apache Ant. :-)

#27 BobS0327

BobS0327

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 468 posts
  • Software:Open Source Automation
  • Hardware:Custom
  • Tech:Z-Wave
  • CCTV:analog
  • Phone:Ooma

Posted 19 April 2016 - 03:29 PM

Speaking of somewhat confused...you lost me at Apache Ant. :-)

 

Apache Ant is a software tool used to automate software build processes. The build files used as input to Ant are XML files.  The Ant acronym means Another Neat Tool.

 

I do just about all my development work on a Windows machine.  For example, I build the JomniLink app on a Windows box and then copy the jar file over to the RPI for execution.

 

Here's a link explaining how to install Ant on a Windows box http://www.mkyong.co...ant-on-windows/

 

Ant is what you'll need to build JomnLink.



#28 ellisr63

ellisr63

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 146 posts
  • Location:Mexico
  • Experience:novice
  • Hardware:ISY-99
  • Tech:INSTEON
  • Video:XBMC

Posted 17 December 2018 - 11:09 AM

I know this is an old thread, but I just found out you can turn on some Samsung TVs via a wall outlet. I can now turn my Samsung on and off with an Insteon outlet as long as the TV was in the on state when you turned it off with the outlet. This works great for me as I use it as a monitor only...now I only need a way to change the volume without using the remote.

Edited by ellisr63, 17 December 2018 - 11:22 AM.


#29 LarrylLix

LarrylLix

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1243 posts
  • Location:Northern SouthWestern Ontario
  • Experience:guru
  • Software:Custom
  • Hardware:ISY-99, Custom
  • Tech:INSTEON, 1-Wire, Custom
  • Audio:Custom
  • CCTV:ip
  • Phone:Ooma

Posted 17 December 2018 - 11:43 AM

I know this is an old thread, but I just found out you can turn on some Samsung TVs via a wall outlet. I can now turn my Samsung on and off with an Insteon outlet as long as the TV was in the on state when you turned it off with the outlet. This works great for me as I use it as a monitor only...now I only need a way to change the volume without using the remote.

That's awesome! Thanks and good to know. It must remember it's last state.

 

I have been mentally working up to controlling my Sansung TV from my ISY994i for some time. I got tired of studying code but the Plug-in module would be so much easier and energy saving also.

 

I have been turning it on with the WoL command in ISY994i but never figured out how to turn it off again. Even a combination in case it fails to turn on from the Insteon Plug-in would work.

 

There would be some concern about the power kill switching causing some glitches inside the electronics though.

 

All my other A/V controls are done via ISY994i's Network Resources built in directed at the smart receiver.


Edited by LarrylLix, 17 December 2018 - 11:45 AM.


#30 ellisr63

ellisr63

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 146 posts
  • Location:Mexico
  • Experience:novice
  • Hardware:ISY-99
  • Tech:INSTEON
  • Video:XBMC

Posted 17 December 2018 - 12:09 PM

I also have the isy994i, but I have not ventured to the Network module. I have the Zwave module...can you have both? Do you know if I can control my Yamaha CXA 5100 via the ISY too? I like to have multiple ways to control everything in case any one way fails.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users