pyecodevices_rt2 package
Submodules
pyecodevices_rt2.abstractsensor module
pyecodevices_rt2.abstractswitch module
- class pyecodevices_rt2.abstractswitch.AbstractSwitch(ecort2: EcoDevicesRT2, id: int, get_link: str, get_entry: str, on_link: str, off_link: str, toggle_link: str)[source]
Bases:
object
Class representing an AbstractSwitch
- get_status(cached_ms: Optional[int] = None) bool [source]
Return the current AbstractSwitch status.
- property status: bool
pyecodevices_rt2.cli module
pyecodevices_rt2.const module
pyecodevices_rt2.counter module
- class pyecodevices_rt2.counter.Counter(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
object
Class representing the Counter
- property price: float
- property value: int
pyecodevices_rt2.digitalinput module
pyecodevices_rt2.ecodevices_rt2 module
- class pyecodevices_rt2.ecodevices_rt2.EcoDevicesRT2(host: str, port: int = 80, apikey: str = '', timeout: int = 10, cached_ms: int = 0)[source]
Bases:
object
Class representing the Ecodevices RT2 and its API
- property apikey
Return the apikey.
- property apiurl
Return the default apiurl.
- property cached_ms
Return the maximum cached value in milliseconds.
- get(command, command_value=None, command_entry=None, cached_ms: Optional[int] = None)[source]
Get value from api : http://{host}:{port}/api/xdevices.json?key={apikey}&{command}={command_value}, then get value {command_entry} in JSON response.
- property host
Return the hostname.
pyecodevices_rt2.enocean module
- class pyecodevices_rt2.enocean.EnOceanSensor(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSensor
Class representing the EnOceanSensor
- class pyecodevices_rt2.enocean.EnOceanSwitch(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the EnOceanSwitch
pyecodevices_rt2.exceptions module
Exceptions for Ecodevices RT2.
pyecodevices_rt2.post module
- class pyecodevices_rt2.post.Post(ecort2: EcoDevicesRT2, id_post: int, id_subpost: Optional[int] = None)[source]
Bases:
object
Class representing the Post or Sub-Post
- get_index_day(cached_ms: Optional[int] = None) float [source]
Return the index of the current day of post/subpost.
- get_instant(cached_ms: Optional[int] = None) float [source]
Return the instant power of post/subpost.
- get_price_day(cached_ms: Optional[int] = None) float [source]
Return the price of the current day of post/subpost.
- property index: float
- property index_day: float
- property instant: float
- property price: float
- property price_day: float
pyecodevices_rt2.relay module
- class pyecodevices_rt2.relay.Relay(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the Relay
pyecodevices_rt2.supplierindex module
- class pyecodevices_rt2.supplierindex.SupplierIndex(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSensor
Class representing the SupplierIndex
- property price: float
pyecodevices_rt2.toroid module
- class pyecodevices_rt2.toroid.Toroid(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
object
Class representing the Toroid
- property price: float
- property value: float
pyecodevices_rt2.virtualoutput module
- class pyecodevices_rt2.virtualoutput.VirtualOutput(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the VirtualOutput
pyecodevices_rt2.x4fp module
pyecodevices_rt2.xthl module
Module contents
Get information from GCE Ecodevices RT2.
- class pyecodevices_rt2.AbstractSensor(ecort2: EcoDevicesRT2, id: int, get_link: str, get_entry: str)[source]
Bases:
object
Class representing an AbstractSensor
- get_value(cached_ms: Optional[int] = None) float [source]
Return the current AbstractSensor status.
- property value: float
- class pyecodevices_rt2.AbstractSwitch(ecort2: EcoDevicesRT2, id: int, get_link: str, get_entry: str, on_link: str, off_link: str, toggle_link: str)[source]
Bases:
object
Class representing an AbstractSwitch
- get_status(cached_ms: Optional[int] = None) bool [source]
Return the current AbstractSwitch status.
- property status: bool
- class pyecodevices_rt2.Counter(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
object
Class representing the Counter
- property price: float
- property value: int
- class pyecodevices_rt2.DigitalInput(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
object
Class representing the DigitalInput
- property status: bool
- class pyecodevices_rt2.EcoDevicesRT2(host: str, port: int = 80, apikey: str = '', timeout: int = 10, cached_ms: int = 0)[source]
Bases:
object
Class representing the Ecodevices RT2 and its API
- property apikey
Return the apikey.
- property apiurl
Return the default apiurl.
- property cached_ms
Return the maximum cached value in milliseconds.
- get(command, command_value=None, command_entry=None, cached_ms: Optional[int] = None)[source]
Get value from api : http://{host}:{port}/api/xdevices.json?key={apikey}&{command}={command_value}, then get value {command_entry} in JSON response.
- property host
Return the hostname.
- class pyecodevices_rt2.EnOceanSensor(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSensor
Class representing the EnOceanSensor
- class pyecodevices_rt2.EnOceanSwitch(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the EnOceanSwitch
- class pyecodevices_rt2.Post(ecort2: EcoDevicesRT2, id_post: int, id_subpost: Optional[int] = None)[source]
Bases:
object
Class representing the Post or Sub-Post
- get_index_day(cached_ms: Optional[int] = None) float [source]
Return the index of the current day of post/subpost.
- get_instant(cached_ms: Optional[int] = None) float [source]
Return the instant power of post/subpost.
- get_price_day(cached_ms: Optional[int] = None) float [source]
Return the price of the current day of post/subpost.
- property index: float
- property index_day: float
- property instant: float
- property price: float
- property price_day: float
- class pyecodevices_rt2.Relay(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the Relay
- class pyecodevices_rt2.SupplierIndex(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSensor
Class representing the SupplierIndex
- property price: float
- class pyecodevices_rt2.Toroid(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
object
Class representing the Toroid
- property price: float
- property value: float
- class pyecodevices_rt2.VirtualOutput(ecort2: EcoDevicesRT2, id: int)[source]
Bases:
AbstractSwitch
Class representing the VirtualOutput
- class pyecodevices_rt2.X4FP(ecort2: EcoDevicesRT2, module_id: int, zone_id: int)[source]
Bases:
object
Class representing the X4FP
- property mode: int