$json_text = $json->decode($res->content) Print "(20) Error: command line argument invalid\n" Print "(10) Error: no command line arguments\n" #open (MYFILE, '>/home/steve/Documents/dtvchangerdata.txt') # As well as the lines at the beginning of this script that look like: # If you want to log results of the channel change, # $ua->agent("Mozilla/8.0") # pretend we are very capable browser If you chose "tune", now enter the channel number Next, type "tune" to change the channel, or "getTuned" to display the JSON for the current listing
Next, type the amount of seconds to sleep after changing the channel. The script takes the following arguments:Īlways list the IP address of the receiver first. I'm pretty green at perl so this is quite a hack, but it works.
The DirecTV set top box always returns data in JSON.Īttached is my first crack at a script. The attached perl script allows users to change the channel or gather current channel data. The set top box must be plugged in to the network in order for this to work.ĭocumentation on the internet is lacking at the moment, but it is possible currently to change the channel and to gather current (tuned) channel information. Some DirecTV set top boxes now allow certain operations via the DirecTV HTTP Server on port 8080.