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

A proper info on how to request would probably be a good idea :laughing:

At this stage though I think we will have what we need

I am writing the code for type 8 currently and I will then extend that for type 9 (your shades)

It (90% of the time) comes down to the capabilities - their may be quirks such as the type 54 vs 55 above where one shade goes left and the other goes right which we need to adjust from here to there but hopefully once we have this lot done HD don’t release any new shade types for a while :joy:

As long as they are an existing capability (0-9) we just need to add a definition for them to the upstream api

I think I have my head around how type 38 work currently - I will tag you when I upload the code that supports them properly

Type 23 blinds.

While I’m getting no problems with the functionality of the component, I am getting errors and warnings in the system log.

Logger: homeassistant.helpers.integration_platform
Source: loader.py:620
First occurred: 23 May 2022, 22:06:16 (8 occurrences)
Last logged: 23 May 2022, 22:36:47

Unexpected error importing hunterdouglas_powerview_custom/group.py
Unexpected error importing hunterdouglas_powerview_custom/logbook.py
Unexpected error importing hunterdouglas_powerview_custom/media_source.py
Unexpected error importing hunterdouglas_powerview_custom/system_health.py
Unexpected error importing hunterdouglas_powerview_custom/energy.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.hunterdouglas_0521.recorder'

Logger: homeassistant.helpers.integration_platform
Source: loader.py:620
First occurred: 08:01:24 (7 occurrences)
Last logged: 08:01:24

Unexpected error importing hunterdouglas_powerview_custom/significant_change.py
Unexpected error importing hunterdouglas_powerview_custom/logbook.py
Unexpected error importing hunterdouglas_powerview_custom/system_health.py
Unexpected error importing hunterdouglas_powerview_custom/group.py
Unexpected error importing hunterdouglas_powerview_custom/media_source.py
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 40, in _async_process_single_integration_platform_component
    platform = integration.get_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.hunterdouglas_0521.recorder'

But apart from looking in the logs, there’s no indication that there’s any problems.

Thanks mate - those shouldn’t be anything to worry about and won’t be an issue when in code

Just waiting for current commit to be approved to tdbu support and I’ll get my next one submitted :wink:

1 Like

I can confirm that the code as of May 25th works with my Type 23 blinds, everything seems good :+1:

@gjdoornink any chance you could test 54/55 are acting correctly ? - i have put an inversion on the type 54 to try and address what you described but perhaps i just misunderstood what you were describing now that i am re-reading

You mentioned that arrows pointing left/right being a contradiction but these need to be looked at as an open/close not left/right - with that in mind would you say pressing left move (on the old one not the current uploaded one) functioned correctly ? You could confirm with the new version too as essentially the type 55 have the same open/close functionality but the 54 have close/open set (inverted)

You also mentioned that “when using the slider, the blinds tilt close completely before returning to the correct tilt” - could you expand on that - we have this configured as ‘tilt on closed’ and not ‘tilt anywhere’ - are you suggesting that you can tilt these in any position, or do the shades need to be closed to tilt ?

@csamulski if you could post the json requested we can get yours included too

Hi Andrew I just sent you a private message.

@Kingy444 Sorry for the delay, I had to update my HA from an old version.

I just downloaded your latest code and I can see just one slide for type 18.

My shades api output:

