-
Python Subscription example?
Michael, I'm not sure if you are familiar with python or not I figure you are though. So do you see anything that just stands out in this code that would cause it to respond slow? I am seeing it take around 10 seconds once I trigger the control section of code to give me back a status update of the device that was triggered. Seams like an awful long time for update back. Thanks for your time guys global app import app def connect(): #procedure is used to make connection to the ISY device import urllib2, urllib, sys username = 'admin' password = 'admin' topurl = 'http://192.168.2.13:81' auth_handler = urllib2.HTTPPasswordMgrWithDefaultRealm() auth_handler.add_password(None, uri=topurl,user=username,passwd=password) handler = urllib2.HTTPBasicAuthHandler(auth_handler) opener = urllib2.build_opener(handler) urllib2.install_opener(opener) return topurl def control(deviceID,function,level): #procedure used to control devices ie switch them on and off. import urllib2, urllib, sys topurl = app.isy.connect() print "topurl is " + (topurl) print "device id is" + (deviceID) if function == 'DON' and level != "": theurl = topurl+'/rest/nodes/' + deviceID + '/cmd/'+function else: theurl = topurl+'/rest/nodes/' + deviceID + '/cmd/'+function+'/'+level #normalize the URL theurl = urllib.quote(theurl, safe="%/:=&?~#+!$,;'@()*[]") print "the url is " +theurl pagehandle = urllib2.urlopen(theurl) app.isy.status(deviceID,topurl) def status(deviceID,topurl): #procedure will get the status of the device that was just triggered and set the value in the ignition tag. import urllib2,urllib import sys, system import xml.etree.ElementTree as ET theurl = topurl+'/rest/status/' + deviceID theurl = urllib.quote(theurl, safe="%/:=&?~#+!$,;'@()*[]") response=urllib2.urlopen(theurl) mytree = ET.parse(response) value = mytree.find('property').get('value') system.tag.write("ISY/"+deviceID,value)
-
Python Subscription example?
Hey guys I have been searching the forum trying to find some example python code for subscribing to the ISY for status updates. I am currently using the rest functions to do this but its response is quite slow. The rest function will work fine for the data logging I want to do but for real time status when interacting with device via screen I would like better response times. From what I have been reading subscribing is the way to go.
-
EDS OWServer Interface
Xathros thanks ill start looking into this.
-
EDS OWServer Interface
Xathros I have been looking for some documentation to see what would need to be done code wise to get the info into the ISY I just haven't found it yet. I was thinking this was what would need to be done and that's doable for sure I am in process of getting the data into a python script now to log it to a database so code to send data to ISY can be implemented there also. Can you point me in the right direction as far as documentation or code examples?
-
EDS OWServer Interface
EDS Embedded Data Systems has a host controller that will handle 100 1wire devices. http://www.embeddeddatasystems.com/HA7N ... _p_22.html I am looking at a way to get this info into the ISY. They have a smaller unit that will handle up to 24 devices also. Looking to monitor and control my insteon devices via the isy based on temperatures read from the EDS unit.
- EDS OWServer Interface
-
EDS OWServer Interface
Hey Guys Been looking around the forum and online to try to see if i can get the ISY units to get the info out of a EDS OWServer unit and into the ISY. Does anyone know if this is possible? I have seen that the CAI stuff can be used but i need many more inputs than they provide.
-
Official Firmware Release: 2.8.16
Any word on support for the 2444 RL2 devices?
-
Error linking EZIO8SA
Hey Guys I am getting an error when trying to link my new EZIO8SA. I am linking it manually and have selected the EZIO8SA device but get the following errors. failed writing highwater mark [-200000/-1] node not added - failed removing links [-200000/-1] Any Ideas??
-
Error Linking EZIO8SA
Hey Guys I am trying to setup a new EZIO8SA and i am getting an error each time i try to setup the linking. I am doing it manually by adding new device and setting to the EZIO8SA device type. I am getting the following error though. Failed writing the highwater mark [-20000/-1] node not added - failed removing links [-20000/-1] Any ideas??
-
Manual Switch Toggle Status
i am guessing this is a simple one but when i control device via the ISy everything reports back fine but if i go manually toggle a switch then i dont get status. I am guessing that i need some sort of program to run query or am i missing something else? Thanks
gadgetguru69
Members
-
Joined
-
Last visited