Author Topic: Control samsung smart tv with vox  (Read 9237 times)

0 Members and 2 Guests are viewing this topic.

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Control samsung smart tv with vox
« on: August 23, 2013, 05:08:46 PM »
I wanted to to control my samsung tv with vox. I dont have a ir blaster so this vox passes the payload to a python script.

You cant turn on the tv if its off with this one. NIC dont work with the power off.

*Updated to VC.TriggerEvent:loaded

*Edit by jitterjames: I uploaded a fixed version of the group xml, which had a strange 'S' in it and other errors in the commands.
« Last Edit: June 28, 2015, 12:22:30 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Control samsung smart tv with vox
« Reply #1 on: August 23, 2013, 05:51:18 PM »
That's very cool.  Thanks for sharing this.

Unfortunately my Samsung TV is not compatible so I have no way of testing it.

Other than editing the python script to change the IP and MAC addresses, is there anything else that must be done for this to work?

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Re: Control samsung smart tv with vox
« Reply #2 on: August 23, 2013, 06:03:12 PM »
Yes, first time your running it you will be prompt with question about access on the tv. Just use the normal remote to accept (just as you have to first time using the samsung app on ios/android)

If you can use the app, this script should works since it sends the same keys. My model is ue55d6300
« Last Edit: August 23, 2013, 06:32:54 PM by Hellow »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Control samsung smart tv with vox
« Reply #3 on: August 23, 2013, 08:25:23 PM »
By the way, I notice that you are executing the python file every time you want to send a command.  This is not necessary, and seems like kind of a waste.  You could execute the file once when VC loads (using VC.loaded event) to define the function, and then just use the execString action in your command when you want to send a key to the TV.

Hellow

  • Contributor
  • ***
  • Posts: 50
  • Karma: 0
    • View Profile
Re: Control samsung smart tv with vox
« Reply #4 on: August 23, 2013, 08:29:03 PM »
Great, i was doing it since it didnt always find the function (changes) Ill read the wiki to see how i can set it up. I knew it had to be better way to do it.

Tiger83

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Control samsung smart tv with vox
« Reply #5 on: September 24, 2013, 02:14:29 PM »
Hello Everyone!
Can you please help me with some minor problem I have?
I've had a Samsung TV worked with this python code fine, but one day it just went crazy and did nothing for me. It hangs Voxcommando for a while and does nothing. I figured it out that my firewall is the problem, if I disable it than it works fine. All the Voxcommando related stuff is allowed to go through my firewall, and as I wrote it had worked for me before. I can't figure it out what happened from one day to another, I haven't messed with any firewall or network related stuff either. Can you suggest me something to try to get it work again?
Thank you in advance!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Control samsung smart tv with vox
« Reply #6 on: September 24, 2013, 03:51:04 PM »
Maybe you can try moving VoxCommando to a new folder and then creating a new firewall exception when asked?

Tiger83

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Control samsung smart tv with vox
« Reply #7 on: September 30, 2013, 02:20:50 PM »
Pretty weird, but after forwarding the communication port 55000 (set in the python file for sending commands) to my TV IP address, everything works just fine. :)
Thanks for your thoughts also!

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Control samsung smart tv with vox
« Reply #8 on: June 28, 2015, 11:48:37 AM »
Hi James, how do I import the commands for this xml and where do I import them too, I tried importing them on a vista computer and that had a vga cable (blue cable) attached to my Samsung TV and couldn't get it to work, so not sure I added the code to the right places.

I am now on a windows 8.1 PC and I am using another Samsung TV with HDMI cable connecting it to the TV and would like to try it out on this computer to see if I can control my new Samsung TV which doesn't have a VGA cable port but the instructions weren't very clear on this original thread.

I know I need to edit one part of the xml with the IP address of vox and the TV but I don't know where that xml and other files need to be added.

Thanks in advance for help with this, be great if I can get this working with the Smasung TV.

Sim
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Control samsung smart tv with vox
« Reply #9 on: June 28, 2015, 12:06:53 PM »
I realize I'm the "head dude" around here, but I did not post this code so I'm not sure I'm the best person to ask.

I can tell you from reading the thread that you will obviously need to have a "smart" Samsung TV which is connected to your LAN with an ethernet cable.  Only certain models will work.  For example, I have a Samsung TV but I am not able to use this method to control my Samsung TV and must control it using IR instead.

The files that end with .py should be placed in the "VoxCommando\PY" folder.

"samsungremote.xml" is a payloadXML file used by the command and should be placed in your "VoxCommando\payloads" folder.

The file "VcGroup_samsungtv.xml" file should be imported into your tree.  I just edited this file to fix some errors; the version here in the code box is the same and is also the corrected version.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.5.1-->
<commandGroup open="False" name="samsungtv" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="247" name="samsung tv remote" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecString</cmdType>
      <params>
        <param>sendkey('{1}')</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>livingroom tv</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\samsungremote.xml</payloadFromXML>
  </command>
  <command id="251" name="onload" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PY.ExecFile</cmdType>
      <params>
        <param>PY\samsung_tvremote.py</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Loaded</event>
  </command>
</commandGroup>

If you need help with the Python etc. or knowing which models of TV it works with, or how to set up your TV networking I don't think I can really help you, because I've never used this.
« Last Edit: June 30, 2015, 03:03:09 PM by nime5ter »

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Control samsung smart tv with vox
« Reply #10 on: June 29, 2015, 04:43:24 PM »
Thanks for that James, appreciated, will let you know if I get it working, got two Samsung TVs, the current one I am using is connected by wifi and hdmi and the other is plugged straight into the broadband hub and has one of those blue vga cables connecting the computer to it since it is an older TV, so will see which works with this, not sure if the blue cable is the RS232 I keep reading about.

I have tried the eventghost plugin on both comps and not had any look with it, on this windows 8 computer it shows com port 1 and on the old vista it doesn't even show a port in the Samsung plugin.

I really want to get my Samsung TV controlled with vox without a blaster.  8)
Sim
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

2exclusive

  • Contributor
  • ***
  • Posts: 54
  • Karma: 0
    • View Profile
Re: Control samsung smart tv with vox
« Reply #11 on: June 30, 2015, 05:23:26 PM »
I wanted to to control my samsung tv with vox. I dont have a ir blaster so this vox passes the payload to a python script.

You cant turn on the tv if its off with this one. NIC dont work with the power off.

*Updated to VC.TriggerEvent:loaded

*Edit by jitterjames: I uploaded a fixed version of the group xml, which had a strange 'S' in it and other errors in the commands.

Im trying to execute this but not working, am I missing something here.

I edited the .py file to include the mac and ip of my samsung tv. I also added the model ES6100 to the model name field also.  I added the files to the right locations also.
when i add the following command (see attached image) and test it, its showing up as ok in the log view but nothing happens to the TV.

anyclues???


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Control samsung smart tv with vox
« Reply #12 on: June 30, 2015, 05:59:54 PM »
Well, you may be doing other things wrong as well, (hard for us to know without seeing a log), but for starters, if you are going to test it in this manner you should remove the curly brackets around 'KEY_POWEROFF'.

I believe the python required a mac address (in mac variable) and IP for the PC running VC (in src variable).  It only needs the IP for the television using the variable dst.  Just follow what has been clearly documented in the python file with comments.