#!  /usr/bin/python
#   Title: tivo.py
#   Author: Garry Whittaker
#   Date: 21MAR2014
#   Info: To send remote control commands to the tivo over LAN
#   TODO:

import socket
import base64


# 



def sendtotivo(msg):
    dst = '192.168.18.22' # IP to tivo
    
    new = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    new.connect((dst, 31339))
   
    pkt = msg+chr(0x0D) 
    new.send(pkt)
    new.close()

