-
Notifications
You must be signed in to change notification settings - Fork 333
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
Adapter API - setProperty() #20
Comments
@dhylands Have you started working on anything like this yet by any chance? I need this for the next step on the front end, to actually turn the on/off switches on and off :) |
Looking through the code of the DebugController it looks like I could create a PropertyController with a PUT handler that looks something like this...
Should I do that, or do you think we should add a method on the adapter manager? Really I guess the adapter should be translating WebThing property names into Z-Wave device attribute names. |
Yeah - I think that the adapter manager should be creating WebThing property names, and then those should be used to create the REST API. So it would be very similar to what you have above, although I'd probably use 'Property' rather than 'Attribute' if we're going to generate WebThing properties. |
OK, well if there was a method on AdapterManager where I could just call AdapterManager.setProperty(deviceId, propertyName, value) with the Web Thing property name, that would be awesome :) |
Implemented |
As a MozIoT web app developer I would like to call a method to tell an adapter to a set a property on a device.
Suggestion:
AdapterManager.setProperty(deviceId, propertyName, value)
returns a Promise which resolves once the property has been successfully set, perhaps with a representation of the new value.
My suggestion is that this can just be called on the AdapterManager directly (referencing the device ID) so that the web app doesn't necessarily need to care which adapter the Thing is connected to...
The text was updated successfully, but these errors were encountered: