- Free software: MIT license
- Documentation: https://pyecodevices-rt2.readthedocs.io.
# Example with indexes from pyecodevices_rt2 import EcoDevicesRT2 ecodevices = EcoDevicesRT2('192.168.0.20','80',"mysuperapikey") ecodevices.get('Index','All') # Get all indexes as JSON ecodevices.get('Index','All','Index_TI1') # Get specific value
Define a simple object such as Counter, DigitalInput, EnOcean Switch or Sensor, Post and Sub-Post, Relay, SupplierIndex, Toroid, VirtualOutput, X4FP (Heaters), XTHL:
# Example with a Relay from pyecodevices_rt2 import EcoDevicesRT2, Relay ecodevices = EcoDevicesRT2('192.168.0.20','80',"mysuperapikey") # Relay number 1 test = Relay(ecodevices, 1) print("Current status: %r" % test.status) test.off() # Change relay to off test.on() # Change relay to on test.toggle() # Invert relay status test.status = True # Change relay to on