Set custom device 'address' column

Posted on
Sat Mar 25, 2017 1:21 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Set custom device 'address' column

I've just noticed that some plugins have set the address column in their custom devices, but I can't see any reference to this in the devices.xml documentation.

What's the command for it?

Peter

Posted on
Sat Mar 25, 2017 2:21 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Set custom device 'address' column

Hi Peter,

Create a plugin property with the key name "address" and Indigo will automatically use that in the UI for that column.

Image

Posted on
Sat Mar 25, 2017 2:23 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Set custom device 'address' column

Ah right, thanks.

I saw that in Beacon's plugin but thought it was coincidence as that HAS a logical address property already.

Cheers.


Sent from my iPhone using Tapatalk

Posted on
Tue Feb 12, 2019 12:58 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Set custom device 'address' column

Is it possible to have the address property and a separate "address display" property?

I want to have a smart power strip show as IP:switch -- 192.168.0.10:1. But I'd like the address to just be 192.168.0.10.

Or would it be better to show it in the state column with displayStateValUi?

Posted on
Wed Feb 13, 2019 10:52 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Set custom device 'address' column

I'm not positive I understand exactly what you want, but I think it might be this:

dev.updateStateOnServer("address", "192.168.0.10:1", uiValue="IP:switch -- 192.168.0.10")

Image

Posted on
Wed Feb 13, 2019 11:24 am
jblackburn offline
Posts: 77
Joined: Dec 11, 2013
Location: Quebec, Canada

Re: Set custom device 'address' column

Is it the same thing for the "firmware" column? Property?

Thanks!

Joël

Posted on
Wed Feb 13, 2019 12:00 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Set custom device 'address' column

Yes, you can pass in different raw and UI values for all states. That said the behavior as to what Indigo shows in the UI might need some tweaking for special states (like address and firmware). That is, I'm not positive Indigo UI will properly use the UI values in all places in its UI. If it doesn't though that is probably a buglet.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests