Python conversion assist for 'binary outputs"

Posted on
Wed Oct 02, 2019 5:29 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Python conversion assist for 'binary outputs"

I have a single line AS that I'm hoping for the Python equivalent:

set binary outputs of device "OccupancySw" to {true}

Thanks.

Posted on
Wed Oct 02, 2019 6:00 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Python conversion assist for 'binary outputs"

SMUSEBY wrote:
I have a single line AS that I'm hoping for the Python equivalent:

set binary outputs of device "OccupancySw" to {true}

Thanks.



See https://wiki.indigodomo.com/doku.php?id ... tputdevice

But why do you need to do that in a script?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 02, 2019 6:42 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Python conversion assist for 'binary outputs"

I could not find how to set the value to 'true' on the Wiki. - only how to read the value.

Posted on
Wed Oct 02, 2019 6:48 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Python conversion assist for 'binary outputs"

SMUSEBY wrote:
I could not find how to set the value to 'true' on the Wiki. - only how to read the value.


It's just below where that link takes you.

Code: Select all
indigo.iodevice.setBinaryOutput(123, index=2, value=True)


But again, why do this in a one line script? You can do it directly in the UI for a trigger or action group.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 02, 2019 8:49 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Python conversion assist for 'binary outputs"

all I can find for Indigo is 'get binary outputs status' , and no way to set the values.
What I want to do is test for the value, and if True, make it false, and if False, make it True. Does Indigo have the means to do that?

Posted on
Wed Oct 02, 2019 9:16 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Python conversion assist for 'binary outputs"

SMUSEBY wrote:
all I can find for Indigo is 'get binary outputs status' , and no way to set the values.
What I want to do is test for the value, and if True, make it false, and if False, make it True. Does Indigo have the means to do that?


Are you reading the actual page I linked to? It's right there. With Python examples. There's a section with the header:
Set Binary Output

Set the state of the specified binary output.


Are you actually trying to do this for a binary I/O device? Because that's what I linked to. What's the actual device you're trying to control?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 02, 2019 9:34 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Python conversion assist for 'binary outputs"

I understood your reply with the python line of code also included the comment, challenging me as to why I wanted to use python. Since using Indigo is lots easier, I in turn replied with my question that I didn't see how I could set the value with Indigo.
I'm happy to use the Python line of code.
Thank you for that. If there is an alternative way with Indigo, that would be better.
Bob

Posted on
Wed Oct 02, 2019 9:41 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Python conversion assist for 'binary outputs"

SMUSEBY wrote:
If there is an alternative way with Indigo, that would be better.


https://www.indigodomo.com/docs/overvie ... e_controls

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Oct 02, 2019 10:24 pm
SMUSEBY offline
Posts: 511
Joined: Sep 16, 2009
Location: California

Re: Python conversion assist for 'binary outputs"

I was looking for true/false.
Now I'm embarrassed - again...
Thank you.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests