You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parameters to create a new thing are:
- thing name - mandatory
- device (id) to bind the thing to - optional
- thing template - mandatory if no thing to clone is passed
- thing to clone (id) - mandatory if no template
note that:
- iot client is really ugly and should be refactored -> the problem is that iot-client-go doesn't accept the 'properties' field when creating a new thing. For this reason a standard http request has been performed.
todos and questions:
- improve naming of create flags and create params (maybe it's not clear that IDs should be used)
- is template or thing to be cloned a real requirement? An empty thing could also make sense
- refactor iot client AddThing -> prerequisite: add the properties parameter in iot-client-go
- thing Create function stores the thing parameters into an empty interface -> this will be replaced into a proper structure as soon as iot-client-go can handle properties
0 commit comments