RainEagle library plus script for polling data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

150 lines
4.8 KiB

  1. Help on module EagleClass:
  2. NAME
  3. EagleClass
  4. FILE
  5. RainEagle/EagleClass.py
  6. CLASSES
  7. __builtin__.object
  8. Eagle
  9. class Eagle(__builtin__.object)
  10. | Class for talking to Rainforest Automation EAGLE (RFA-Z109)
  11. |
  12. | args:
  13. | debug print debug messages if true
  14. | addr address of device
  15. | port port on device (default 5002)
  16. | getmac connect to device at start up and get macid (default true)
  17. |
  18. | Currently there is very little error handling ( if any at all )
  19. |
  20. | Methods defined here:
  21. |
  22. | __init__(self, **kwargs)
  23. |
  24. | cloud_reset(self)
  25. | cloud_reset : Clear Cloud Configuration
  26. |
  27. | factory_reset(self)
  28. | Factory Reset
  29. |
  30. | get_demand_values(self, macid=None, interval='hour', frequency=None)
  31. | Send the GET_DEMAND_VALUES command
  32. | get a series of instantaneous demand values
  33. |
  34. | args:
  35. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  36. | Interval hour | day | week
  37. | [Frequency] int seconds between samples
  38. |
  39. | get_device_config(self)
  40. | get configs
  41. |
  42. | get_device_data(self, macid=None)
  43. | Send the GET_DEVICE_DATA command to get a data dump
  44. |
  45. | get_fast_poll_status(self, macid=None)
  46. | Send the GET_FAST_POLL_STATUS command
  47. | get the current status of fast poll mode.
  48. |
  49. | args:
  50. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  51. |
  52. | get_history_data(self, macid=None, starttime='0x00000000', endtime=None, frequency=None)
  53. | Send the GET_HISTORY_DATA command
  54. | get a series of summation values over an interval of time
  55. |
  56. | args:
  57. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  58. | StartTime the start of the history interval (default oldest sample)
  59. | EndTime the end of the history interval (default current time)
  60. | Frequency Requested number of seconds between samples.
  61. |
  62. | get_instantaneous_demand(self, macid=None)
  63. | Send the GET_INSTANTANEOUS_DEMAND command
  64. | get the real time demand from the meter
  65. |
  66. | args:
  67. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  68. |
  69. | get_price(self)
  70. | get price for kWh
  71. |
  72. | get_setting_data(self)
  73. | get settings
  74. |
  75. | get_summation_values(self, macid=None, interval='day')
  76. | Send the GET_SUMMATION_VALUES command
  77. | get a series of net summation values
  78. |
  79. | args:
  80. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  81. | Interval day | week | month | year
  82. |
  83. | get_time_source(self, macid=None)
  84. | get time source for device
  85. | retrrns value "meter" or "nternet"
  86. |
  87. | get_timezone(self)
  88. | get current timezone configuration
  89. |
  90. | list_devices(self)
  91. |
  92. | set_cloud(self, url)
  93. | set cloud Url
  94. |
  95. | set_fast_poll(self, macid=None, frequency='0x04', duration='0xFF')
  96. | Send the SET_FAST_POLL command
  97. | set the fast poll mode on the meter
  98. |
  99. | args:
  100. | MacId 16 hex digits, MAC addr of EAGLE ZigBee radio
  101. | Frequency 0x01 - 0xFF Freq to poll meter, in seconds
  102. | Duration 0x00 - 0x0F Duration of fast poll mode, in minutes (max 15)
  103. |
  104. | set_price(self, price)
  105. | Set price manualy
  106. |
  107. | args:
  108. | price Price/kWh
  109. |
  110. | set_price_auto(self)
  111. | Set Price from Meter
  112. |
  113. | set_remote_management(self, macid=None, status=None)
  114. | set_remote_management
  115. | enabling ssh & vpn
  116. |
  117. | args:
  118. | status yes|no
  119. |
  120. | set_time_source(self, macid=None, source=None)
  121. | set_time_source
  122. | set time source
  123. |
  124. | args:
  125. | source meter|internet
  126. |
  127. | ----------------------------------------------------------------------
  128. | Data descriptors defined here:
  129. |
  130. | __dict__
  131. | dictionary for instance variables (if defined)
  132. |
  133. | __weakref__
  134. | list of weak references to the object (if defined)
  135. DATA
  136. __all__ = ['Eagle', 'to_epoch_1970, to_epoch_2000']
  137. __author__ = 'Peter Shipley <peter.shipley@gmail.com>'
  138. __copyright__ = 'Copyright (C) 2014 Peter Shipley'
  139. __license__ = 'BSD'
  140. AUTHOR
  141. Peter Shipley <peter.shipley@gmail.com>