Bridge Name Change

Posted on
Thu Jun 30, 2022 9:45 pm
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Bridge Name Change

I changed the names on the HomeKitLink bridges and the whole database went sideways, devices disappeared, bridges disappeared. I had to delete everything including the plugin, but problems are still lingering. I also could not figure out how to delete the entire plugin and database, it was clear after plugin deletion artifacts were still present. I also just updated to the latest Indigo 2022.1.2, not sure if that contributed.

After name changes:

Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
2022-06-30 21:08:26.573 HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
2022-06-30 21:08:46.652 HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
2022-06-30 21:09:04.696 HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
2022-06-30 21:09:16.318 HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback

Then this after I deleted everything.

HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment
HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment

Jun 30, 2022 at 11:31:33 PM
HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment

Jun 30, 2022 at 11:31:52 PM
HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment

Jun 30, 2022 at 11:32:07 PM
HomeKitLink Siri Error Plugin Setter Exception
Traceback (most recent call last):
File "plugin.py", line 2236, in Plugin_getter_callback
return temptosend
UnboundLocalError: local variable 'temptosend' referenced before assignment

Posted on
Thu Jun 30, 2022 9:58 pm
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Bridge Name Change

Changing the name on Bridges should not have effected anything. There is also no “Database” as you refer to.

And probably more importantly - what have you deleted??

(Deleting system/plugin files not the greatest approach - if that is what you have done?)

The error that seems to be repeated is coming from the plugin. Presumably it is back running?

Suggest:
From menu Command

- Delete Orphaned devices

& from within any HomeKit App
Delete the Bridges, that you have deleted from Indigo. (Devices should go as well)

& restart plugin.

If deleted system files, would do above and then reinstall the plugin..

Glenn

…Meanwhile - I will have a look at error - as probably could be caught better. Currently it seems to me homekit app is requesting a result which doesn’t exist anymore.

Edit:
Error relates to a thermostat device which must still be in HomeKit somewhere.
The device (set as thermostat in plugin) appears to be missing some pivotal bits that make it a thermostat in this HomeKit Plugin.
Hence the error - which ideally shouldn’t happen.

But there is code error that I can catch:

Try 0.3.8
Fixes above.
But basically doesn’t return anything for this device as missing setPoint Cool, Heat and a few other things… not sure whether this is user error wanting it to be a thermostat, or a odd thermostat device - either way one would hope error gone.

Posted on
Fri Jul 01, 2022 6:21 am
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: Bridge Name Change

Thanks Glenn! I will update the plugin. Apologies for lack of detail in my original post.
- When I changed the name on the bridge, there was a clear before and ofter effect. The devices in the bridge that were there before the name change were gone, but the devices added afterward were there.
- I deleted the bridges at both ends
- I did a Show Device Publications, and there were a number of orphans
- I ran Unlink Any Orphans, and re-ran Show Device Publication, all orphans we gone.
- Created a new bridge, a similar problem
- Devices added when I created the bridge worked fine, but when I went to added additional devices after the save/restart, same problem as above with devices disappearing.
- I deleted all bridges at both ends, deleted the orphans, and deleted the plugin, and reinstalled it.
- The error logs continued throughout the process, but as per you explanation, that appears to be non-related.

I'll update the plugin, and try again.

Thanks again for the timely and detailed response. This will be a great replacement for HomeKit Bridge.

Posted on
Fri Jul 01, 2022 6:52 am
7rdr7 offline
Posts: 163
Joined: Aug 16, 2017
Location: Washington DC Metro

Re: Bridge Name Change

Updated, all quiet, error has now disappeared. Adding new bridges without issue. Back to adding devices.

Posted on
Fri Sep 23, 2022 2:09 pm
dduff617 offline
Posts: 659
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Bridge Name Change

there's some confusion on my part as to what is being talked about here. so i'll try to take this apart. a HomeKitLink-Siri Bridge device has a name in Indigo. this is the "Device Name" for the object that gets set when you first create the bridge device from within Indigo. Similarly, there is an Indigo DeviceID. Both of these attributes live on the Indigo side of the bridge.

Then in addition, there is a "Bridge ID" attribute associated with a Bridge device. This is the value you see when you use the Plugins>HomeKitLink Siri>Show Device Publications command.

