DirecTV Script Not Working

Posted on
Thu Oct 19, 2023 2:29 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

DirecTV Script Not Working

Hey,

This script just stopped working for no apparent reason recently:
Code: Select all
#! /usr/bin/env python2.5
# -*- coding: utf-8 -*-

import simplejson
import urllib2

DTVIP = "192.168.1.53"
url = "http://%s:8080/tv/getTuned?" % DTVIP
f = urllib2.urlopen(url)
simplejson_string = f.read()
f.close()
parsed_simplejson = simplejson.loads(simplejson_string)

try:
   programTitle = parsed_simplejson['title']
   indigo.variable.updateValue(1708209973, programTitle)
except:
   indigo.variable.updateValue(1708209973, " ")
try:
   majorCh = str(parsed_simplejson['major'])
   indigo.variable.updateValue(564695813, majorCh)
except:
   indigo.variable.updateValue(564695813, " ")


It populates some variables on the current channel and title.

Here's the log error:
Code: Select all
 Embedded script executor host started
   Script Error                    embedded script: <urlopen error [Errno 64] Host is down>
   Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 9, at top level
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
       return opener.open(url, data, timeout)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
       response = self._open(req, data)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
       '_open', req)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
       result = func(*args)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1227, in http_open
       return self.do_open(httplib.HTTPConnection, req)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
       raise URLError(err)
URLError: <urlopen error [Errno 64] Host is down>


Appreciate any help getting it working.

Thanks,

Carl

Posted on
Thu Oct 19, 2023 3:24 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: DirecTV Script Not Working

Well, this is pretty obvious:

Code: Select all
   Script Error                    embedded script: <urlopen error [Errno 64] Host is down>


Are you sure the DTV receiver is on and that's the correct IP address? Do you have that IP address set with a DHCP reservation in the router?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Oct 19, 2023 4:14 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DirecTV Script Not Working

I had assumed that as well except the DirecTV plugin and scripts were still working.
I restarted the DirecTV box and now it’s working again.

Thanks,

Carl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 25 guests