-
Notifications
You must be signed in to change notification settings - Fork 507
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
Devices with multiple switch endpoints #1122
Comments
Hmm, #36 (comment):
This seems inconsistent with manup/homebridge-hue@6ae1901? |
Yes for Busch-Jaeger it was the same reason. Personally I like to have just one ZHASwitch resource there the config.group is an array. When I recall correctly for the C4 it is implemented this way, I can check this over the week. |
So let's make that happen. Indeed I would prefer an array for
"This" meaning multiple endpoints? Yes, originally, but that was changed. See e.g. #990. "This" meaning an array of groups? No, it's a string, see #990 (comment). |
The Busch-Jaeger switches need to keep the multiple resources and respective single config.group attribute. There are quite some installations out there with dozens of rules using them. What we can do here is to extend the first ZHASwitch resource to emit all button events and provide the capabilities. This way everything should still work. The other resources can be marked with an attribute I've already done this for the dresden elektronik Lighting Switch wich also has two resources. All events are reported on the first resource, works pretty well and older installations keep working too. Instead of using existing config.group attribute we can also introduce "config":
{
"groups": [ { "ep": 10, "id": 200 }, { "ep": 13, "id": "23876" }, { "ep": 15, "id": null } ]
} or "config":
{
"groups": [ 200, 23876", null ]
} I think the C4 |
I think I would prefer the second form. As the endpoints are combined into a single ZHASwitch, the endpoint is no longer relevant to the client app. If you do add |
The api would indeed be cleaner, ok second form it is. :) The endpoints are only handy for creating bindings if needed, but this can also be mapped in deCONZ. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue, also for the switches, #1509. |
@ebaauw just by curiosity, the opple use binding too, to prevent broadcast command, but I don't see where you do that in the code ? And I have another problem, on a device (switch with multiple endpoint) I don't want to use one group by endpoint, so I m using only one gid. And I don't think the code can't support this method because of
So do you think it's better use ugly hack, a new fonction to make bind to the coordinator (but without group), or there is something I have missed on the code ? |
This is an old, stale issue. I did implement a comma-separated list in The Opple now acts as a sensor, sending reports from the server Multistate Input clusters to the coordinator, instead of as a controller, sending commands from the client On/Off and Level Control clusters to a group. Consequently, The Tint remote by Müller light from my current PR (#2849) uses multiple groups, but all from the same endpoint. It acts very much like a ZLL device, picking groups on reset without a binding. Did some brilliant (?) hacking to get the groups listed in order in |
Thx. |
Yes. You can even bind different devices to the same group. Makes sense if you have multiple doors into a room, with a wireless switch next to each door. When pairing ZHA/ZB2 controllers, the REST API plugin creates a group per endpoint and binds the client clusters from that endpoint to that group. ZLL controllers pick the group(s) themselves, and do not require binding. The REST API plugin creates the group when the first command from the controller (endpoint) is received. |
There seem to be two scenarios of exposing devices with multiple switch endpoints:
Combine all the switch endpoints into one ZHASwitch resource, as is done for the ubisys devices.
deconz-rest-plugin/de_web_plugin.cpp
Line 3503 in 4be717c
On receiving a command from a different endpoint from the switch, it's mapped to the one resource
deconz-rest-plugin/de_web_plugin.cpp
Line 523 in 4be717c
The same is done for the Xiaomi switches, but elsewhere in the code.
Expose multiple ZHASwitch endpoints (one per endpoint), as I have done for the innr RC 110 and has been done for e.g. the Busch-Jaeger switches. On receiving a command from the switch, it's handled by the resource corresponding to the endpoint.
Scenario 1 seems cleaner, but we still have an issue with storing multiple groups in
config.group
(that's why I opted for multiple resources for the innr RC 110).I seem to remember that my D1 used to have two ZHASwitch resources many versions ago (scenario 2), but we combined them along the way (scenario 1). The old extraneous endpoints seem to be ignored (deleted?) on database load.
deconz-rest-plugin/database.cpp
Line 3207 in 4be717c
However, homebridge-hue still expects four ZHASwitch resources for the ubisys C4.
@manup, could you help me with the following questions:
config.group
in scenario 1?The text was updated successfully, but these errors were encountered: