Sorry, I think this is a bit of a basic question, but I’m only 30 minutes into writing my first SmartApp.
My goal is to subscribe to receive updates from a Raspberry PI which is talking to my alarm. I have that bit figured out, I’m just trying to work out the devices part.
I’m trying to figure out two things:
How do you find a Device in a list by Name? I know I can loop through the whole list, but that’s not particularly efficient
Is it possible to programmatically add a device? When I loop through the devices, I’d like to programmatically add a new Contact Sensor if I’m getting data for a device that isn’t already registered with Smart Things.
As a security measure, zigbee requires that you prove that you have access to a new device by doing something physically with that device at the time of joining. Usually that’s a button press, sometimes it’s a specific on off pattern. This is intended to prevent a hacker from remotely stealing control of devices.
Zwave has almost the same thing except that it will allow one controller to transfer its entire network to another controller without physically manipulating the individual devices.