{"shadeIds":[10956,44040,11895,228,45451,49704,1978,49953,30911,4731,55855,10680,64816,29156,11946],"shadeData":[{"id":10956,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":161,"roomId":50436,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"RGluaW5nIDI=","groupId":57347,"positions":{"posKind1":3,"position1":32767},"signalStrength":4},{"id":44040,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":153,"roomId":45685,"name":"T2ZmaWNlIDM=","firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"groupId":45777,"signalStrength":0,"positions":{"posKind1":3,"position1":32767}},{"id":11895,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":155,"roomId":18036,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"TWFzdGVyIDE=","groupId":9889,"positions":{"posKind1":3,"position1":32767}},{"id":228,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":155,"roomId":45685,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"T2ZmaWNlIDE=","groupId":45777,"signalStrength":0,"positions":{"posKind1":3,"position1":30826}},{"id":45451,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":160,"roomId":65367,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"TGl2aW5nIDI=","groupId":38297,"positions":{"posKind1":1,"position1":259},"signalStrength":4},{"id":49704,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":152,"roomId":45685,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"T2ZmaWNlIDI=","groupId":45777,"signalStrength":4,"positions":{"position1":0,"posKind1":1}},{"id":1978,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":161,"roomId":50436,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"RGluaW5nIDE=","groupId":57347,"positions":{"posKind1":3,"position1":30895},"signalStrength":4},{"id":49953,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":161,"roomId":65367,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"TGl2aW5nIDE=","groupId":38297,"positions":{"posKind1":3,"position1":32767}},{"id":30911,"type":1,"capabilities":0,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":156,"roomId":18036,"firmware":{"revision":2,"subRevision":2,"build":2754,"index":32},"name":"TWFzdGVyIDM=","groupId":63214,"positions":{"posKind1":1,"position1":65535}},{"id":4731,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":160,"roomId":21086,"name":"QmVkcm9vbSAx","firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"groupId":13862,"signalStrength":4,"positions":{"posKind1":3,"position1":32767}},{"id":55855,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":162,"roomId":19934,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"VHY=","groupId":17638,"signalStrength":4,"positions":{"posKind1":3,"position1":30980}},{"id":10680,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":160,"roomId":65367,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"TGl2aW5nIDM=","groupId":38297,"positions":{"posKind1":3,"position1":32599},"signalStrength":4},{"id":64816,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":155,"roomId":9344,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"QmVkcm9vbSBHdWVzdA==","groupId":57376,"signalStrength":0,"positions":{"posKind1":1,"position1":0}},{"id":29156,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":162,"roomId":18036,"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9},"name":"TWFzdGVyIDI=","groupId":9889,"positions":{"position1":65535,"posKind1":1}},{"id":11946,"type":18,"capabilities":1,"batteryKind":2,"smartPowerSupply":{"status":0,"id":0,"port":0},"batteryStatus":3,"batteryStrength":161,"roomId":55960,"name":"QmVkcm9vbSAy","groupId":44302,"positions":{"posKind1":1,"position1":309},"firmware":{"revision":2,"subRevision":2,"build":2767,"index":9}}]}

@csamulski Andrew looks afteer openhab - i need the info to get these in Home Assistant

Please try again - i believe i found the bug causing them not to identify type - new version should identify correctly (posted literally right now)

It is working now, both tilt and regular shade. I tested all boundaries and I could not find any issue.
Thank you for your efforts. Now let’s have this integrated into the main release :slight_smile:

I checked the 51 type today (new download 2022 05 28 file)
I can do all things. Only when I set a position with the slider (20%) and do a open close command, the position slider stays at (20%) and when I put in a tilt command, it goes to (20%) and then the tilt function does it’s thing. So the position is not updated on the end of the command.
For the rest it works as expected.

Sorry that was a bit hard to follow so please let me confirm

Functionality works fine - but if you use the open or close buttons to move the shade the position isn’t updated immediately?

If so that should be fixed in a later release - unfortunately decision was we need to wait for the shade to return it’s moved and not assume so while this issue shouldn’t be present the UI won’t update position until the shade stops moving

Sent you a PM @csamulski i need the data to get this one into the pull request and into core. Could you please send it on

Hi, any chance that this new solution for top-down bottum-up includes values for calibarion of the top and bottom positions?
I am at least experience that the top an bottom positions move a bit over time, and a recalibration is needed.
It is possible to recalibrate directly in the blinds and in the app as well, however define the positions manually in the configuration would be nice. This way you can define that bottom is e.g 1 cm above the floor, and still have the indication that it is fully down in the UI.

@Kingy444 Thanks for all your work on this, I was just wondering if you had a buy me a coffee link or something I could use to show my appreciation!

Unfortunately they dont work that way as even when they are in that state they still report the same value as if they were in the correct position. Mine to do indeed have that issue and require a re-calibration time to time.
Calibration will be available in HA later on too however both in UI and a service.

Appreciate it mate - Every little bit helps :wink:
But at the same time dont feel obliged too - just trying to contribute back to the community

Buy Me A Coffee

1 Like

No worries, I can’t code for shit, so this is my way of giving back to the community!

@gjdoornink i sent you a pm a few days back - appreciate if you can get back to me on type 54 - this is one of the last things i need before having upstream api updated so as i dont want to hold the others up i will take out any special code for type 54 if i dont hear back soon

Ideally i want the open/close buttons to work the same way for type 54 and type 55 - as these are left/right i could understand if they are currently inverted but i cant fix without your advice and not fixing now could be a while till i get back to it

I managed to get this updated yesterday and after I had updated to the latest version of home assistant it started working, sort of. I seem to have lost the sensor entity for the position of the blinds so there is no way to adjust tilt from the device page.

If you set a position in the more info panel the slider will after a minute or two return to zero for a right stack and 100 for a left stack.

with regards to the open close buttons on both types of my blind the left hand button (arrow up ) will open the blind and the right hand button (arrow down) will close the blind.

You can adjust the tilt on these blinds with the shade not completely closed.

I’m home for a month now so I will try to test anything you want during that time.