### Install python-homewizard-energy with pip Source: https://github.com/homewizard/python-homewizard-energy/blob/main/README.md Install the package from PyPI using pip. Requires Python 3 and an active internet connection. ```bash python3 -m pip install python-homewizard-energy ``` -------------------------------- ### API v1 example: instantiate HomeWizardEnergyV1 Source: https://github.com/homewizard/python-homewizard-energy/blob/main/README.md Connects to a HomeWizard Energy device using the v1 API. Replace IP_ADDRESS with the device's IP address. The async context manager handles the connection lifecycle. ```python import asyncio from homewizard_energy import HomeWizardEnergyV1 IP_ADDRESS = "192.168.1.123" async def main(): async with HomeWizardEnergyV1(host=IP_ADDRESS) as api: # Get device information, like firmware version device = await api.device() print(device.product_name) print(device.product_type) print(device.serial) print(device.firmware_version) print(device.api_version) # Get all data from the device in one call data = await api.data() print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all data from the device in one call, but only the data that changed since the last call data = await api.data_since(uuid=...) print(data) # Get all ```