The XML return is shown above from the previous poster. I've tried to modify your plugin but it fails. Here's the code I have:
Code: Select all
def update(self,device):
self.debugLog("Updating device: " + device.name)
theUrl = u"http://" + device.pluginProps["address"] + "/api/DashData.xml?T=0"
self.debugLog("Checking URL " + theUrl)
try:
f = urllib2.urlopen(theUrl)
except:
self.errorLog("Error getting ted6000 data: %s" % (device.pluginProps["address"]))
return
theXml = f.read()
TED6000 = ET.parse(urllib2.urlopen(theUrl))
DashData = TED6000.find('DashData')
PowerNow_Total = DashData.findtext('Now')
PowerTDY_Total = DashData.findtext('TDY')
PowerMTD_Total = DashData.findtext('MTD')
PowerAVG = DashData.findtext('Avg')
VoltageNow_Total = DashData.findtext('Voltage')
Code: Select all
Started plugin "TED 5000 Plugin 1.0.5"
TED 5000 Plugin Debug Method: startup
TED 5000 Plugin Debug versionCheck: Started
TED 5000 Plugin Debug versionCheck: Version Server Url:http://vulture.lagaros.com/IndigoPlugins/TED5000/versionInfoFile.html
TED 5000 Plugin Your plugin version, v1.0.5, is current.
TED 5000 Plugin Debug Starting device: TED Home Pro
TED 5000 Plugin Debug Updating device: TED Home Pro
TED 5000 Plugin Debug Checking URL http://192.168.0.77/api/DashData.xml?T=0
TED 5000 Plugin Error exception in deviceStartComm(TED Home Pro): 'NoneType' object has no attribute 'findtext'
TED 5000 Plugin Debug Starting concurrent thread
TED 5000 Plugin Polling Interval: 30