https://github.com/aohzan/pyecodevices
Get information from GCE Eco-Devices
https://github.com/aohzan/pyecodevices
eco-devices ecodevices gce-electronics python
Last synced: about 2 months ago
JSON representation
Get information from GCE Eco-Devices
- Host: GitHub
- URL: https://github.com/aohzan/pyecodevices
- Owner: Aohzan
- License: mit
- Created: 2021-01-24T13:54:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T17:37:57.000Z (8 months ago)
- Last Synced: 2025-04-11T17:46:17.848Z (2 months ago)
- Topics: eco-devices, ecodevices, gce-electronics, python
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pyecodevices - Python GCE Eco-Devices
Get information from GCE Eco-Devices
## Parameters
- `host`: ip or hostname
- `port`: (default: 80)
- `username`: if authentication enabled on Eco-Devices
- `password`: if authentication enabled on Eco-Devices
- `request_timeout`: (default: 10)## Properties
- `host`: return the host
- `version`: return the firmware version
- `mac_address`: return the mac address## Methods
- `get_info`: get properties from the API
- `global_get`: return all data from the API
- `get_t1`: return values of input T1
- `get_t2`: return values of input T2
- `get_c1`: return values of input C1
- `get_c2`: return values of input C2## Example
```python
from pyecodevices import EcoDevicesimport 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())```