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

Hue dimmer, Hue smart button, Lutron Aurora, innr RC 110, icasa Remote, Xiaomi B1 curtain motor #2538

Merged
merged 8 commits into from
Mar 7, 2020

Conversation

ebaauw
Copy link
Collaborator

@ebaauw ebaauw commented Mar 5, 2020

Improve handling of:

Details:

  • Changed configuration of attribute reporting for the battery to match the Hue bridge.
  • No longer get the group identifiers from the ZLL Commissioning cluster. Bluntly creating a group and binding the client clusters to it (as for ZigBee 3.0 devices) seems to work just fine for the Hue dimmer switch and the Hue button. The Aurora doesn't support the get group identifiers command.
  • Expose innr RC 110 and icasa Remote as single ZHASwitch /sensors resource, with multiple (7 and 4) group IDs in config.group, see Switches with client clusters on multiple endpoints #2541.
  • Added the switch endpoint to the uniqueid of the associated /groups resource (for RC 110 and icasa remote).
  • Handle config.group containing list of group IDs.
  • Refactored setting the state attributes of Window covering "lights" and of Warning device "lights", also in preparation of Input needed: Refactor logic setting light state #2475.
  • Removed dead code.

Tested the pairing of the switches extensively, both on RaspBee and on ConBee II.

Tested the setting of "light" state for lights, Heiman siren, and old model Xiaomi curtain controller (using Window Covering cluster as well as Analog Output cluster). I don't have any other Window covering devices to test, nor any other Warning device devices (notably fire/smoke sensors that expose IAS WD cluster).

Open issues:

  • We still need to figure out how to activate the 0xFC00 cluster on the Aurora.
  • The Aurora seems to be fixed on the group it picked on reset (0xF105 (61701) in my case), and doesn't change this when binding the client clusters.
  • There's still some code in database.cpp that might not be needed, but I left it in as a safety net:
    if (sensor.modelId().startsWith(QLatin1String("RWL02"))) // Hue dimmer switch
    {
    clusterId = VENDOR_CLUSTER_ID;
    endpoint = 2;
    if (!sensor.fingerPrint().hasInCluster(POWER_CONFIGURATION_CLUSTER_ID))
    {
    sensor.fingerPrint().inClusters.push_back(POWER_CONFIGURATION_CLUSTER_ID);
    sensor.setNeedSaveDatabase(true);
    }
    if (!sensor.fingerPrint().hasInCluster(VENDOR_CLUSTER_ID)) // for realtime button feedback
    {
    sensor.fingerPrint().inClusters.push_back(VENDOR_CLUSTER_ID);
    sensor.setNeedSaveDatabase(true);
    }
    }
    else if (sensor.modelId().startsWith(QLatin1String("ROM00"))) // Hue smart button
    {
    clusterId = VENDOR_CLUSTER_ID;
    endpoint = 1;
    if (!sensor.fingerPrint().hasInCluster(POWER_CONFIGURATION_CLUSTER_ID))
    {
    sensor.fingerPrint().inClusters.push_back(POWER_CONFIGURATION_CLUSTER_ID);
    sensor.setNeedSaveDatabase(true);
    }
    if (!sensor.fingerPrint().hasInCluster(VENDOR_CLUSTER_ID)) // for realtime button feedback
    {
    sensor.fingerPrint().inClusters.push_back(VENDOR_CLUSTER_ID);
    sensor.setNeedSaveDatabase(true);
    }
    }
  • There's still some code in DeRestPluginPrivate::checkSensorsGroup() in bindings.cpp that doesn't handle multiple group IDs in config.group. I don't know how to fix that; I'm simply not calling this method for the innr nor the icasa.
  • taskToLocalData() only handles light tasks.
  • Still no support for groups containing Window covering or Warning device "lights".

Hue smart button atribute reporting for _Battery Percentage Remaining_ in line with Hue bridge, see #2077.
Refactor handling of Hue dimmer switch, Hue smart button (#2077), and of Lutron Aurora FoH dimmer switch (#2305).
No binding for Aurora from _On/Off_ client cluster.
See #2541.

Add full support for innr RC 110 and for icasa Remote.
@ebaauw ebaauw changed the title Hue dimmer, Hue smart button, Lutron Aurora Hue dimmer, Hue smart button, Lutron Aurora, innr RC 110, icasa Remote Mar 6, 2020
Support setting `state.bri` for `lumi.curtain.hagl04`(Xiaomi Aqara curtain motor B1) by writing _Present Value_ in the _Analogue Output_ cluster.  See #1654.
- Delegate the handling of _Window covering_ devices to `setWindowCoveringState()`;
- Delegate the handling of _Warning device_ devices to `setWarningDeviceState()`).
- Setting `state.on` for the Xiaomi Aqara B1 is translated to setting `state.bri`.  It doesn't support _Stop_ (through setting `state.bri_inc` to 0), see #1654.
- Prepares for #2475.
@ebaauw ebaauw changed the title Hue dimmer, Hue smart button, Lutron Aurora, innr RC 110, icasa Remote Hue dimmer, Hue smart button, Lutron Aurora, innr RC 110, icasa Remote, Xiaomi B1 curtain motor Mar 7, 2020
@manup manup merged commit c26cd77 into dresden-elektronik:master Mar 7, 2020
@manup
Copy link
Member

manup commented Mar 7, 2020

Awesome stuff :) hope I got the merge conflicts between this PR and the one from @SwoopX right.

@SwoopX
Copy link
Collaborator

SwoopX commented Mar 7, 2020

😓

@ebaauw
Copy link
Collaborator Author

ebaauw commented Mar 7, 2020

Which files had conflicts?

@SwoopX
Copy link
Collaborator

SwoopX commented Mar 7, 2020

Added two further devices to rest_lights mimicing a smoke sensor, for the siren.

Still feel like an idiot skrewing up the merge lately...

Edit:
Nope, the change for rest_lights.cpp got missing. I'll raise another quick PR

@manup
Copy link
Member

manup commented Mar 7, 2020

Which files had conflicts?

See merge commit: c26cd77

Still feel like an idiot skrewing up the merge lately...

No worries merging is inevitable when working parallel :)
I use Meld three-way merge which is very handy for these things but if code overlap too closely it can be a bit tricky.

@SwoopX
Copy link
Collaborator

SwoopX commented Mar 7, 2020

Yeah.

Btw, I can confirm the siren is still functional on my Develco smoke sensor. Nice job!

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.

3 participants