Creating a new Device using REST/HTTP Request


(Chang Long Zhu) #1

Hi all,

I was developing my own device (Service Manager and Device Handler) based on cloud, and I wonder whether it is possible to create a new Device using a HTTP call or anything similar.

Thanks,

Chang


(Brice; SmartRulesApp.com) #2

I think addChildDevice is what you’re looking for - http://docs.smartthings.com/en/latest/ref-docs/smartapp-ref.html#addchilddevice

Your service manager would have to handle the web interface, then call this function to create a new device.

This doc may also be helpful - http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html