Open adizanni opened 10 months ago
Thanks for the heads-up! My shower head stopped working for the second time after 1y (I got a replacement the first time) so I've post-poned usage of this until quality improves. If you want I can make a link from this repository to yours (or we can work together to improve this one).
For the moment I'm not yet working on a repository, as soon as I have a code that is not only for personal use, I will keep you in the loop and can become co-authors of a new repository. Hope that the device life is not really that short: it is a small piece of smart technology but it is still very expensive!!
Hello @kamaradclimber ,
I'm now developing a Home Assistant custom integration for Hydrao. As soon as it will work smooth I will point you to the repository. The MQTT integration is still interesting for those who do not have a Bluetooth Proxy (ESPHome) and their Home Assistant server with Bluetooth is far from the shower.
After a few testing I came to the following new characteristic interpretation (here using the bleak library from home assistant):
# total and current volumes - the same as you, but I put the right sub array (after reaching 255 L it was restarting from 0
data1 = await client.read_gatt_char("0000ca1c-0000-1000-8000-00805f9b34fb")
device.sensors["current_volume"] = int.from_bytes(data1[2:4], byteorder="little")
device.sensors["total_volume"] = int.from_bytes(data1[0:2], byteorder="little")
# average and current temp - as you gussed, but the number must be devided by 2. They did not want to manage float
data2 = await client.read_gatt_char("0000ca32-0000-1000-8000-00805f9b34fb")
device.sensors["current_temperature"] = (int.from_bytes(data2[0:2], byteorder="little") / 2)
device.sensors["average_temperature"] = (int.from_bytes(data2[2:4], byteorder="little") / 2)
# shower duration - this is really a guess but it is pretty much accurate
data3 = await client.read_gatt_char("0000ca26-0000-1000-8000-00805f9b34fb")
device.sensors["current_duration"] = (int.from_bytes(data3[0:2], byteorder="little") / 50)
It seems great, keep up the good work I'll be happy to point my repo to your integration as soon as it's available.
Hello, here we go: https://github.com/adizanni/hydrao
I've linked to your integration (and thanks for the credit, I'm moved :blush: )
Hello @kamaradclimber , I know that you are probably abandoning this repository, just wanted to tell you that I'm working on it right now as I'm a proud owner of a Hydrao Aloe, since yesterday. Starting from your base code I'm also using this package https://github.com/unixorn/ha-mqtt-discoverable to make it a little simpler. I'm improving on the management of the exceptions too. I'm not into decoding binary streams but I may give it a go (at least to be able to retrieve the temperature, is there maybe a default offset ?). I had to overcome some bumps on the road (ex. the ha-mqtt-discoverable it is now requiring Python 3.10, not good for raspberries in still in debian 11). It is working like a charm and I wanted to thank you for your effort.