Adding Tilt to the Hunter Douglas PowerView Cover integration (Luxaflex)

Hi!

The blinds that we have installed at home work with Home Assistant, but only for Up/Down. It would be great if the integration can be extended to do the tilting too.

Using the (undocumented) API, I found out that getting the state of the cover includes the tilt position in the JSON response. Sending a request with the value adjusted, does indeed tilt the blinds.

PUT to <powerview-hub>/api/shades/<shade-id>:

Tilt one side (sun blocking):

{
    "shade": {
        "positions":{
            "posKind1":1,
            "position1":0,
            "posKind2":3,
            "position2":0
        }
    }
}

Tilt one side (let sun through):

{
    "shade": {
        "positions":{
            "posKind1":1,
            "position1":0,
            "posKind2":3,
            "position2":65535
        }
    }
}

Setting the position2 to 32767 makes the blinds tilt 50%.

The model that my shades are, seem to be indicated by "type": 51 in the JSON response. Not all blinds will support tilting, and I only have a single model available for testing. So identifying which models support Tilting is something I can not help with.

Unfortunately I am not experienced with the internals of Home Assistant, so adding support for tilting in the existing Hunter Douglas PowerView integration will be (too) time consuming. I am happy to try any enhancements (ideally available as container image), and am open to financially support a contributor to add the functionality upstream (make me a reasonable offer :money_mouth_face:).

I second this. I have Hunter Douglas Palm Beach shutters in my house and I can’t operate them with the current integration.

I have started looking into the code, and it will require an update to a third party library
(aiopvapi) as well as the home assistant integration. I have completed a changeset for the aiopvapi that supports tilt for my shutter types, but the HA integration will require some invasive work, as it doesn’t seem that tilt was part of the original design of the integration.

I’m not experienced with HA integrations, so, refactoring the existing integration code will be a slow process for me. If anyone more experienced wants to get on board, I can help with testing and debugging as I have tilt devices and the means to test/debug.

Brian

I’m interested in this as well. I to have the tilt option and type 51.
@BrianHumlicek: have the changes been implemented in aiovapi?

No, I haven’t done anything with it.

Would love to see this as well!

I’d like to see the ability to control the tilt position as well !

I’m gonna tag on here and say I need this for my shutters too… Just getting into HA but as this is a major component of my house (~30 powerview shutters) given some time this summer I might invest in building this or putting a bounty on it or something.

1 Like

I don’t have tilt shades, but I do have top/down bottom up

I have made some changes offline and they all seem to be working ok for me - but happy to make an effort they work for others before I submit them to core.

Essentially I am creating two entities for shades of type 8 or 47 as per the api that home assistant users below.
The API doesn’t appear to have type 51 yet though.

Have also forked the shutters card and started made a version that works with top/down bottom up and UI mode too :upside_down_face:

If your shade is in the below I can look at potential changes before submitting

Kingy444 -

i am curious on the state of your work for top/down bottom up (such a mouthful!) HD blinds?

I would LOVE to see HA support these. I am not technical but would gladly provide some kind of bounty for this to get merged into HA. It’s also been discussed here with wkearney99 so I think there is really strong desire for this to exist.

I’d really love to figure this out — what do you think?

I wrote up some specification of this on Github, not sure if its useful or annoying but I’d love to make this a reality somehow. bottom up top down support · Issue #14 · sander76/aio-powerview-api · GitHub

95% of all the work is done and has been working a treat for me for the last couple of months.

Honestly i started it with minimal hope of it working out as i only had a very high level python history but it all just seemed to click. Because of my doubt i never set up a proper dev environment and went the ‘hacky’ route of copying the core integration and turning it into a custom component.

The remaining 5% now involves going through and putting it into the core and creating commits the team will accept as along the way the rabbit hole got me and have now also added some other functions.

I also have a nice card (fork of shutter-card) i have been using with incorporates top/down and have plans to expand the card for vertical blinds too.

  • Top/Down Bottom/Up support added by creating separate entities for each motor
  • Sensor added for signal strength (useful for finding issues with repeaters)
  • Services added to force refresh, jog, calibrate and update batteries of covers when they are out of date from a manual press
  • added configure options to allow choice of how entities are integrated
    • select whether you want top/down support
    • select to import battery entities
    • select to import signal sensors
  • fix import battery sensor on blinds that are hardwired

Going to take a little time but hopefully in the next couple of weeks

Can you try integrating type 51 as well?

This is how the data looks for 1 shade from the api.
Poskind2 and position2 are the tilt values.

{
			"id": 8406,
			"type": 51,
			"capabilities": 2,
			"batteryKind": 1,
			"smartPowerSupply": {
				"status": 0,
				"id": 0,
				"port": 0
			},
			"batteryStatus": 4,
			"batteryStrength": 180,
			"roomId": 17916,
			"name": "<Base64 name>",
			"firmware": {
				"revision": 2,
				"subRevision": 5,
				"build": 287,
				"index": 280
			},
			"groupId": 9866,
			"positions": {
				"posKind1": 1,
				"position1": 0,
				"posKind2": 3,
				"position2": 50461
			},
			"signalStrength": 4
		}

I know you can contribute to the api used by HA:

I downloaded the source and I guess I have to make a new class for type 51 in resources/shade.py.
But I don’t know if that is all that’s needed.

This is what I added:

def factory(raw_data, request):
# ...

    _shade = find_type(ShadeVenetian)
    if _shade:
        return _shade

# ...
class ShadeVenetian(BaseShade):
    """A shade with move and tilt."""

    shade_types = (
        shade_type(51, "Venetian")
    )

    open_position = {
        ATTR_POSKIND1: 1,
        ATTR_POSITION1: MAX_POSITION,
        ATTR_POSKIND2: 3,
        ATTR_POSITION2: 32767,
    }
    close_position = { # Sun can shine in a bit
        ATTR_POSKIND1: 1,
        ATTR_POSITION1: MIN_POSITION,
        ATTR_POSKIND2: 3,
        ATTR_POSITION2: MAX_POSITION,
    }
    closeSunBlock_position = { # Shades tilted so sun can't shine in
        ATTR_POSKIND1: 1,
        ATTR_POSITION1: MIN_POSITION,
        ATTR_POSKIND2: 3,
        ATTR_POSITION2: MIN_POSITION,
    }
    allowed_positions = (
        {ATTR_POSITION: {ATTR_POSKIND1: 1, ATTR_POSKIND2: 3}, ATTR_COMMAND: ATTR_MOVE},
        {ATTR_POSITION: {ATTR_POSKIND1: 3}, ATTR_COMMAND: ATTR_TILT},
    )

    can_tilt = True

    async def tilt_close(self):
        """Tilt vanes to close position (sun in position)"""
        return await self.move({ATTR_POSKIND2: 3, ATTR_POSITION2: MAX_POSITION})

    async def tilt_closeBlocking(self):
        """Tilt vanes to close position (sun in position)"""
        return await self.move({ATTR_POSKIND2: 3, ATTR_POSITION2: MAX_POSITION})

    async def tilt_open(self):
        """Tilt vanes to open position."""
        return await self.move({ATTR_POSKIND2: 3, ATTR_POSITION2: 32767})

How can I test if this works via the api?
If I can get this to work, I can try to get someone with more HA skills to implement this. Otherwise I have to try to bring it in HA :sweat:.

I have Hunter Douglas Silhouette shades that support tilt that show as model 23. I also have Vignette Duolite shades, these are roller shades with a darkening back panel on a single roller. I would love to see more capability in the Hunter Douglas integration, especially for tilt.

1 Like

If there is any way I can support you on the testing just let me know. I have 4 top down buttom up blinds that I would love to get better integrated in HA.

I literally just (like 1 hour ago) had some hunter douglas shades installed and have them working with the integration, but tilt capabilities would be awesome. Mine show up as type 23 in the HA integration. Let me know if you need any help testing stuff.

Where are we at with this? Happy to contribute to the development

@Kingy444 Can you share your code, what can I do to help get this completed?

Cheers

I have submitted a pull request and the team requested some changes to how it is implemented.

Unfortunately I have started having issues with my pc now and will need to setup the development environment etc on my old laptop while I try to RMA my motherboard

Agreed with @jeffdeal - would love to contribute whatever I can (bounty, time, code review, etc…) to contribute to this. Just got Silhouette and Nantuckets installed, with a second darkout shade on five of my blinds. Seems as if HD is rather transparent with their local API, so here’s to hoping additional motor control (tilt and second blackout blinds in between) in HA can accommodate the rich feature set.

Just want to say I am super excited for this. I use my top down bottoms up blinds all day every day and long for this automation every time I use them :slight_smile:

@Kingy444 Jumping in to let you know I would love to see the top-down bottom-up support added. I’m more then happy to test anything. I’ve 2 td/bu duettes of type 8.