-
Notifications
You must be signed in to change notification settings - Fork 298
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
Improve broadcasting via sendZclFrameToAll
#1028
Improve broadcasting via sendZclFrameToAll
#1028
Conversation
I'd say no boolean, just a variable for the address: /** Broadcast to all routers. */
export const BROADCAST_ADDRESS = 0xFFFC;
/** Broadcast to all non-sleepy devices. */
export const BROADCAST_RX_ON_WHEN_IDLE_ADDRESS = 0xFFFD;
/** Broadcast to all devices, including sleepy end devices. */
export const BROADCAST_SLEEPY_ADDRESS = 0xFFFF; These should be with Zigbee spec types, usable everywhere. And the adapter function becomes public abstract sendZclFrameToAll(endpoint: number, zclFrame: ZclFrame, sourceEndpoint: number, address: number = BROADCAST_ADDRESS): Promise<void>; Note:
|
* Support custom clusters * WIP * updates * updates * updates * update * updates * Process feedback * fix lint
Funnily enough, that was my initial idea. 😊
Sure, is
We'll have to keep the current behavior, so
For the mentioned use.case, reaching every sleeping ZED seems kinda important. 😉 |
Only 6 use cases of |
Sounds reasonable. |
@Koenkk Not sure what convention we want to use for naming, but since we're gonna introduce the zdo spec too, I figure we can put global stuff at the root and zcl/zdo as subfolders. Feel free to rename! (I didn't move the content of the zcl folder here, since that's a bigger refactor. I also didn't add the million or so consts that can be introduced to remove magic numbers/strings throughout the code 😁) I added a test that mirrors the requirements of the Bosch in Koenkk/zigbee-herdsman-converters#7427. I think it makes more sense that way? await meta.device.triggerBroadcast(255, 1, BroadcastAddress.SLEEPY, Zcl.Direction.CLIENT_TO_SERVER, 'boschSmokeDetectorSiren', Zcl.Clusters.ssIasZone.ID, {data: index}); |
inclSleepyZED
parameter to sendZclFrameToAll
sendZclFrameToAll
Ah, I see! So I wasn't that far off with my guess. 😅
Very elegant solution! |
Can we export |
Waiting for Koenkk's input on naming & co, so we can export this properly. The spec folder structure will affect a lot of stuff, better to start with a solid base. |
I figure, might as well keep entirely in line with the rest, so @Koenkk Can you confirm if |
Agree. 👍 |
@Koenkk The proposed folder structure seems sensible, but we'll eventually have to move ZCL to the Zspec directory.
Ultimately, it's your decision. 😉 |
The move will be in a separate PR. It was just the right time to create the base for it since we needed a couple of "global zigbee" consts for this. |
Sounds good. |
@burmistrzak let's do this in a separate PR such that we can also merge Koenkk/zigbee-herdsman-converters#7427 before the new release. |
Just adds an optional parameter to the
sendZclFrameToAll
method so sleepy end devices (i.e.0xFFFF
) can be included in broadcast messages. 😊Seems to be required for this to work properly.