Powerlinc scene names?

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Wed Nov 21, 2012 4:21 pm
jamus offline
Posts: 179
Joined: Dec 01, 2007

Powerlinc scene names?

Is there any way to get a list of powerlinc scene names from python?

Thanks!

Posted on
Wed Nov 21, 2012 5:14 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: Powerlinc scene names?

There isn't an official API, but it can be done with a lower level request:

Code: Select all
linksInfoDict = indigo.rawServerRequest("GetLinksForDevice", {"Name":"PowerLinc Interface"})
linkNamesDict = linksInfoDict["ControllerGroupNames"]
indigo.server.log(str(linkNamesDict))

Note it will be a bit tricky parsing out which name belongs to which index because the keys are strings like "Name1", "Name2", "Name42" and not integers. The above could potentially break in a future version since it isn't an official public API, but surround your logic/call to handle a failure gracefully and you should be okay.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest