Triggering a message on a new IP device added.

Posted on
Wed Mar 09, 2016 3:33 am
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Triggering a message on a new IP device added.

Hi,

I know there is a trigger when a new IP device is added, is there a way to get the details of what IP device was added in the actions?

Thanks,
Pete

Posted on
Thu Dec 24, 2020 4:21 pm
ryanbuckner offline
Posts: 1074
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Triggering a message on a new IP device added.

I had this same question. There's a variable called ipDevsNewIPNumber that I think has this value. I think there used to be a way to list the device hardware etc.. but I can't remember how I did it in AppleScript.

Posted on
Thu Dec 24, 2020 10:43 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Triggering a message on a new IP device added.

trigger on variable "ipDevsNewDeviceNo" changed
then add executive server script w
Code: Select all
devInfo = indigo.variables["ipDevsNewDeviceNo"].value
devName = devInfo.split(";")[1] # format is ipDevice+iPDevNumber+;+devName
dev = indigo.devices[devName]
hardware = dev.states["hardwareVendor"]
# then eg:
indigo.server.log(u"fingscan new dev:"+dev.name+u" vendor:"+ hardware)

or use variable info
Code: Select all
devInfo = indigo.variables["ipDevsNewDeviceNo"].value
varname = devInfo.split(";")[0]
indigo.server.log(u"fingscan new dev:"+ indigo.variables[varname].value)


this should work, not tested

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests