Closed terokivinen closed 1 year ago
This is triggered by this check: if raw_data[-4:] == b"\x41\x00\x00\x00" (there's a mistake in the comment, please ignore that part)
This actually checks for the last 4 bytes to be \x41\x00\x00\x00
while you have \x4f\x00\x00\x00
in your data. It's possible that this is the only issue and the protocol looks the same (I was only able to test this on my own model and https://gitlab.com/baze/amphiro_oras_bluetooth_shower_hub/-/tree/main/Protocol_description seems to describe the same default).
You could change that single file in your installation and edit that single line and see what happens (or you remove that check completely). Let me know if this works, in which case I'll update the integration.
I modified models.py to check last 3 bytes and now it works for me.
In homeassistant log I now get this kind of warning:
2023-02-21 09:12:05.562 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.dhs_a949_power (<class 'custom_components.amphiro_ble.sensor.AmphiroBluetoothSensorEntity'>) is using state class 'total' which is impossible considering device class ('power') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Which ofcourse is another thing. Atleast the integration works now.
This sounds like it's related to #2. I'll look this once I have time.
Thanks for the integration! I had exactly the same issue but modifying models.py to check last 3 bytes works also for me. I didn't get any further errors in the logs.
Should be fixed with c4d35516358e2e06e18ea5174ad9817f5df40ea6 let me know if you still encounter any issues
So I copied the custom_components folder to my installation custom_components folder and restarted Home Assistant. Did Add integration and chose amphiro BLE. Nothing appears on the setup dialog and in log I found:
2023-02-16 15:15:25.114 ERROR (MainThread) [custom_components.amphiro_ble.models] Amphiro data format not supported: b'\x00\x06\xf5\x00\x00\x00\x00\x00\x00\x00F\x18\x00\x00\x16O\x00\x00\x00'
The shower head is an Oras branded Amphiro.