User Tools

Site Tools


supported_hardware:homekit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
supported_hardware:homekit [2019/02/21 16:35] – [Known Issues] James Sentmansupported_hardware:homekit [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 ====Requirements:==== ====Requirements:====
-The Home Kit plugin absolutely requires Python 3.7 or newer. As of MacOS 10.14 this is not included in the standard software like Python 2.7 is. You must install it separately. The easiest way to do this is via one of the binary installers available from [[https://www.python.org/downloads/mac-osx/|Python.org Releases]] As of this writing the latest release version is 3.7.2. I would not recommend installing alpha or beta releases. Please use the 64-bit installer and not the combined 64/32 bit installer since XTension does not support 32 bit only hardware anymore anyway.  
  
-If you use the above installer then the binary positions will be correct and you can ignore this paragraph. If you already have Python3 installed or decide to instead build from source please make sure that the python3 binary file, or symbolic link to it, is available at /usr/local/bin/python3 or the plugin will not be able to find it to execute itself.+As of version 9.4.40 a separate python install is no longer required. No other work is needed to run the homekit plugin. If you are working with version prior to 9.4.40 the install instructions are preserved below:
  
-The plugin itself and all necessary dependencies are included in the current XTension distribution so no further installs are required once you have completed the Python3 install.+The Home Kit plugin requires that Python 3.7 be installed on the host machine. It does not have to be the default python version in use if you have multiple installs and it can coexist happily with multiple python versions if you are using the environment management systems. If you use an installer from python.org the default install location will be in /Library/Frameworks/Python.framework/Versions/3.7 which is what is needed for this plugin to work properly. Download Python 3.7 from the [[https://www.python.org/downloads/mac-osx/|Python.org Releases]] page. Please download the 64 bit only version as 32 bit apps will not continue to run on newer OS versions.
  
 +Xtension versions prior to 9.4.35 required python 3.7 be the “active” version of python meaning that typing “python3” from the command line would bring up the python 3.7 version even if others were installed. Versions 9.4.35 and later only require that the install be present in the default location but do not need it to be the default version on the system anymore.
 ====Setup:==== ====Setup:====
  
Line 22: Line 22:
 The Bridge Name must be unique compared to any other Home Kit Accessories on your local network. The Bridge Name must be unique compared to any other Home Kit Accessories on your local network.
  
-The Port should be left at the default unless you wish to run more than one instance of the plugin at the same time. In which case you’ll have to choose a different unique port for each one.+The Port should be left at the default unless you wish to run more than one instance of the plugin at the same time. In which case you’ll have to choose a different unique port for each one. Note that at this moment Home Kit doesn’t seem to connect properly if you change this port number or try to create more than one instance of a bridge on the same machine
  
 The “Update Config” button asks any paired Home Kit apps to reload the configuration. After adding new units or if you change the settings or names of those units you may have to click this button to force the new units or changes to appear in the Home Kit apps. At this time Apple’s home kit app does not seem to load any changes to any existing units at all. If you need to change the name of a unit in Home Kit you’ll need to do it from the Home Kit app itself as these changes don’t reliably get loaded into the App. Adding new units is no problem however, click the Update Config button and the changes will show up. Also if you add units while the interface is not enabled they may not show up when you enable it unless you click this button. This button is disabled unless the plugin is enabled. The “Update Config” button asks any paired Home Kit apps to reload the configuration. After adding new units or if you change the settings or names of those units you may have to click this button to force the new units or changes to appear in the Home Kit apps. At this time Apple’s home kit app does not seem to load any changes to any existing units at all. If you need to change the name of a unit in Home Kit you’ll need to do it from the Home Kit app itself as these changes don’t reliably get loaded into the App. Adding new units is no problem however, click the Update Config button and the changes will show up. Also if you add units while the interface is not enabled they may not show up when you enable it unless you click this button. This button is disabled unless the plugin is enabled.
Line 31: Line 31:
  
 The QR code and Pin will be blank if the plugin is not enabled. You cannot link to this plugin until you enable the plugin. The QR code and Pin will be blank if the plugin is not enabled. You cannot link to this plugin until you enable the plugin.
- 
  
 ====Database Sharing Settings:==== ====Database Sharing Settings:====
Line 74: Line 73:
 ====Color and Color Temperature Support===== ====Color and Color Temperature Support=====
 If the XTension device that you are sharing supports color or color temperature settings select “Switch” as its device type and the color or color temperature will be automatically enabled for this unit in Home Kit. As of this first beta this works, but can be a bit finicky as the Home Kit interface tends to jump around a bit while you’re changing the colors. Changes to the color in XTension do show properly in the current color display in Home Kit. If the XTension device that you are sharing supports color or color temperature settings select “Switch” as its device type and the color or color temperature will be automatically enabled for this unit in Home Kit. As of this first beta this works, but can be a bit finicky as the Home Kit interface tends to jump around a bit while you’re changing the colors. Changes to the color in XTension do show properly in the current color display in Home Kit.
 +
 +====Troubleshooting:====
 +===Duplicate AIDs:===
 +Some folks have had problems with duplicate Accessory ID’s. I have never been able to fully duplicate the issue but I believe I have located and fixed the timing issue that caused it to get out of sync with the master database in XTension 9.5.1. There are also 3 scripting commands you can run to help to trouble shoot the problem should you have it and to fix it if you do. The plugin will validate the stored AID’s for the units as they are loaded and will log in red if there are any duplicates. It will not try to fix the problem at this point as it is important to NOT reset the one that is actually the correct Unit that Home Kit thinks it is, and only the one that is not that. 
 +
 +To get a list of all shared units from the plugin and their current AIDs:
 +<code>
 +tell xInterface “name of your Home Kit Interface” to listAIDs()
 +</code>
 +
 +That will write the name of every unit shared through this interface along with it’s AID to the log. To Verify that they are all different please use the verifyAIDs() command.
 +
 +<code>
 +tell xInterface “name of your Home Kit Interface” to verifyAIDs()
 +</code>
 +
 +will write similar output to list aids but if 2 units have the same AID there will be a red log line giving you the name of both of them. You can then decide which one to perform a reset on vis the resetAID() command. If you perform this on a Unit that is working properly it will break it’s association with home kit in a way that might require a reset of the interface and rebuilding of all the sharing info so please pick the unit that is NOT the correct unit as far as your home kit settings are concerned.
 +
 +<code>
 +tell xInterface “name of your Home Kit Interface” to resetAID( “name of the problem unit”)
 +</code>
 +
 +A new AID will be selected and assigned to the Unit and the interface will restart. After that you may have to re-assign its sharing setup and also click the “Update Config” button in the Interface setup dialog. That will bring the unit back to life for sharing.
 +
  
 ====Known Issues==== ====Known Issues====
-As of this first beta changing the Accessory type of a unit does not seem to ever be reflected in the Home Kit database. If you wish to do this you’ll have to remove the bridge from Home Kit and then use the Reset Bridge button to rebuild the pairing keys and then re-pair. This has the effect of removing all the shared units as well and any settings, scenes or shortcuts that you’ve created in home kit using them. I can see that the new information is properly broadcast to Home Kit but the App does not reflect the changes. I believe this is a bug, or an intrinsic limitation in the Home app or in Home Kit itself.+Changing the Accessory type of a unit does not seem to ever be reflected in the Home Kit database. If you wish to do this you’ll have to remove the bridge from Home Kit and then use the Reset Bridge button to rebuild the pairing keys and then re-pair. This has the effect of removing all the shared units as well and any settings, scenes or shortcuts that you’ve created in home kit using them. I can see that the new information is properly broadcast to Home Kit but the App does not reflect the changes. I believe this is a bug, or an intrinsic limitation in the Home app or in Home Kit itself.
  
 Changing the name of a unit in XTension also is not reliably reflected in Home Kit. Sometimes the name change will show up in it’s display some hours or even days later, sometimes never. I can see that the information is properly sent to Home Kit but the App rarely changes what it thinks it knows about a bridged accessory. If you need to change the name of a unit as far as Home Kit is concerned you can do so directly from the Home Kit app itself by using a 3D touch tap on the unit and clicking it’s “settings” button. There is no need for an Accessory in Home Kit to have the same name as it does in XTension. You may wish to keep your XTension named “Master Bedroom Overhead” but to change the name in Home Kit just to “my room” or something similar. That works fine. Changing the name of a unit in XTension also is not reliably reflected in Home Kit. Sometimes the name change will show up in it’s display some hours or even days later, sometimes never. I can see that the information is properly sent to Home Kit but the App rarely changes what it thinks it knows about a bridged accessory. If you need to change the name of a unit as far as Home Kit is concerned you can do so directly from the Home Kit app itself by using a 3D touch tap on the unit and clicking it’s “settings” button. There is no need for an Accessory in Home Kit to have the same name as it does in XTension. You may wish to keep your XTension named “Master Bedroom Overhead” but to change the name in Home Kit just to “my room” or something similar. That works fine.
Line 83: Line 106:
  
 As of this moment Home Kit doesn’t seem to support running more than one bridge plugin instance on the same machine. Additional instances fail to pair properly. As of this moment Home Kit doesn’t seem to support running more than one bridge plugin instance on the same machine. Additional instances fail to pair properly.
 +
 +Any battery operated device currently reports a low battery status all the time to Home Kit and not just when the battery is low. This will be sorted out in the next release for now ignore the low battery flags.
 ====History==== ====History====
   * The first beta of the Home Kit plugin was included in XTension version 9.4.16 in Feb of 2019   * The first beta of the Home Kit plugin was included in XTension version 9.4.16 in Feb of 2019
 +  * As of XTension 9.4.35 it was no longer necessary that Python 3.7 was the “active” version on the system but it still requires that 3.7 be installed in the default /Library/Frameworks location in MacOS. See the Requirements section above for more info.
 +  * As of XTension 9.4.40 a separate python version install is no longer required.
supported_hardware/homekit.1550766905.txt.gz · Last modified: 2023/02/13 14:51 (external edit)