device.xml problem with id=...

Posted on
Wed Mar 30, 2016 10:33 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

device.xml problem with id=...

When I change iPhoneBLE to iPhoneBLEx in my device.xml or anything else but "iPhoneBLE"
Code: Select all
    <Device type="custom" id="iPhoneBLE">
      <Name>BLE-connect</Name>
      <UiDisplayStateId>status</UiDisplayStateId>
...
 

and NO OTHER CHANGE WHAT SO EVER

My selection option go from
Screen Shot 2016-03-30 at 11.23.40 AM.png
Screen Shot 2016-03-30 at 11.23.40 AM.png (151.88 KiB) Viewed 2242 times

to just "BLE-connect" nothing else.

what could I be doing wrong?


Karl

Posted on
Wed Mar 30, 2016 12:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: device.xml problem with id=...

Any clues/errors in the Event Log window?

Image

Posted on
Wed Mar 30, 2016 4:49 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: device.xml problem with id=...

Nothing in the log



Sent from my iPhone using Tapatalk

Posted on
Wed Mar 30, 2016 6:03 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: device.xml problem with id=...

I'm puzzled as to why that would occur... If you want to email us a .zip'd up version of the plugin that shows the problem we can try to reproduce (and debug) into it here.

Image

Posted on
Wed Mar 30, 2016 9:43 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: device.xml problem with id=...

Matt,

he ethe plugin.

https://www.dropbox.com/s/16bdyjgygfgeev8/piBeacon-v-1-17-6.zip?dl=1

to reproduce the problem: change in device.xml line 653
<Device type="custom" id="iPhoneBLE">
to eg
<Device type="custom" id="iPhoneBLEx">

But I don't know if the plugin actually works without any rPi active for these devices.

there might be a problem in getDeviceConfigUiValues line 782 in plugin.py although I believe that is called AFTER the id selections get presented.

Karl

please do be too harsh my my spaghetti code.

Posted on
Thu Mar 31, 2016 10:28 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: device.xml problem with id=...

At first I wasn't able to reproduce the problem, but after some experimentation I did. The issue is that somewhere in your database you have a device defined with the old/previous type ID (iPhoneBLE). If you do, then the Indigo UI gets confused and won't show the correct types even if you are just trying to create a new device (not edit the orphaned device).

So find which devices you have that use the old type, delete them, then reload the plugin and it should work with the new ID. However, this presents a problem if you have any users that might be using the old type ID. So I'd only suggest making the change in the type ID if this is an internal build no one else has used yet.

And we obviously need to make the Indigo GUI a bit more robust in this case...

Image

Posted on
Thu Mar 31, 2016 10:32 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: device.xml problem with id=...

ok thanks,

I only published it with this id, but wanted to change it from iPhoneBLE to BLE-connect, as it is not just for iPhones.. and yes I have 2 of these defined.

will experiment a bit.

thanks for your help

Karl

Posted on
Thu Mar 31, 2016 10:52 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: device.xml problem with id=...

so would this work?

leave the old id one in there, name it to ... "delete me"
add a new one with the right name

leave this
Code: Select all
    <Device type="custom" id="iPhoneBLE">
      <Name>BLE-connect  --- delete me</Name>
   delete all lines up to
   </Device>

then add
Code: Select all
    <Device type="custom" id="BLE-connect">
      <Name>BLE-connect</Name>
     will all the defs here
   </Device>



Karl

Posted on
Thu Mar 31, 2016 1:23 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: device.xml problem with id=...

I think so, but you should test it out to make sure. To instruct users to select the new one maybe have the <Name> be "BLE-connect - old, select new BLE-connect below" ?

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests