Skip to content

Switches with client clusters on multiple endpoints #2541

@ebaauw

Description

@ebaauw

Referring to #635 (comment). Some switches, e.g. ubisys, Busch-Jaeger, innr RC 110, iCasa remote, have multiple endpoints with client clusters, controlling a different group of lights from a different (set op) button(s).

The preferred way to expose these switches is to create a single ZHASwitch resource (for the first endpoint), and map the buttonevents from the other endpoints to this resource. The config.group attribute contains a comma-separated list of (decimal) group IDs, instead of a single group ID.

While this was implemented for the ubisys (and the Busch-Jaeger ?) switches, I didn't dara to implement it for the innr RC 110 (#635) nor for the iCasa remote (#1978), because I saw some errors in the deCONZ log. Looking into these errors, they are caused by some (old?) code not considering that config.group might contain a list of groups.

const QString &gid = item->toString();

Group *group = getGroupForId(item->toString());

Some of the (newer) code actually does:

QStringList gids = item->toString().split(',', QString::SkipEmptyParts);

As far as I can tell, the old code is used only as a safety net to ensure the /groups resources are available for the group (!) mentioned in the sensor's config.group. Meaning, it's probably safe to ignore the errors and expose the innr and icasa remotes using a single /sensors resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions