Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window Covering devices #5619

Merged
merged 36 commits into from
Feb 27, 2022
Merged

Window Covering devices #5619

merged 36 commits into from
Feb 27, 2022

Conversation

ebaauw
Copy link
Collaborator

@ebaauw ebaauw commented Dec 29, 2021

Update support for Aqara Roller Shade Driver E1 (lumi.curtain.acn002), see #5330:

  • Fix type: now Window covering device instead of Dimmable light;
  • Add write-only state attribute lift_inc step up (-1), stop (0), and step down (1). Values < -1 are mapped to -1, values > 1 to 1;
  • Use Multistate Output cluster for stop, open, and lift_inc;
  • Add write-only state attribute alert to blink the led;
  • Add read/write state attribute speed to set the motor speed: 0 = low, 1 = medium, 2 = high.
  • Handle additional attributes of Lumi-specific cluster. Created a separate attribute set for this device;
  • Handle additional tags for Xiaomi special attribute;
  • Create ZHABattery /sensors resource to expose the battery and charging state.

Update support for Aqara Motor B1 (lumi.curtain.hagl04), see #4249:

  • Use Multistate Output cluster for stop, open, and close;
  • Handle additional tags for Xiaomi special attribute;
  • Bug fix: B1 can no longer be controlled through the API;
  • Expose charging state on ZHABattery resource (as yet untested).

Update support for IKEA FYRTUR and KADRILJ:

  • Add write-only state attribute alert to blink the led.

Remove deprecated state attributes on, bri, bri_inc, and sat from window covering devices. Use open, lift, stop, and tilt instead, see #2475 (comment).

Remove workarounds for deCONZ::ZclAttribute bug handling deCONZ::ZclSingleFloat and deCONZ::Zcl8BitEnum values.

Update Node List panel in the GUI when receiving new values for Basic cluster attributes.

Added another Sunricher wireless switch, ZG2833K4_EU06, to button_maps.json.

Added manufacturer-specific attributes for Sunricher ZG9092 thermostat to general.xml, see #5409.

Bug fixes:

  • Wrong API code when specifying an invalid value for alert when PUTting a lights state.
  • Cannot set sunriseoffset nor sunsetoffset in config for built-in Daylight sensor.

Extra attributes for Aqara Roller Shade Driver E1, see #5330.
Fix wrong deviceId for lumi.curtain.acn002. see #5330.
lumi.curtain.acn002 does support _Open_ and _Close_, so don't map `state.open` to `state.lift`.  See 5330.
Expose ZHABattery `/sensors` resource for Aqara E1, with new `state.charging` attribute.  `state.battery` not yet updated.  See #5330.
@ebaauw ebaauw marked this pull request as draft December 29, 2021 12:27
Don't setup bindings for Aqara Roller Shade Driver E1, see #5330.
@Smanar
Copy link
Collaborator

Smanar commented Dec 29, 2021

Some code part are needed to make the device usable, but there is some hacks possible to remove if we use DDF too no ?
I speak during the device inclusion (creation in the API)

More Lumi-specific cluster 0xFCC0 attributes for Aqara Roller Shade Driver E1, see #5330.
Add MULTISTATE_OUTPUT_CLUSTER_ID
Battery percentage (!) for the Aqara Roller Shade Driver E1, see #5330.
- Latest Aqara Roller Shade Driver E1 firmware no longer honours _Window Covering_ commands.  Use _Present Value_ in _Analog Output_ and _Multistate Output_ cluster instead.
- Add write-only `state.up` and `state.down` for step up / down;
Use lift_inc instead of up/down.
Still confused by % closed vs % open.
Add `state.alert` and `state.speed`, see #5330.
Some more code cleanup.
Fix B1 becoming unresponsive to API commands, see #4249.
Looks like the B1 reports both voltage and battery percentage.  In that case: use percentage and ignore voltage.
B1 doesn't support `lift_inc`.
B1 also supports charging state.
Change fix for #4249: now calling `rx()` before calling `writeAttribute()`.
- Change fix for #4249: now calling `rx()` before calling `writeAttribute()`.
- Code cleanup.
- Support `state.alert` for IKEA FURTUR and KADRILJ and Aqara E1;
- No `state.alert` for mains-powered Aqara Curtain Motor, nor for Aqara B1
Update `swversion` for Aqara E1.
Update GUI when reading _Basic_ cluster atttribrutes.
@ebaauw ebaauw marked this pull request as ready for review January 1, 2022 20:08
@ebaauw
Copy link
Collaborator Author