On the HomeKit side, a bridge also has a name. This name shows up when for example in the Home app, you look in "Edit Home..." > Home Hubs & Bridges >. The default name is created using HomekKitLink Siri seems to be the string "HomeKitLink Bridge <Bridge ID> <moreDigits>", where <Bridge ID> is the value of the Bridge ID attribute mentioned above for the bridge device and <moreDigits> is hexadecimal number (six digits, at least in my case). Home app will let you edit this name to be something more intutive. As far as I am aware, if you change this to something intuitive in Home (e.g. "My Indigo HVAC bridge"), then a) this name is "sticky" and will stay attached to the bridge device as seen from Home app (that's good) b) this name lives only within Home and does not show up in Indigo (that's not-so-good). and c) the name that you enter replaces the default name (which contained the BridgeID attribute as a substring) and may thereby remove your ability to make a definitive connection between the bridge on the Home side to the HomeKitLink-Siri Bridge device on the indigo side (that's bad).

Why might the name matter? In my very limited Home setup thus far, I have seven bridges (and counting). Two represent bridge devices to Hue and Lutron devices. The rest are HomeKitLink-Siri Bridge devices - so far, these have devices manually grouped by general device type and/or function such as "doors/locks", "HVAC stuff", "first floor lights", etc..

Home lets you do a "remove bridge from home" operation to completely remove a bridge if things get screwed up, you change your mind about something, you want to re-organize your devices, or for any other reason. Also, if you find from the Home app that some device is not behaving how you want and you want to go back and check the status or edit the configuration in Indigo, it is helpful to know which Bridge device you need to look at on the Indigo side to make the fix.

suggestions:
  • make it so that when you are editing the properties of the HomeKitLink-Siri Bridge device in Indigo, that we can give it a name at creation time that will be used within Home when the device appears in the list of hubs/bridges. bonus: make it possible to edit this value from the indigo side (similar to how you can edit HomeKit device names).
  • make it so that if you edit the name of the bridge on the Home side, that the change is somehow passed through to the Indigo side -- similar to how the plugin currently handles devices having an [Indigo} Name as well as a distinct HomeKit Name and tracking when the user changes the HomeKit Name within the Home app.
  • make it so that the "Show Device Publications" menu command will show the [Indigo] Bridge Name and/or the HomeKit Bridge Name for each device where it currently shows the BridgeId.

Posted on
Fri Sep 23, 2022 3:35 pm
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Bridge Name Change

dduff617 wrote:
suggestions:
  • make it so that when you are editing the properties of the HomeKitLink-Siri Bridge device in Indigo, that we can give it a name at creation time that will be used within Home when the device appears in the list of hubs/bridges. bonus: make it possible to edit this value from the indigo side (similar to how you can edit HomeKit device names).
  • make it so that if you edit the name of the bridge on the Home side, that the change is somehow passed through to the Indigo side -- similar to how the plugin currently handles devices having an [Indigo} Name as well as a distinct HomeKit Name and tracking when the user changes the HomeKit Name within the Home app.
  • make it so that the "Show Device Publications" menu command will show the [Indigo] Bridge Name and/or the HomeKit Bridge Name for each device where it currently shows the BridgeId.


Hi

Wow, that is a very long request post .. but basically it is not possible, or worth the risk, I’m afraid

1.
The guts of the bridge is created well before the device dialog appears - for various reasons but primarily the need for a unique ID. Renaming the bridge after usage would likely also have significant issues - by that it would likely break HomeKit altogether.
When you first add the bridge (using the QR code) the homeKit app displays the bridges name and a dialog pops up to edit/confirm. I presume most would edit the name here - certainly I do. As you comment I would leave the uniqueID as part of the name to make identification as needed easier. Within the app it is a simple matter to rename at any time. (Same for the devices)

2.
There is limited communication back from HomeKit to Indigo (in a generally not our own devices sense) so you can rename anything you want in HomeKit - but this is not communicated back to Indigo. (Likewise we can’t add non-Indigo devices back into Indigo from HomeKit)

3.
For same reason as above - we, the plugin, does not know what you have renamed your bridge to.


Sent from my iPad using Tapatalk

Posted on
Sat Sep 24, 2022 11:53 am
dduff617 offline
Posts: 659
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Bridge Name Change

Thanks for quick response. I can live with it as is.

If I feel a need to name bridges on the Home side, I will create a name but will also keep the numeric "BridgeID" part as a suffix to the name. This way I'll have my own description of the bridge (e.g. "Sensors", "Lights", etc.) but maintain ability to trace it back to the indigo-side device if I need to make any tweaks on the Indigo side.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest