This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
forked from evilpete/RainEagle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.txt
338 lines (329 loc) · 12.6 KB
/
doc.txt
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
Help on module EagleClass:
NAME
EagleClass
FILE
RainEagle/EagleClass.py
CLASSES
Eagle
RainEagleResponseError
class Eagle(__builtin__.object)
| Class for talking to Rainforest Automation EAGLE (RFA-Z109)
|
| args:
| debug print debug messages if true
| addr address of device
| port port on device (default 5002)
| getmac connect to device at start up and get macid (default true)
| timeout TCP socket timeout
|
| Currently there is very little error handling ( if any at all )
|
| Methods defined here:
|
| __init__(self, **kwargs)
|
| cloud_reset(self)
| cloud_reset : Clear Cloud Configuration
|
| confirm_message(self, id)
|
| factory_reset(self)
| Factory Reset
|
| get_demand_values(self, macid=None, interval='hour', frequency=None)
| Send the GET_DEMAND_VALUES command
| get a series of instantaneous demand values
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
| Interval hour | day | week
| [Frequency] int seconds between samples
|
| get_device_config(self)
| get remote management status
|
| On Success returns dict with value 'Y' or 'N' :
| 'config_ssh_enabled': 'Y'
| 'config_vpn_enabled': 'Y'
|
| get_device_data(self, macid=None)
| Send the GET_DEVICE_DATA command to get a data dump
|
| get_device_list(self)
| Send the LIST_DEVICES command
| returns information about the EAGLE device
|
| get_fast_poll_status(self, macid=None)
| Send the GET_FAST_POLL_STATUS command
| get the current status of fast poll mode.
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
|
| get_gateway_info(self)
| gets network status
|
| On Success returns dict with the values (example):
| 'gateway_cloud_id': '00:09:69'
| 'gateway_internet_status': 'connected'
| 'gateway_ip_addr': '10.11.12.13'
| 'gateway_mac_id': 'D8:D5:B9:00:90:24'
|
| get_historical_data(self, period='day')
| get a series of summation values over an interval of time
| ( http command api )
|
| args:
| period day|week|month|year
|
| On Success returns dict with the values (example):
| 'data_period' 'day'
| 'data_size' '14'
| 'timestamp[0]' '1394422200'
| 'timestamp[1]' '1394425800'
| 'timestamp[2]' '1394429400'
| 'timestamp[3]' '1394433000'
| 'timestamp[4]' '1394436600'
| 'timestamp[5]' '1394440200'
| 'timestamp[6]' '1394443800'
| 'timestamp[7]' '1394447400'
| 'timestamp[8]' '1394451000'
| 'timestamp[9]' '1394454600'
| 'timestamp[10]' '1394458200'
| 'timestamp[11]' '1394461800'
| 'timestamp[12]' '1394465400'
| 'timestamp[13]' '1394469000'
| 'value[0]' '0.429'
| 'value[1]' '0.426'
| 'value[2]' '0.422'
| 'value[3]' '0.627'
| 'value[4]' '0.735'
| 'value[5]' '0.193'
| 'value[6]' '0.026'
| 'value[7]' '-0.985'
| 'value[8]' '-1.491'
| 'value[9]' '-2.196'
| 'value[11]' '-1.868'
| 'value[12]' '-1.330'
| 'value[13]' '-0.870'
|
| get_history_data(self, macid=None, starttime='0x00000000', endtime=None, frequency=None)
| Send the GET_HISTORY_DATA command
| get a series of summation values over an interval of time
| ( socket command api )
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
| StartTime the start of the history interval (default oldest sample)
| EndTime the end of the history interval (default current time)
| Frequency Requested number of seconds between samples.
|
| get_instantaneous_demand(self, macid=None)
| Send the GET_INSTANTANEOUS_DEMAND command
| get the real time demand from the meter
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
|
| get_message(self)
| On Success returns dict with the values (example):
| "meter_status" : "Connected"
| "message_timestamp" : "946684800"
| "message_text" : ""
| "message_confirmed" : "N"
| "message_confirm_required" : "N"
| "message_id" : "0"
| "message_queue" : "active"
| "message_priority" : ""
| "message_read" : "Y"
|
| get_price(self)
| get price for kWh
|
| On Success returns (example):
| price': '0.1300'
| price_label': 'Set by User' or '--'
| price_timestamp': '1394524458'
| price_units': '$'
|
| returns empty dict on Error
|
| get_remote_management(self)
|
| get_setting_data(self)
| get settings data
|
| On Success returns dict with value containing setting
| relating to price, uploader, network & device
|
| get_summation_values(self, macid=None, interval='day')
| Send the GET_SUMMATION_VALUES command
| get a series of net summation values
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
| Interval day | week | month | year
|
| get_time_source(self, macid=None)
| get time source for device
|
| On Success returns dict with value 'internet' or 'meter' :
| 'time_source': 'internet'
|
| get_timezone(self)
| get current timezone configuration
|
| On Success returns dict with the value :
| 'timezone_localTime': '1394527011'
| 'timezone_olsonName': 'UTC/GMT'
| 'timezone_status': '2'
| 'timezone_utcOffset': 'UTC'
| 'timezone_utcTime': '1394527011'
| 'timezone_status': 'success'
|
| get_uploader(self)
| gets current uploaders config
|
| On Success returns dict with the values (example):
| "uploader_timestamp" : "1394503703"
| "uploader_provider" : "bidgely"
| "uploader_protocol" : "https"
| "uploader_hostname" : "api.bidgely.com"
| "uploader_url" : "/v1/users/44441b47-1b9a-4a65-8e8c-0efefe05bb88/homes/1/gateways/1"
| "uploader_port" : "0"
| "uploader_auth_code" : "44441b47-1b9a-4a65-8e8c-0efefe05bb88"
| "uploader_email" : ""
| "uploader_user_id" : ""
| "uploader_password" : ""
| "uploader_enabled" : "Y"
|
| See also set_cloud() to set current uploader cloud config
|
| get_uploaders(self)
| gets list of uploaders for Web UI
|
| On Success returns dict with the values (example):
| 'uploader[0]': 'none'
| 'uploader[1]': 'bidgely'
| 'uploader_name[0]': 'None'
| 'uploader_name[1]': 'Bidgely Inc.'
|
| get_usage_data(self)
| Get current demand usage summation
|
| On Success returns dict with the values (example):
| 'demand' : '0.4980'
| 'demand_timestamp' : '1394505386'
| 'demand_units' : 'kW'
| 'message_confirm_required' : 'N'
| 'message_confirmed' : 'N'
| 'message_id' : '0'
| 'message_priority' : ''
| 'message_queue' : active'
| 'message_read' : 'Y'
| 'message_text' : ''
| 'message_timestamp' : '946684800'
| 'meter_status' : 'Connected'
| 'price' : '0.1400'
| 'price_label' : 'Set by User'
| 'price_units' : '$'
| 'summation_delivered' : '2667.867'
| 'summation_received' : '37.283'
| 'summation_units' : 'kWh'
| 'usage_timestamp' : '1394505386'
|
| list_devices(self)
| Send the LIST_DEVICES command
| returns information about the EAGLE device
|
| set_cloud(self, url, authcode='', email='')
| set cloud Url
|
| args:
| url Url for uploader
| authcode
| email
|
| See also get_uploader() to retrieve current uploader cloud config
|
| set_fast_poll(self, macid=None, frequency='0x04', duration='0xFF')
| Send the SET_FAST_POLL command
| set the fast poll mode on the meter
|
| args:
| MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
| Frequency 0x01 - 0xFF Freq to poll meter, in seconds
| Duration 0x00 - 0x0F Duration of fast poll mode, in minutes (max 15)
|
| set_message_read(self)
| On Success returns dict with the values :
| 'remote_management_status' : 'success'
|
| set_price(self, price)
| Set price manualy
|
| args:
| price Price/kWh
|
| On Success returns dict with value :
| 'set_price_status': 'success'
|
| set_price_auto(self)
| Set Price from Meter
|
| On Success returns dict with value :
| 'set_price_status': 'success'
|
| set_remote_management(self, macid=None, status='on')
| set_remote_management
| enabling ssh & vpn
|
| args:
| status on|off
|
| On Success returns dict with value :
| 'remote_management_status': 'success'
|
| set_time_source(self, macid=None, source=None)
| set_time_source
| set time source
|
| args:
| source meter|internet
|
| On Success returns dict with value :
| 'set_time_source_status': u'success'
|
| On Error returns dict with value :
| 'set_time_source_status': 'invalid source name'
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
class RainEagleResponseError(exceptions.RuntimeError)
| General exception for responce errors
| from Rainforest Automation EAGLE (RFA-Z109)
|
| Method resolution order:
| RainEagleResponseError
| exceptions.RuntimeError
| exceptions.StandardError
| exceptions.Exception
| exceptions.BaseException
| __builtin__.object
|
DATA
__all__ = ['Eagle', 'RainEagleResponseError', 'to_epoch_1970, to_epoch...
__author__ = 'Peter Shipley <[email protected]>'
__copyright__ = 'Copyright (C) 2014 Peter Shipley'
__license__ = 'BSD'
__version__ = '0.1.7'
VERSION
0.1.7
AUTHOR
Peter Shipley <[email protected]>