-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Add support for controller-specific Serial API commands (e.g. through plugins) #1245
Comments
According to 7.3 Here The response contains FUNCID_SUPPORTED_BITMASK[ ] if this bitmask only reports on the zwave specifics, and not the proprietary functions - then no good. |
I think detecting the functionality is not the problem. However different sticks will have different implementations using the same proprietary funcids and we need to find a way to make this easily discoverable for the dev who wants to use these methods. Setting up syntax help (IntelliSense) for something dynamic like this is going to be interesting. |
I concur... Taking the need to know about the proprietary functions a way (i think this can be achieved overtime) You could look at something along the lines of
Then upon calling such methods, if the Manufacturer/Product ID's don't match, throw. at least this way, static IntelliSense can be provided based on CONTROLLER_MODEL It feels muddy if I'm honest - but is an option. |
Hi, maybe I am missing something but in the old Open zwave implementation the Aeotec stick had configuration as any other device. |
Hi @ivdimitro See here, Configuration changes on Controllers are proprietary, we removed config entries for this controller, for this reason. This is currently a low priority, but my suggestion is to have something like this. Lets take the Aeotec LED example
we want to add intellisense for developers, so it needs to be strongly typed. |
That's the gist of it. It requires proprietary commands (of which the UZB3 for example has several), and I prefer a more generic solution (which could also be useful for other controllers) than hard coding device specific features directly into the driver. |
Yup, I have done something quite generic with NR. This takes 2 params: the proprietary function ID & the payload that it expects /* Turn of LED */
const OffBufferData = Buffer.from([0x51, 0x01, 0x00, 0x05, 0x01]) /* User Request Data */
const Message = {
payload: {
mode: "ControllerAPI",
method: "proprietaryFunction",
params: [0xF2, OffBufferData]
}
}
return Message behind the scene its doing this. const ZWaveMessage = new ZWaveJS.Message(Driver, {
type: ZWaveJS.MessageType.Request,
functionType: Params[0],
payload: Params[1]
});
const MessageSettings = {
priority: ZWaveJS.MessagePriority.Controller,
supportCheck: false
};
await Driver.sendMessage(ZWaveMessage, MessageSettings); its a glorifed sendMessage wrapper 😄 |
I've seen the configuration but never bothered to change anything as I like the lights :). Thanks for the explanation. |
Some controllers, e.g. Aeotec Z-Stick Gen5 bring their own serial API commands which use proprietary function types. We could add support for them and auto-load the correct controller "plugin" after the controller was identified.
See the document in #1241 (reply in thread) for a description of the commands.
Discoverability of these commands for developers is an issue though.
The text was updated successfully, but these errors were encountered: