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: 3)
Properties
host
: return the hostfirmware
: return the firmware versionmac_address
: return the mac address
Methods
ping
: return true if the Eco-Devices answerglobal_get
: return json 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:
ping = await ecodevices.ping()
print("ping:", ping)
version = await ecodevices.firmware
print("firmware version: ", version)
data = await ecodevices.global_get()
print("all values: ", data)
data = await ecodevices.get_t1()
print("teleinfo 1: ", data["current"])
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.2.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file pyecodevices-1.2.0.tar.gz
.
File metadata
- Download URL: pyecodevices-1.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45a7525587eb83a7cbf97e4a19f233dd8d10723c08b04726721900a0f447e3da |
|
MD5 | 0971c571f1f8d7d7aa91f4b101927564 |
|
BLAKE2b-256 | 3d0786394c253f55f0af0d489f6ce7fae025a133fec946c65105ed5011746ac3 |
Provenance
File details
Details for the file pyecodevices-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: pyecodevices-1.2.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e344f33ea9dcd3f0ae07ee4b40a07e140ca777edc1ae4132ce1ec59073f4ee9 |
|
MD5 | ec5886d2e07e468df6d9073d289474c8 |
|
BLAKE2b-256 | 71b5f07ff2810bcc63b5f6b5260580a619709687ecbfe05d67de4cf6750cdf21 |