-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
This issue likes a lot like [https://github.com//issues/576] , but..
Steps done: installed the homewizard python package using pip install python-homewizard-energy. Changed the IP address in the example to the IP address of my P1 meter. Then tried to run the example script, to get this message:
x@penguin:~/pythoncode$ python3 homewizard.py Traceback (most recent call last): File "/home/x/pythoncode/homewizard.py", line 2, in <module> from homewizard_energy import HomeWizardEnergyV1 ImportError: cannot import name 'HomeWizardEnergyV1' from 'homewizard_energy' (/home/x/.local/lib/python3.9/site-packages/homewizard_energy/__init__.py)
So I inspected __init__.py , noted that there is indeed no HomeWizardEnergyV1 reference in there, only HomeWizardEnergy, so I changed all references to HomeWizardEnergyV1 to HomeWizardEnergy. Reasonable I hope? Would you consider this a bug?
Then I ran the example script again, and got this result:
x@penguin:~/pythoncode$ python3 homewizard.py Device(product=Product(model='HWE-P1', name='Wi-Fi P1 Meter', url='https://www.homewizard.com/p1-meter/', description='The HomeWizard P1 Meter gives you detailed insight in your electricity-, gas consumption and solar surplus.'), product_name='P1 Meter', product_type='HWE-P1', serial='5c2faf0895e4', api_version='v1', firmware_version='6.0304') Traceback (most recent call last): File "/home/x/pythoncode/homewizard.py", line 29, in <module> asyncio.run(main()) File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/home/x/pythoncode/homewizard.py", line 15, in main measurement = await api.measurement() AttributeError: 'HomeWizardEnergy' object has no attribute 'measurement'
Now my hacking skills are not sufficient anymore ;) any suggestions how to get this working?
thanks!