ebaauw commented Jan 1, 2022

I think the PR is good to go. It's running on my production network (now on bullseye). I verified it for the Aqara Roller Shade Driver E1, the IKEA FYRTUR, and the original mains-powered Aqara Curtain Motor.

Attention points:

  • There's a discussion on the #technical-talk channel in Discord on the removal of the deprecated state attributes. Thomas indicates this will cause issues with Hue Essentials. If needed, I can revert the corresponding commit. [EDIT]: commit reverted.
  • I ditched the SOMA Tilt in favour of the Aqara E1 for my Venetian blinds. I added support in Homebridge Hue v0.13.34 for using the E1 with Venetian blinds. If this is something other API clients would find useful, we might consider adding this functionality to the API instead.
  • I had an extensive session online with @Krocko analysing the Aqara Curtain Motor B1, but this PR hasn't yet been tested with this device. In particular I don't know whether state.charging for the ZHABattery will work.
  • There are still missing event notifications when Basic cluster attributes change. Also, I'm not sure if the GUI is updated in all cases, but I fixed a few missing cases I spotted.
  • The E1 doesn't expose SW Build ID, but reports the firmware version in the Xiaomi special attribute. However, swversion is updated from Date Code as well as from SW Build ID. The REST attribute reflects the last Zigbee attribute read. I think Date Code shouldn't override SW Build ID. Per the ZCL standard this should actually reflect the production date of the hardware, not of the firmware!

@ebaauw
Copy link
Collaborator Author

ebaauw commented Jan 1, 2022

Some code part are needed to make the device usable, but there is some hacks possible to remove if we use DDF too no ?
I speak during the device inclusion (creation in the API)

I would love to remove hacks, as you know. Especially those needed because the /lights resource is created before the Basic cluster has been read. I don't know how to handle this using DDF, though.

@Smanar
Copy link
Collaborator

Smanar commented Jan 2, 2022

I would love to remove hacks, as you know. Especially those needed because the /lights resource is created before the Basic cluster has been read

Yeah was exactly those one I am thinking, but I have some problem too on my side with device created with DDF but (try to) managed with legacy code.

Bug fix: `state.lastupdated` wasn't updated on ZHABattery.
@EloB
Copy link

EloB commented Jan 7, 2022

I’m like a baby boy waiting for Santa on this PR. Do you guys have any estimate when this will be released? 🙂

Really nice job @ebaauw 🙌

@PalmMx
Copy link

PalmMx commented Feb 1, 2022

Just curious, what is happening with this PR?
Almost a month now since the last action.
I think we are many end-users waiting for this to be launched. 😃

@Mimiix
Copy link
Collaborator

Mimiix commented Feb 1, 2022

Please read: #5733

@PalmMx
Copy link

PalmMx commented Feb 1, 2022

Please read: #5733

OK, I see. But what does this mean in time? Will it take a week or two, or are we talking several months? A best guess would be sufficient.

@Mimiix
Copy link
Collaborator

Mimiix commented Feb 1, 2022

I Hope a week or 2.

I know that @ebaauw his PR's are decent, so i can ask Manup to give this priority.

@PalmMx Are you running deCONZ on an native OS or use Docker/HA Addon? If you run uit native, you can compile the changes yourself and run it that way.

@PalmMx
Copy link

PalmMx commented Feb 1, 2022

I Hope a week or 2.

I know that @ebaauw his PR's are decent, so i can ask Manup to give this priority.

@PalmMx Are you running deCONZ on an native OS or use Docker/HA Addon? If you run uit native, you can compile the changes yourself and run it that way.

Priority to this would really be appreciated.

I'm running deCONZ on a RPi with Raspbian (Raspbian Buster Desktop). Is there any way to compile the changes for a semi-advanced user like myself, please let me know how.

Thanks

@PalmMx
Copy link

PalmMx commented Feb 18, 2022

Is this close to being launched now? 😃

Another Sunricher wireless switch.  Was already whitelisted (by prefix) in the code.
Add manufacturer-specific attributes to _Thermostat_ cluster for Sunricher ZG9092, see #5409.
@manup manup added this to the v2.15.0-beta milestone Feb 26, 2022
rest_lights.cpp Outdated Show resolved Hide resolved
rest_lights.cpp Outdated Show resolved Hide resolved
Revert remove `state.bri` from Window Covering.
@manup manup merged commit 8b88c02 into dresden-elektronik:master Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants