-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update on HA integration and some suggestions for the API #4
Comments
Nice board ! |
I like how you implemented the UMmeterInterface! Receiving response from te socket really needs to be done as follows result = b''
while len(result) < nb:
result += self._socket.recv(nb)
return result and not return bytearray(self._socket.recv(nb)) This will not read all data I would like to add a bit more Exception handling and also some logging. Is that ok for you? Also I need to wrap the socket in asynio to make it work with Home Assistant |
Hi, I never implement asyncio on a project, so may be add the support of this first, and another PR for the BT support. |
Hi! I thought you might be interested in the status of the HA integration so attached you'll find some screenshots. The pull request which I created yesterday is required to make the integration work. So when that's incorporated I can release the integration.
It's not entirely clear to me how the data groups work. Can you elaborate?
Also some thing I notices in your API which could use some fine tuning:
The function
data_threshold
expects the value to be in milliamperes whilerecord_intensity_threshold
in the UMmeterData object is converted to amperes.In my opinion the keys
record_capacity_threshold
,record_energy_threshold
andrecord_intensity_threshold
don't really cover the purpose. I thinkrecorded_capacity
,recorded_energy
andrecording_treshold
would be better fitting. What do you think?The text was updated successfully, but these errors were encountered: