Get information from GCE Eco-Devices.
Project description
pyecodevices - Python GCE Eco-Devices
Get information from GCE Eco-Devices
Parameters
host
: ip or hostnameport
: (default: 80)username
: if authentication enabled on Eco-Devicespassword
: if authentication enabled on Eco-Devicesrequest_timeout
: (default: 10)
Properties
host
: return the hostversion
: return the firmware versionmac_address
: return the mac address
Methods
get_info
: get properties from the APIglobal_get
: return all data from the APIget_t1
: return values of input T1get_t2
: return values of input T2get_c1
: return values of input C1get_c2
: return values of input C2
Example
from pyecodevices import EcoDevices
import asyncio
async def main():
async with EcoDevices('192.168.1.239', '80', "username", "password") as ecodevices:
await ecodevices.get_info()
print("firmware version:", ecodevices.version)
data = await ecodevices.global_get()
print("all values:", data)
data = await ecodevices.get_t1()
print("teleinfo 1:", data)
print("current:", data["current"], "VA")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyecodevices-1.6.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for pyecodevices-1.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 857f327df74e0ff341d9782257e6b0dd894fa8e9841bbc49df8fda04d5ebc3ce |
|
MD5 | 76889cc1140d5c6d38f2acc4cca18a6d |
|
BLAKE2b-256 | dd1369204a2c79a799e9449d10c2ab6ab1aebad45c6a6d5b59c33a065c31e6db |