Changing device type?

Posted on
Fri Mar 30, 2018 9:58 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Changing device type?

I've been searching a bit, but can't find anything specific about this...

Is it possible to change the base type of a device? Say that my Devices.xml file defines a specific device as type "relay", but during configuration I figure out that it really needs to be type "dimmer". Can I change it somehow? Or go the other way instead?

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

Posted on
Fri Mar 30, 2018 10:21 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Changing device type?

My understanding is that you cannot - I posted a similar question a year or two ago and the response was to create a new device type and migrate from the old to the new that once it's set it cannot be changed if the user has saved devices. I think it was Matt that had said that, theoretically, you could change it but that it wouldn't really do anything without redefining the device.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Mar 30, 2018 10:29 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Changing device type?

Have you considered using a DeviceFactory?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Mar 30, 2018 10:39 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Changing device type?

jay (support) wrote:
Have you considered using a DeviceFactory?


I think that would work. Thanks.

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

Posted on
Fri Mar 30, 2018 10:52 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Changing device type?

Sorry, I thought it was for something that was already there not for a new yet-to-be published plugin device.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Mar 30, 2018 10:56 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Changing device type?

Actually, now I'm not sure it'll work.

It appears that the <DeviceFactory> supersedes all the <Device> entries in the XML. That is, if you have a <DeviceFactory>, then all device creation has to be through the factory methods. I'm adding one new <Device> to my plugin, and there are already a bunch of existing devices. This one new device has the type that's discovered during configuration.

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

Posted on
Fri Mar 30, 2018 11:30 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Changing device type?

Ah, yes, if you have existing devices which you don't want to move the creation process into the DeviceFactory dialog then that's a problem. Currently you can't mix and match DeviceFactory and non-factory devices.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests