this works quoted Indigo lines
- Code: Select all
import urllib2
import xml.etree.ElementTree as ET
import indigo
xml = urllib2.urlopen('http://10.0.1.102:32400/status/sessions')
data = xml.read()
root = ET.fromstring(data)
for string in root.findall(".//*[@machineIdentifier='9793cdf6-93ae-4099-9184-6e2a970794f7']"):
state = string.attrib['state']
#print state
PlexTheater = indigo.variables[914574013]
indigo.variable.updateValue(PlexTheater, state)
for some reason Indigo can't work with findall
- Code: Select all
for string in root.findall(".//*[@machineIdentifier='9793cdf6-93ae-4099-9184-6e2a970794f7']"):
Anybody know how to fix this?
I use this specific line to filter out the state of my main plex system, and leave out all the others that might be running.
all help is welcome!