Device filters return unconfigured devices

Posted on
Sat Nov 21, 2015 3:55 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Device filters return unconfigured devices

The <List class="indigo.devices"/> construct will produce a list of all devices... apparently even those for which dev.configured is False. Is this intentional? It's a bit of a trap, since it means we have to filter out unconfigured devices at every spot where we use a device filter and expect a fully-functional device.

I just stubbed my virtual toe on this because my code generally rejects unconfigured devices... which caused None values where none were seen before. It's really easy to accidentally end up with unconfigured devices (usually called 'new device' :-)) by half-creating a device and then forgetting about it...

Request: built-in XML class lists should not ever return objects that are not configured=True. (This obviously doesn't apply to the class="self" kind which we program ourselves.)

Cheers
-- perry

Posted on
Sat Nov 21, 2015 4:20 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Device filters return unconfigured devices

I agree that showing un-configured devices is probably never useful, so we'll consider modifying that. What about un-enabled devices (communication disabled)?

Image

Posted on
Sat Nov 21, 2015 5:17 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Device filters return unconfigured devices

matt (support) wrote:
I agree that showing un-configured devices is probably never useful, so we'll consider modifying that. What about un-enabled devices (communication disabled)?

I think you want to show disabled devices. They're fully functional (just not currently operating), and I want to be able to refer to them from other devices - perhaps even programmatically enable them in some situations.

(It would be nice to dim disabled objects in the displayed lists, because that's how Indigo proper shows them in its main display.)

Cheers
-- perry

Posted on
Thu Jan 21, 2016 2:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Device filters return unconfigured devices

Indigo v6.1.5 (now available) will now skip devices that are not configured.

Image

Posted on
Sat Jan 23, 2016 1:52 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Device filters return unconfigured devices

Thanks a bunch.
-- perry

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests