[ANSWERED]Waiting for indigo.dimmer.setBrightness() to compl

Posted on
Mon Jul 25, 2016 8:32 pm
brlandy offline
Posts: 31
Joined: Feb 19, 2012

[ANSWERED]Waiting for indigo.dimmer.setBrightness() to compl

Hi, is it possible to force a python script to wait for a call indigo.dimmer.setBrightness to complete, rather than execute asynchronously?

Thanks,
Brian

Posted on
Tue Jul 26, 2016 9:46 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Waiting for indigo.dimmer.setBrightness() to complete

No. For instance, if you're asking for a way to wait until the actual device has changed to the appropriate brightness then the problem is that we may not know when or if that happens (X10), we may not know for quite a while (low polling on Z-Wave devices that don't automatically report), or if we just didn't get the update from the device that the new value is set (dropped Insteon status reports). That also applies to the various plugins that may add dimmers as well.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 26, 2016 9:00 pm
brlandy offline
Posts: 31
Joined: Feb 19, 2012

Re: [ANSWERED]Waiting for indigo.dimmer.setBrightness() to c

Thank you, that makes sense. I knew this was possible for Insteon via raw messaging but can see why it would be problematic more broadly.

Luckily I was able to figure out another solution to the problem tonight. I have a plugin device monitoring another device for changes, and when that device is changed I potentially need to send it two commands. That of course triggered more state changes, but I figured out a way to identify when a subsequent call to the method should abort without sending more commands, which stopped the recursion.

Thanks,
Brian

Posted on
Wed Jul 27, 2016 9:50 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: [ANSWERED]Waiting for indigo.dimmer.setBrightness() to c

brlandy wrote:
Thank you, that makes sense. I knew this was possible for Insteon via raw messaging but can see why it would be problematic more broadly.


Actually, not exactly. The Insteon protocol will tell you when the device acknowledges receipt of the command (as does Z-Wave) but it doesn't guarantee you that the brightening/dimming is actually done. It's a fine distinction, but notable if that's what you're looking for.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests

cron