Your Universal Remote Control Center
RemoteCentral.com
RS-232 & IP Control Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 28 made on Sunday August 23, 2015 at 20:41
jpaytoncfd
Lurking Member
Joined:
Posts:
August 2015
1
The code from the TV includes "030cf100" if the action was a success. It may include other characters. I have created a Python script that works great.


#!/usr/bin/env python
import time, serial
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=9600, timeout=1)
resp=""
loop="true"
string="030cf100"
while loop:
        if string in resp:
                print "found it"
                break
                ser.close()
        else:
                ser.write("\x08\x22\x00\x00\x00\x02\xd4")
                data = ser.read(24)
                resp=data.encode('hex')
                print resp
                time.sleep(1)
print "finished"

This will toggle. You can change the hex code ser.write("\x08\x22\x00\x00\x00\x01\xd5") for OFF only. I can not get the ON only code to work. It toggles.

This will try again and again until the TV responds.


Hosting Services by ipHouse