-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathUsing_Isy_Class.txt
More file actions
168 lines (105 loc) · 3.25 KB
/
Copy pathUsing_Isy_Class.txt
File metadata and controls
168 lines (105 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Using the Isy Class
======================
Args
----
Obj class the represents the ISY device
Keyword Args :
addr : IP address of ISY
userl/userp : User Login / Password
debug : Debug flags (default 0)
cachetime : cache experation time [NOT USED] (default 0)
faststart : ( ignored if eventupdate is used )
0=preload cache as startup
1=load cache on demand
eventupdates: run a sub-thread and stream events updates from ISY
same effect as calling Isy().start_event_thread()
Update Threads
-------------
The Isy Class Obj can maintain near realtime updates by subscribing to
a event stream from the ISY device, This data is processed via a subthread
this can be stated automaticly by setting the keyword option :
eventupdates=1
or with the command :
start_event_thread()
this thread process can be halted with the command :
start_event_thread()
Methods
-------
* get/set var val
* get/set node properties
* get program properties, run programs
* get log info
* get event stream info
Examples
-------
--
Turn on the "Garage Light"
(without using the IsyNode class obj
import ISY
myisy = ISY.Isy()
myisy.node_comm("Garage Light", "DON")
--
Most Isy classes can be instantiated by calling the mothod
get_<class_name>, ( eg : get_node(<nodename>), get_var(<varname>)
(see Using_IsyNode_Class.txt and Using_IsyVar_Class.txt for more info)
Node's object by indexing a Isy obj my the node name or address
import ISY
myisy = ISY.Isy()
myisy["Garage Light"].off()
--
Get the value if ISY var named 'some other var'
without instantiating a IsyVar class obj
import ISY
myisy = ISY.Isy( )
some_other_var = myisy.var_get_value('some other var')
--
WOL (Wake On Lan)
-----------------
def load_wol(self) :
def wol(self, wid) :
def wol_names(self, vname) :
def wol_iter():
Climate Info
-------------
def load_clim(self) :
def clim_get_val(self, prop):
def clim_query(self):
def clim_iter(self):
Device Log
-------------
def load_log_type(self):
def load_log_id(self):
def log_reset(self, errorlog = 0 ):
def log_iter(self, error = 0 ):
def log_query(self, errorlog = 0, resetlog = 0 ):
def log_format_line(self, line) :
======
def start_event_thread(self, mask=0):
def stop_event_tread(self) :
def load_conf(self) :
def load_nodes(self) :
def load_node_types(self) :
def load_vars(self) :
def load_prog(self):
def node_names(self) :
def scene_names(self) :
def node_addrs(self) :
def scene_addrs(self) :
def get_node(self, node_id) :
def node_set_prop(self, naddr, prop, val) :
def node_comm(self, naddr, cmd, *args) :
def node_get_type(self, typid) :
def node_iter(self, nodetype=""):
## def set_var_value(self, vname, val, init=0):
def var_set_value(self, var, val, prop="val") :
def var_get_value(self, var, prop="val") :
# def var_names(self) :
def var_addrs(self) :
def get_var(self, vname) :
def var_get_type(self, var) :
def var_iter(self, vartype=0):
def get_prog(self, pname) :
def prog_iter(self):
def prog_comm(self, paddr, cmd) :
def x10_comm(self, unit, cmd) :
# def debugerror(self) :