Hunter Douglas PowerView Gen 3 integration

Good news !

The base PR has finally made it through the review process and been merged. :tada:
Few weeks from there before you can use it but keep an eye out in coming releases. This one has been a long road and appreciate the offer of test hubs etc, unfortunately i would have no gen3 shades to test against anyway.

l still have some features to submit but the core functionality should be coming soon which is what most of you will care about.

f933fec64eae1d51ce14bce27751da556a3fbf3a

5 Likes

Thank you! Amazing news!!

Great effort, may will appreciate this.

My plan was to work on a BT version (without gen 3 hub) not on an replacement of the mentioned integration. Otherwise I would just have offered the author my help. :wink:

I have other window coverings that have Bluetooth motors, just not Hunter Douglas, so I would be very interested I what you may be doing.

@Kingy444 Thank you so much for your effort on this! I was very excited to finally have my Gen 3 stuff pulled in to Home Assistant when I updated to 2024.3!

However… the win was a little short lived. Although all the other entities (the various number, button and sensor that get set up - like identify, velocity, battery,…) are working fine, all of the covers now say “This entity is no longer being provided by the hunterdouglas_powerview integration”. Any idea how I can help debug further?

The related system log error seems to be:

Error while setting up hunterdouglas_powerview platform for cover
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/hunterdouglas_powerview/cover.py", line 78, in async_setup_entry
    coordinator.data.update_shade_position(shade.id, shade.current_position)
                                                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiopvapi/resources/shade.py", line 163, in current_position
    position = self.raw_to_structured(self._raw_data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiopvapi/resources/shade.py", line 337, in raw_to_structured
    self.api_to_percent(position_data[position_key], position_key),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiopvapi/resources/shade.py", line 262, in api_to_percent
    percent = self.position_limit((position / max_position_api) * 100)
                                   ~~~~~~~~~^~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

Update here… I don’t know if this was the fix or it was coincidental, but I ran the “/gateway/swagger?enable=true” command on the gateway and reloaded the integration and now the covers are recognized again.

Is the Gen3 integration now available @Kingy444 ?

If you hit that endpoint without the ?enable does it tell you the api is enabled or disabled ?

We could improve the logging if so, and need to add to the doco too

Sounds like it has been released :wink:

I’ve a been away on holidays for the better part of the last couple of weeks and haven’t kept up to date

Any issues I can look at when I’m home early next week

1 Like

Wow, it works. Recognized all 7 devices as soon as I popped in the IP address when setting up the integration. Can’t wait to try it out.

Thank you so much for your efforts. Buying you a few beers later today.

[EDIT] I just tried, but you don’t have a buy me a coffee link @Kingy444. I would like to say thank you!

@harryfine where were you looking for one ?

If there is somewhere obvious I’m unaware of please let me know - I just link it from time to time (in the post I’m replying to for example)

Also here is the link :wink:
f933fec64eae1d51ce14bce27751da556a3fbf3a

Looked at the 1st post in the thread, also clicked on your avitar here, didn’t see anything. But thank you. Found it and coffees bought. Hope everyone here contributes something.

What card are people using in Sonos/HACs to get an attractive depiction of a shade, opening and closing with a click of a button?

This is not necessary. When I did the original port early last year I was able reset the hub, verify the swagger wasn’t responding and the API still functioned. Of course there has been updates since then…

To answer Kingy, there is no way to tell Swagger is enabled other then to try the Swagger endpoints (that I know of).

It works for me as well :blush: thank you so much for the effort :+1:

Hello everyone
I’m hoping someone can help me get my G3 linked to HomeKit. I’ve followed the instructions to connect the hub to HomeKit but I get an error message saying the setup code is incorrect. Have reset hub to factory settings, rebooted etc but still the same message. I was wondering if the setup code printed on the hub might be incorrect and went into Swagger to see if I could check the setup code but couldn’t find anything that provided that info.
Has anyone else had this issue?
I’m an amateur techie, the Swagger thing stretched me somewhat!
Many thanks
Betty

I upgraded to 2024.03 and was able to successfully connect to my gen 3 hubs with the integration, but the actual position of the blinds wasn’t exposed in Home Assistant. The signal strength entity was disabled out of the box for all the devices and shows valid data if I manually enable it.

I seemingly have no entities related to shade position or any way to control the position of the shade via Home Assistant.

My server core logs are showing the same error mentioned by in @mperone’s post above.

I’ve confirmed swagger=true is enabled and the swagger UI is responsive on port 3002 on my Gateway.

API /home/shades/{id} for the shade shown above returns:

{
  "id": 192,
  "type": 5,
  "name": "T2ZmaWNlIDE=",
  "ptName": "Office 1",
  "motion": null,
  "capabilities": 0,
  "powerType": 2,
  "batteryStatus": 3,
  "roomId": 327,
  "firmware": {
    "revision": 3,
    "subRevision": 0,
    "build": 359
  },
  "positions": {
    "primary": 1,
    "secondary": 0,
    "tilt": 0,
    "velocity": 0
  },
  "signalStrength": -72,
  "bleName": "R23:E63C",
  "shadeGroupIds": [],
  "serialNumber": "E63CDCF7FBE1D08B"
}

Ok, I just made one BLE integration for a BMS, as soon as I have my new shades and get startet with the integration, I’ll let you know. I guess, large parts of it will be similar between the vendors, we just need to figure out the detailed commands. I’ll ping you when ready.

1 Like

This integration works amazingly!! I am so happy! I have waited for this type of integration for almost 2 years. Great work! :slight_smile: