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.