patman15 / hdpv_ble

A Home Assistant integration to support Hunter Douglas Powerview devices via Bluetooth
Apache License 2.0
3 stars 1 forks source link

Are you still using/developing this? #1

Open Frans-Willem opened 1 week ago

Frans-Willem commented 1 week ago

Checklist

Describe the issue

Hi,

Are you still developing this, and if so, are you open to working together to reverse engineer more of the protocol ?

Thanks, Frans-Willem

patman15 commented 1 week ago

Yes, the project is still active, it's working for me quite well and I wanted to add tests for quality. I failed to find a way to add HA as a "remote" in order to have a user-friendly way to get the encryption key. Saw your PR with the script, thanks for that, but I would expect users of this integration not to have a gateway ... Anyway, I'm happy to follow up with more features, or PRs, are you looking for something specific?

Frans-Willem commented 1 week ago

Did you ever get the ESP32 PowerView emulator working better? I think that'd be a pretty user-friendly way to intercept the homekey, but I've been able to get it to receive data from the android app, but not send a response.

I've reverse engineered the PowerView Android APK and have been able to document a lot more about the protocol and the APIs available on the gateway and the cloud, but haven't found a better way to get the homekey. I was hoping there'd be something in the cloud API to get the homekey.

patman15 commented 6 days ago

Regarding the key my best idea was to emulate a remote and then add it to the app.. Unfortunately, the remote seems to use the L2CAP protocol instead of GATT so the HA libraries do not support it. Due to lack of time I did not proceed in emulating a remote. I can emulate a shade so you could use an ESP32 to emulate the shade, add it in the app, which will give you the key. Nevertheless, you need an ESP32 for that. B-)

I am aware that the shades support a lot more functions, but I didn't find a good reason to add them. First, things, like schedules, can be easily done in Home Assistant itself with the current functionality and second because HA has no natural interface for them.

If you have a good use case, let me know, can be done of course.

Best regards, Patrick

Frans-Willem commented 6 days ago

I'd preferably like to emulate a shade to catch the SetShadeKey call, however your current example has trouble responding to calls. The current code seems to attempt to respond to the ResetSceneAutomations call, but it looks like the android app never receives that response. Were you ever able to figure out why that was not working?

patman15 commented 5 days ago

I think I fixed this issue in my local repository but did not push it to GitHub because the code was a mess. B-) I didn't really polish it because I was hoping to find an even better solution and so far nobody asked.

Shouldn't be an issue to do an ESP32 sketch that does what you would like to see. Just need to ask a bit of patience from you, because I only have access to my development environment at the end of next week again.