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.new_event_loop()
asyncio.set_event_loop(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.7.0.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file pyecodevices-1.7.0.tar.gz
.
File metadata
- Download URL: pyecodevices-1.7.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2507b4d25b7849badf65774a9014fa34a022dc629d2d6cf3dbd215695847b5a |
|
MD5 | 95b9887ef6778dade1b7f954da960831 |
|
BLAKE2b-256 | c301c2656b389f7e6c1ee3f5d7c0c93a76e0890fd166b7b3d919d7189bd30aa6 |
Provenance
File details
Details for the file pyecodevices-1.7.0-py3-none-any.whl
.
File metadata
- Download URL: pyecodevices-1.7.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224bdc4ae4a79d823e47a589f967ddbe93f08dfbfbc5f5c030cad529cc8818c3 |
|
MD5 | 23b7b587f521c07385e8ea19041e4120 |
|
BLAKE2b-256 | afcbe5ba700cbca580696e64debeb1fd99e257ac6e10b5e44f198c19292fee26 |