-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: multicast/broadcast apis #25
Merged
Merged
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8dd1d36
feat: multicast api
robertsLando fa2679f
docs: fix lint
robertsLando 0b63206
Merge branch 'master' into feat#multicast
robertsLando af42de6
fix: await writes to zwave broadcast and multicast requests
robertsLando b9fbecc
fix: lint issues
robertsLando badad4e
fix: use parsed payload in write value
robertsLando 9570bec
Merge branch 'master' into feat#multicast
robertsLando 9ce6fff
docs: json payload
robertsLando 7f20390
Merge branch 'master' into feat#multicast
robertsLando 1648adf
Merge branch 'master' into feat#multicast
robertsLando fbeccbd
feat: use native multicast and broadcast from zwave-js
robertsLando 64dbcd5
docs: multicast and broadcast
robertsLando 0d51cdd
Merge branch 'master' into feat#multicast
robertsLando 6e1e51c
Merge branch 'master' into feat#multicast
robertsLando 854b4fa
fix: replace debug with logger
robertsLando 42cccfb
fix: replace debug with logger
robertsLando ddd63c6
fix: replace debug with logger
robertsLando 0d1cb48
fix: replace debug with logger
robertsLando 0e880b8
fix: replace debug with logger
robertsLando cafd301
fix: replace debug with logger
robertsLando 4b63eed
fix: replace debug with logger
robertsLando c686a0f
fix: types
robertsLando 22aed8c
fix: types
robertsLando f611bcc
fix: lint issues
robertsLando b1987a5
Merge branch 'master' into feat#multicast
robertsLando de8847b
fix: lint issues and missing fallbacks
robertsLando 103575d
fix: broadcast/multicast docs
robertsLando 4100f38
fix: lint issues
robertsLando c35ecb4
fix: docs nits
robertsLando 36e4eb3
Merge branch 'master' into feat#multicast
robertsLando 566dbef
Merge branch 'master' into feat#multicast
robertsLando 19a8339
docs: fix docs/guide/mqtt.md
robertsLando File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really clear on this, maybe provide a use case from the outset such as adjusting all your thermostats/lights?
be clearer that this is just a shorthand, it's not an actual multicast, behind the scenes zj2m is doing the heavy lifting and iterating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zwave-js
does support actual multicast (if you use the same command and target the same endpoint of all nodes).But it doesn't go through the
commandClasses
API that is being used here. Might be a good idea for a new feature , so you can grab a group of nodes and send a single multicast command to all of them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've raised zwave-js/node-zwave-js#1150 to track that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, what you can do already is this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree with that i really would like to send a group of nodes the command at the same time using a real multicast if that is possible.
Why, because i found it nice that all nodes respond at the same time, now it takes upto 5 seconds to respond.
Which is also generating errors like #26
My feeling about this is that since all these nodes are generating data (e.g. power reports, closing / dimming duration reports) that it become quite busy on the network, therefore i would like to send it using a real multicast to the nodes so that they all do receive the command before it is getting busy on the network.
If i see it now it looks like this is the same as what i can do within openhab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should wait for: zwave-js/node-zwave-js#1150 Before going on with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlCalzone How could I get the correct command class constructor based on the command class id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't see this...
https://github.com/zwave-js/node-zwave-js/blob/daf0feb9bfe14ae5b9a24c0d0d53206d5bdd41e9/packages/zwave-js/src/lib/commandclass/CommandClass.ts#L1057-L1059
But I'm not sure if that is exported through the main entry point.