Sending a Z-Wave MultiSensor Value to a Variable

Posted on
Sat Mar 01, 2014 4:52 pm
gskarp offline
Posts: 143
Joined: Apr 19, 2012

Sending a Z-Wave MultiSensor Value to a Variable

I have an Aeotec Multisensor DSB05 and I would like to record the luminance value to a variable. How would I get the Z-Wave value in applescript?

Posted on
Sat Mar 01, 2014 9:58 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sending a Z-Wave MultiSensor Value to a Variable

AppleScript doesn't have access to sensor values. However, the good news is that you don't need a script. Just create a trigger that executes every time luminance changes. For the action, use the "Variable Actions->Insert Device State into Variable" action and just select the sensor value and the variable.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 01, 2014 11:13 pm
gskarp offline
Posts: 143
Joined: Apr 19, 2012

Re: Sending a Z-Wave MultiSensor Value to a Variable

Is Python able to poll that number directly?

Posted on
Mon Mar 03, 2014 9:44 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sending a Z-Wave MultiSensor Value to a Variable

Sure:

Code: Select all
dev = indigo.devices[LUMDEVICEID]
dev.sensorValue # this returns a float that's the luminance value


An easy way to get the part after the equal sign in the first line is to right-click the device in the device list and select "Copy Python Reference". This will put something like this on the clipboard and you can just paste it into a script/terminal window:

Code: Select all
indigo.devices[1560643748] # "024 - Luminance"


The name of the device is in quotes as the comment (after the # sign).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Mar 03, 2014 10:09 am
gskarp offline
Posts: 143
Joined: Apr 19, 2012

Re: Sending a Z-Wave MultiSensor Value to a Variable

Great! Thanks

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 19 guests