Guessing they need to be updated to Python 3?
- 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, " ")
- Code: Select all
theText ="Ch " + indigo.variables["DTVchannelNumber"].value + " - " + indigo.variables["DTVprogramTitle"].value
indigo.variable.updateValue("DTVall", theText)
indigo.variable.updateValue("Message_Upper", theText)
Appreciate any help!
Thanks,
Carl