indigodomo / HomeKit-Bridge

Enabled HomeKit integration via Homebridge for Indigo Home Automation
The Unlicense
46 stars 13 forks source link

Major issue with home kit server(s) not starting in 0.20.0 #83

Closed mlooss closed 6 years ago

mlooss commented 6 years ago

Not sure if this is an issue or a bug yet, because I don't see any one else having this problem? My HomeKit beta testing so far has gone fairly smooth, most issue I encountered I was able to solve following the beta discussion and the Wiki. I update to new releases fairly fast and had occasional issues with the server not starting, but since v 0.20.0 I have had major issues with the server(s) failing to start. I have rebuilt the folder, reloaded the plug-in, stopped and started the Indigo server and even removed and replaced the plug-in with a new download of the same version. I did make a huge mistake, by going back to the exclude devices and I removed devices I had already included in HomeKit, I should have deleted them from HomeKit first, but I guess my brain wasn't working at that moment. I ended up removing and deleted every home kit file and folder and the plug-in and starting fresh. On the first server startup it failed to start with the same error, after many folder rebuilds, plug-in reloads and many other troubleshooting steps the server would start eventually, but after I add more device, it fails to start again. I just created a second server for my two SecuritySpay cameras (they did work perfectly before) and it failed to start too. I already ran a file system check on my disk and I don't see any problems there.

Here is my Indigo log, the server log is now empty after all those folder rebuilds, sorry.

Mar 22, 2018, 7:41:06 PM Reloading plugin "HomeKit Bridge 0.20.0" Stopping plugin "HomeKit Bridge 0.20.0" (pid 78440) HomeKit Bridge Warning

#####################################################################

HOMEKIT BRIDGE RUNNING SERVER SHUTDOWN

#####################################################################

Now blind stopping all running servers, due to Indigo timeout

limits the plugin cannot wait for them to stop but will instead

shut them down blindly and let them refresh when the plugin

restarts

#####################################################################

HomeKit Bridge Blind stopping 'Indigo Homekit' Stopped plugin "HomeKit Bridge 0.20.0" Starting plugin "HomeKit Bridge 0.20.0" (pid 62508) Trigger Update server memory variable Started plugin "HomeKit Bridge 0.20.0" HomeKit Bridge Attempting to start 'Indigo Homekit' HomeKit Bridge Warning

#####################################################################

HOMEKIT BRIDGE HIDDEN ITEMS WARNING

#####################################################################

You have 404 Indigo items being hidden, you can manage these

from the plugin menu.

#####################################################################

HomeKit Bridge Attempting to start 'Indigo Homekit Cameras' HomeKit Bridge HomeKit Bridge is loaded and ready to use

Mar 22, 2018, 7:41:49 PM HomeKit Bridge Error HomeKit server 'Indigo Homekit' could not be started, please check the service logs for more information, now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder. Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder HomeKit Bridge Error HomeKit server 'Indigo Homekit Cameras' could not be started, please check the service logs for more information, now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder. Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder HomeKit Bridge Attempting to stop 'Indigo Homekit' HomeKit Bridge Attempting to stop 'Indigo Homekit Cameras' HomeKit Bridge HomeKit server 'Indigo Homekit' has been stopped HomeKit Bridge HomeKit server 'Indigo Homekit Cameras' has been stopped

Mar 22, 2018, 7:43:44 PM Reloading plugin "Cynical SecuritySpy 2.3.0" Stopping plugin "Cynical SecuritySpy 2.3.0" (pid 90856) Trigger MOLE Camera unavailable - Push Notification Pushover Debug Camera went offline Pushover Debug Kitchen and Living Room Camera Pushover Debug Result: {"status":1,"request":"0cef3d1d-fd8a-4d9d-b92d-0b64285ac3fc"} Stopped plugin "Cynical SecuritySpy 2.3.0" Starting plugin "Cynical SecuritySpy 2.3.0" (pid 72431)

Mar 22, 2018, 7:44:32 PM Cynical SecuritySpy API version 2.0 Cynical SecuritySpy Python version 2.7.10.final.0 Started plugin "Cynical SecuritySpy 2.3.0" HomeKit Bridge Removing /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1675263299 so it can be regenerated. HomeKit Bridge Recreated the configuration folder at /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1675263299. HomeKit Bridge Warning Homebridge folder for Indigo Homekit at /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1675263299 has been rebuilt Reloading plugin "HomeKit Bridge 0.20.0" Stopping plugin "HomeKit Bridge 0.20.0" (pid 62508) Stopped plugin "HomeKit Bridge 0.20.0" Starting plugin "HomeKit Bridge 0.20.0" (pid 75509) Schedule August Lock - update unlock status variable Started plugin "HomeKit Bridge 0.20.0" HomeKit Bridge Warning

#####################################################################

HOMEKIT BRIDGE HIDDEN ITEMS WARNING

#####################################################################

You have 404 Indigo items being hidden, you can manage these

from the plugin menu.

#####################################################################

HomeKit Bridge Attempting to start 'Indigo Homekit' HomeKit Bridge Attempting to start 'Indigo Homekit Cameras' HomeKit Bridge HomeKit Bridge is loaded and ready to use Trigger Update server memory variable

Mar 22, 2018, 7:46:12 PM HomeKit Bridge Error HomeKit server 'Indigo Homekit' could not be started, please check the service logs for more information, now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder. Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder HomeKit Bridge Error HomeKit server 'Indigo Homekit Cameras' could not be started, please check the service logs for more information, now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder. Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder HomeKit Bridge Attempting to stop 'Indigo Homekit' HomeKit Bridge Attempting to stop 'Indigo Homekit Cameras' HomeKit Bridge HomeKit server 'Indigo Homekit' has been stopped HomeKit Bridge HomeKit server 'Indigo Homekit Cameras' has been stopped

Mar 22, 2018, 7:48:15 PM HomeKit Bridge Error HomeKit server 'Indigo Homekit Cameras' could not be started, please check the service logs for more information, now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder. Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder HomeKit Bridge Attempting to stop 'Indigo Homekit Cameras' HomeKit Bridge HomeKit server 'Indigo Homekit Cameras' has been stopped HomeKit Bridge Error send "Indigo Homekit Cameras" on failed

Colorado4Wheeler commented 6 years ago

Well, at least if you are going to do something wrong you do it big :). 404 items are being hidden, that could be a problem. You can delete your plugin pref file - which you didn't delete or you wouldn't get that message since that's where hidden items are stored.

That being said, the hidden items won't prevent the server from restarting and I don't see any errors regarding building the config so there must be a log there somewhere one would assume. Did you check each of your server folders for a Homebridge Log or you can use the Advanced Plugin Actions menu item to view the logs as that an option for the servers too.

Obviously something is seriously broke and I suspect on your end because nobody else reported "major issues start with 0.20.0".

And, always, if you just can't figure it out please make sure a system reboot is on your list because you never know if your issue is easily resolved with a reboot. I had an issue a couple of days ago that was driving me nuts in HomeKit Bridge and a reboot fixed me up because I just had too much running and Homebridge couldn't do its thing.

mlooss commented 6 years ago

I kind of figured it is something on my end, but I spent the last couple of days troubleshooting and didn't won't to add more to your plate. Do you sleep and are you still married, because men you are on a roll here LOL? The camera integration blew me away, it worked from the start and got better with each new release until v0.20.

Yes, I did delete this pref file and everything else related to it. When the Homekit Bridge started there were no items excluded, I went ahead and excluded them all. Yes, 400 plus, I got fingscan running and it adds new network device to Indigo which makes up the bulk of those hidden devices, it got out of control now and I should do some house cleaning.

I have not yet rebooted my server again, except when I ran the file system check recently while troubleshooting this continued issue, which makes me believe this may not solve my problem.

It is weird, I started out with a fresh install of your plug-in and had this problem immediately?

Colorado4Wheeler commented 6 years ago

Do you sleep and are you still married, because men you are on a roll here

No and yes. Although the time I've devoted to this project over the past, what, 7 or 8 weeks now is starting to take a toll on other things.

How many HKB servers are you running? I'm going to try to whip up quick script for you to run to see if we can get to the bottom of this.

mlooss commented 6 years ago

Yes, you should take some time off and clear your head, I see all these request coming in and like you already stated many times, you don't want to go down every rabbit hole.

I never expected to have camera support so quickly and your plug-in does already more than I ever expected. You should stop working on new features and support for all these plug-ins and just get the current version stable enough for final releases.

I know, it can be exciting to do ll of these things but they also take away a lot of time and I wouldn’t want you to burn out. I hope it is not to late, this is an awesome plug-in and there aren’t enough thank you to give to you.

I created two servers, but most of the time I only run one, the other is WIP or for testing for now.

On Mar 23, 2018, at 09:38, Colorado Four Wheeler notifications@github.com wrote:

Do you sleep and are you still married, because men you are on a roll here

No and yes. Although the time I've devoted to this project over the past, what, 7 or 8 weeks now is starting to take a toll on other things.

How many HKB servers are you running? I'm going to try to whip up quick script for you to run to see if we can get to the bottom of this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Colorado4Wheeler/HomeKit-Bridge/issues/83#issuecomment-375667239, or mute the thread https://github.com/notifications/unsubscribe-auth/AMA74hYs8TEwvloApTg6TSXsbeW0GlW1ks5thPq6gaJpZM4S3-_d.

Colorado4Wheeler commented 6 years ago

Cameras were always on the roadmap, as were complications. I’m not adding ‘new features’ as much as I’m doing what was always planned, getting one feature out and working out the kinks and then working another. So far there are very few bugs in the system.

mlooss commented 6 years ago

Yep, I knew the camera roadmap existed, I just never expected it as part for his beta. Anyway, the cameras used to work great for me, but I am still getting some errors I did not expect, even after a full removal and clean install of v v0.20.0 plug-in. While I drafted this post, the newly cerated Indigo HomeKit server eventually started but it took a while.

I have not yet excluded any devices and only added one Indigo device and it generated the below listed error. Another odd thing, I had changed the low default battery warning in the server from 20 to 25% and even so I had deleted all Homebrige files and folder, when I installed the plugin they 25% value showed, I expect it to be back at 20%?

HomeKit Bridge Error While performing a sanity check on the config folder, /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1995801804 was not there.

mlooss commented 6 years ago

Here is another weird issue, I just noticed when I wanted to add my newly created HomeKit server. My previous Homekit server for cameras, which I deleted and and this moment it does not exist in Indigo, but yet Apple HomeKit in the Home app sees both cameras and allowed me to set them up. Even more odd, is the fact that it shows my previous HomeKit Camera server and when I click on it it responds by asking for the accessory key. Both cameras work without me adding this camera server?

I there some caching going on by Apple's HomeKit, I was a full ay without running the HomeKit Bridge.

Colorado4Wheeler commented 6 years ago

You seem to have considerably more issues than just about anyone, and I’m not sure why but in this case I would say that whatever you were doing with the servers has left a rogue Homebridge server running on your Mac because it’s quite literally impossible to add an accessory that doesn’t have a running Homebridge server. I would reboot your Mac and see how many of your issues work themselves out.

mlooss commented 6 years ago

I am sure it is something on my end, just trying to get to the bottom of it, since it only started to happened with beta v 0.200. I rebooted my computer and it solved the issue with the camera server and cameras, showing up without having those server/devices configured. This tells me that there is some process still running on my computer, even after all servers had been stopped, plug-in disabled and all relevant files had been deleted. I even restarted the Indigo Server before I downloaded and re-installed the same version again. I also ran DiskWarrior on my server disk and it found no major issues.

I now started to add devices again, but only a few at a time and the server started and I was able to it to the Home app. I also created my camera server again and this one runs just fine, but when I edit some device on my Indigo device server, the Home app goes to updating (of course it is waiting for the server to come online again), but then all devices become unresponsive. I rebuild the folder and stopped and started the plug-in, but nothing works. Both of my Homekit servers are running now but all devices except the cameras are "No response"?

Here is another observation, I dont have one of those fancy garage door openers yet, I was using a Mimo Lite with door sensors (vertical vs horizontal sensor), I don't know when this change to took place, but now I have to invert the on/off state which was not the case before. No big problem, just something I noticed now.

Here is the log file, it does show some errors.

Mar 24, 2018, 8:00:30 PM HomeKit Bridge Error: EPERM, Operation not permitted at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/uid-number/uid-number.js:49:16 at ChildProcess.exithandler (child_process.js:267:7) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Socket.stream.socket.on (internal/child_process.js:346:11) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at Pipe._handle.close [as _onclose] (net.js:567:12) TypeError: Cannot read property 'get' of undefined at errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18) at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js:83:20 at cb (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/npm.js:224:22) at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/npm.js:262:24 at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:81:7 at Array.forEach () at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:80:13 at f (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/once/once.js:25:25) at afterExtras (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:178:20) at Conf. (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:236:22) at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/uid-number/uid-number.js:51:14 at ChildProcess.exithandler (child_process.js:267:7) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Socket.stream.socket.on (internal/child_process.js:346:11) /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205 if (npm.config.get('json')) { ^

TypeError: Cannot read property 'get' of undefined at process.errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18) at emitOne (events.js:116:13) at process.emit (events.js:211:7) at process._fatalException (bootstrap_node.js:375:26) [2018-3-24 19:23:13] Loaded plugin: homebridge-camera-ffmpeg [2018-3-24 19:23:13] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg' [2018-3-24 19:23:13] --- [2018-3-24 19:23:13] Loaded plugin: homebridge-indigo2 [2018-3-24 19:23:13] Registering platform 'homebridge-indigo2.Indigo2' [2018-3-24 19:23:13] --- [2018-3-24 19:23:13] Loaded config.json with 0 accessories and 1 platforms. [2018-3-24 19:23:13] --- [2018-3-24 19:23:13] Loading 1 platforms... [2018-3-24 19:23:13] [HomeKit Bridge Server] Initializing Indigo2 platform... [2018-3-24 19:23:13] [HomeKit Bridge Server] HomeKit Bridge base URL is http://127.0.0.1:8558 [2018-3-24 19:23:13] [HomeKit Bridge Server] HomeKit Bridge serverId is 1995801804 [2018-3-24 19:23:13] Loading 0 accessories... Load homebridge-camera-ffmpeg.Camera-ffmpeg [2018-3-24 19:23:13] [HomeKit Bridge Server] Listening on port 8445 [2018-3-24 19:23:13] [HomeKit Bridge Server] HomeKit Bridge request: http://127.0.0.1:8558/HomeKit?cmd=deviceList&serverId=1995801804 [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Outlet (ID 00456c2315188718275e3c779e2c06814d9168c13dd20779e8c88803b199ee4d): Front House Outlet [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID fdbc509bb406bd0f20a86c3caee11b00218e9386ed2bd92292c5e5ef358298b4): Front Porch Light [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device GarageDoorOpener (ID 1e5a784cdbe15c76dec9998d857473a39d70c08fc51d326f4c794701e3f591ef): Garage Door Left [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device GarageDoorOpener (ID bb30e13819f9cfeea16cdb22d2957a29e021219c72636eceb1f39f4722d9d83c): Garage Door Right [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID e0a0ea9c9546dd8076786db6064a511da68ce714d69586a9ed56448f205c33cc): Kitchen Ceiling Light [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device TemperatureSensor (ID 4d4949b6aeab6f26a6b9fe656e33d2b25098f3cc95bd34a9fdf5a788e0f8ff2c): Kitchen Temperature [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID bf9af046ef54f323c7d6a00155820c6724b1814b90506c5569acb307f5d3d424): Master Dresser Light [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 2230e5eff75acb44a626c66c10b120bce5d7967e6be9b0d9c8d0b3ce6a807262): Master IKEA Ceiling Lamp [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Thermostat (ID 134538f7ba17b30368cbf1fcd2859bddcbe6327af2fb6e189fb2d7192fa07b95): Master Thermostat [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID dc66bafeda39887e039c30a43e05f6054215f348a600f86a03284abf6da521a1): Patio Pole Left [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 78043247aa57be6aa724178e542a364f29ab1d7fea9281ff5eafedac4dbd7ae2): Patio Pole Rear [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 50fa4bdc83a30cc69eae8c445c0c1f1e731cc786a2714a1e5b59c4088784f2f2): Patio Pole Right [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Switch (ID 303797873369c955eadb41651fa84235630621359336fea9433fe899f2b8f550): Set Party Mode [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Fan (ID f2be7057a96dfc073264c027387c78bb8cdfdbcdc4a1ce30bf0a8074a99958d2): Terrace Fan [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 32e429e21eb6e80a50e96a0e0c74554d98f6ca9710512ecd55261f796bc20ddc): Terrace Laser [2018-3-24 19:23:14] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 793928436734c85754f314b57e99da941941f6968649a1956d8ba182cd0102e3): Terrace Lights [2018-3-24 19:23:14] [HomeKit Bridge Server] Created 16 accessories [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Front House Outlet'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Front Porch Light'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Garage Door Left'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Garage Door Right'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Kitchen Ceiling Light'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Kitchen Temperature'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Master Dresser Light'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Master IKEA Ceiling Lamp'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Master Thermostat'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Left'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Rear'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Right'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Set Party Mode'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Fan'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Laser'... [2018-3-24 19:23:14] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Lights'... Setup Payload: X-HM://0023ISYWY9G5B Scan this code with your HomeKit app on your iOS device to pair with Homebridge: [47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m [47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m [47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m [47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m [47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m [47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m [47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[47m [0m [47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m [47m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[40m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m[47m [0m[40m [0m[47m [0m [47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m[47m [0m Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[2018-3-24 19:23:14] Homebridge is running on port 51827. [2018-3-24 19:34:07] [HomeKit Bridge Server] GET update request for device ID 4d4949b6aeab6f26a6b9fe656e33d2b25098f3cc95bd34a9fdf5a788e0f8ff2c [2018-3-24 19:34:07] [HomeKit Bridge Server] Kitchen Temperature: refresh() [2018-3-24 19:34:07] [HomeKit Bridge Server] HomeKit Bridge request: http://127.0.0.1:8558/HomeKit?objId=612924995&serverId=1995801804&jkey=4d4949b6aeab6f26a6b9fe656e33d2b25098f3cc95bd34a9fdf5a788e0f8ff2c&cmd=getInfo [2018-3-24 19:34:07] [HomeKit Bridge Server] Kitchen Temperature: updateCharacteristicValue(CurrentTemperature): 87.6 -> 87.2 [2018-3-24 19:58:48] Got SIGTERM, shutting down Homebridge...

Mar 24, 2018, 8:01:07 PM HomeKit Bridge HomeKit server 'Indigo HomeKit' is not currently running, the configuration has been saved and will be used the next time this server starts

Mar 24, 2018, 8:01:37 PM HomeKit Bridge Attempting to start 'Indigo HomeKit'

mlooss commented 6 years ago

Both of my servers wont start at all now and I have reached the end of troubleshooting, this has been verify frustrating considering that everything worked just fine up until v 0.20.0. So far from what I have experienced, the servers run fine the first time and when I add, edit or remove a device they then fail to start.

Colorado4Wheeler commented 6 years ago

If it were me I would delete everything, and you didn’t do that before or it would be absolutely impossible for your battery percentage to have remained, delete the folder AND the pref file, the pref file is not in the folder it’s in same folder as the folder, delete the plugin and re-download it. The “now it won’t start anything” indicates you might have bigger problems because if it worked one time and you did nothing and it stopped working then you have to ask what you did that was different or what changed because the software code didn’t change between boots or decide out of spite that it just didn’t want to do what it did two minutes ago anymore ;).

On Mar 25, 2018, at 2:25 PM, mlooss notifications@github.com wrote:

Both of my servers wont start at all now and I have reached the end of troubleshooting, this has been verify frustrating considering that everything worked just fine up until v 0.20.0. So far from what I have experienced, the servers run fine the first time and when I add, edit or remove a device they then fail to start.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Colorado4Wheeler/HomeKit-Bridge/issues/83#issuecomment-376000595, or mute the thread https://github.com/notifications/unsubscribe-auth/ATYzqW5CfXdRV8_56ruewkkUe6xN5mdUks5th_04gaJpZM4S3-_d.

mlooss commented 6 years ago

Yes, I deleted all of these files including the HomeKit pref file located one folder level up from the server folders parent folder.

Here is how I went about it.

  1. Stopped both of my homekit servers in Indigo
  2. Disabled the plug-in
  3. Stopped the Indigo server
  4. Deleted the plug-in from the plugins (disabled) folder
  5. Deleted the folder containing the servers
  6. Deleted the HomeKit prefs while one level up

I then searched within the Indigo folder for anything containing homekit and found no other files.

The battery issue and the cameras showing up without any of my servers running was solved after I restarted my Mac mini server.

I am now going through these same steps again and to my surprise I see three server folder, but I only ever created two servers? I did go through the rebuild folder utility several times, but not always looking into them.

I am downloading the plugin as I post this reply and the zip decompression process is taking forever and my server just rebooted by itself?

FlyingDiver commented 6 years ago

I am downloading the plugin as I post this reply and the zip decompression process is taking forever and my server just rebooted by itself?

Sounds like you might have a hardware issue.

mlooss commented 6 years ago

I already considered this too and I ran several hardware tests and disk utilities and my system passed them all. The issue with the zip expansion taking a long time was solved when CW4 removed the links and then later reduced the archive size. I only see this issue with his files now again and not in any other downloads.

Colorado4Wheeler commented 6 years ago

So, given that you think that 0.20.0 is the root of all of this, what happens when you downgrade to a prior version? Presumably it will work 100% perfectly as it did before 0.20.0. Fortunately all releases are available to download for you to try this out.

Also, have you tried expanding the ZIP on a different computer?

mlooss commented 6 years ago

Took some more time to check my server and here is what I did and where I stand now.

  1. Tested all hardware and found no issues at all. My server is protected by a UPS and it never crashes or reboots by itself. I am in Puerto Rico and the electrical power still goes out rather frequently and this server has gone through its fare number of unexpected shutdowns, but I run a file system check most of the time after such an event. The uptime is only effected when I do updates that require a reboot and otherwise it just runs.
  2. Repaired any minor issue found with DiskWarrior.
  3. All SMART tests pass and all disk drives installed or attached and yes SoftRAID v5.5 now support SMART reporting from external drives too.
  4. Server CPU load is between 20 - 35% with short lived spike to maybe around 70%.
  5. Memory installed 16 GB and using about 11 GB.
  6. All of my other server components are running without issues, they include Indigo, Plex, Channels DVR, SecuritySpy (2 cam only) and some other mac OS Server services.
  7. This server is running macOS Sierra and I re-installed Sierra, this seems to have solved the issue with the Zip decompression taking a long time. Yes, the zip file decompressed much faster on another machine and this was the reason I reinstalled the OS.
  8. Removed all things to HomeKit plug-in and installed beta 0.19.9, all worked fine until I made an edit to a device again. First the server failed to start, but after rebuilding the server folder it started and is running but the Apple Home App now shows all devices updating followed by "No Response", again?
  9. I did order a new 2.0 TB internal disk drive and it should arrive today, I don't see issues with my current drive, but it is kind of old already and before it does go south I prefer to replace it.
  10. I tried upgrading to macOS High Sierra and it failed with firmware error and while looking into this, I noticed that my Mac mini serial number is not listed anymore and I never had the logic board replaced, it is still the original. The only upgrades I did, were memory and internal disk drive upgrades and not because of problems but to expand this server. This one I need to investigate, I know that some cloud service from Apple need it, but my iCloud account and Messages app are working.
mlooss commented 6 years ago

Looks like everyone here thinks that my issue is or was an isolated case with hardware, but after downloaded and installing v0.20.1 yesterday and deleting my homekit accessories first from the Home app, it now seems to run just fine? I have added, edited and deleted devices and the servers start and all Home app devices update and show up working, including both of my cameras that are on a second home kit server. I also swapped my disk drive today to the new one and even after cloning it and then booting from it, everything is still working.

Colorado4Wheeler commented 6 years ago

I assume you disagree that it wasn’t the plugin, but considering nothing significant changed in the latest release I am still pretty certain the plugin wasn’t at fault - particularly when you consider that downgrading didn’t help either and that release worked prior.

mlooss commented 6 years ago

We are beta testing and I am just getting all the facts together and I have been burned way to often by issues that the developer couldn't make sense off and just discarded it. Only after repeated recurring problems and finally an escalation to engineering it was confirmed to be a bug after all. Maybe there is something unique on my setup, but hard to believe since I had very little to no issues with any previous beta versions and something that the v 0.20.0 did, was still present. You are doing an amazing job and all by yourself with this plug-in and I want it to to succeed as much as you do. I am not a developer, I wish had more time to get into it, but I don't.

Thanks

mlooss commented 6 years ago

This morning, restarted my server and both of my HomeKit servers did not start automatically and they fail to start when I manually attempt to start them with the same error message. I already rebuild both server folders and reloaded the plug-in v0.20.1, I will now install v 0.21.0 and see how this one behaves.

HomeKit Bridge Error            HomeKit server 'Indigo Homekit' could not be started, please check the service logs for more information,
now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder.
Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder
   HomeKit Bridge                  Attempting to stop 'Indigo Homekit'
   Z-Wave                          received "Pool Pump Master Switch" energy total to 160.716 kWh
   HomeKit Bridge                  HomeKit server 'Indigo Homekit' has been stopped
   HomeKit Bridge Error            send "Indigo Homekit" on failed
mlooss commented 6 years ago

Just installed v0.21.0 and both homekit servers started but I did get the below error message. I am now getting "No Response" from my Home app accessories, again.

Mar 30, 2018, 12:08:33 PM
   Stopping plugin HomeKit Bridge (pid 39808)
   Stopped plugin HomeKit Bridge
   Upgrading plugin HomeKit Bridge to newer version 0.21.0 (previous version moved to trash)
   Loading plugin "HomeKit Bridge 0.21.0"
   Starting plugin "HomeKit Bridge 0.21.0" (pid 75210)
   Started plugin "HomeKit Bridge 0.21.0"
   HomeKit Bridge                  Upgrading plugin from 0.20.1 to 0.21.0
   HomeKit Bridge                  Upgrading Indigo Homekit for changes in this plugin release
   HomeKit Bridge                  Upgrading Indigo Homekit Camera for changes in this plugin release
   HomeKit Bridge                  Upgrade success
   HomeKit Bridge Error            Exception in plugin.buildServerConfigurationDict line 4348: Failed to parse: indigo:xTeCD
                             CODE: data = requests.get(ssSystem).content# Pull XML data

   HomeKit Bridge Error            Unable to build server configuration for 'Indigo Homekit Camera'.
   HomeKit Bridge Warning          

#####################################################################
# HOMEKIT BRIDGE HIDDEN ITEMS WARNING                               #
#####################################################################
# You have 278 Indigo items being hidden, you can manage these      #
# from the plugin menu.                                             #
#####################################################################

   HomeKit Bridge Error            Exception in plugin.buildServerConfigurationDict line 4348: Failed to parse: indigo:xTeCD
                             CODE: data = requests.get(ssSystem).content# Pull XML data

   HomeKit Bridge Error            Unable to build server configuration for 'Indigo Homekit Camera'.
   HomeKit Bridge                  Attempting to start 'Indigo Homekit'
   HomeKit Bridge                  Attempting to start 'Indigo Homekit Camera'
   HomeKit Bridge                  HomeKit Bridge is loaded and ready to use

Mar 30, 2018, 12:09:24 PM
   HomeKit Bridge                  Server 'Indigo Homekit Camera' has successfully started, you can use your HomeKit apps or Siri for this accessory
   HomeKit Bridge                  Server 'Indigo Homekit' has successfully started, you can use your HomeKit apps or Siri for this accessory
Colorado4Wheeler commented 6 years ago

Remove your cameras.

mlooss commented 6 years ago

I just did remove the cameras and deleted this home kit server. My main home kit server shows a couple of errors, see below.

**Error: EPERM, Operation not permitted**
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/uid-number/uid-number.js:49:16
    at ChildProcess.exithandler (child_process.js:267:7)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
**TypeError: Cannot read property 'get' of undefined
    at errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-**x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/bin/npm-cli.js:83:20
    at cb (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/npm.js:224:22)
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/npm.js:262:24
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:81:7
    at Array.forEach (<anonymous>)
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:80:13
    at f (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/once/once.js:25:25)
    at afterExtras (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:178:20)
    at Conf.<anonymous> (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/config/core.js:236:22)
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/uid-number/uid-number.js:51:14
    at ChildProcess.exithandler (child_process.js:267:7)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205
  if (npm.config.get('json')) {
                 ^

TypeError: Cannot read property 'get' of undefined
    at process.errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process._fatalException (bootstrap_node.js:375:26)
[2018-3-30 12:09:17] Loaded plugin: homebridge-camera-ffmpeg
[2018-3-30 12:09:18] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[2018-3-30 12:09:18] ---
[2018-3-30 12:09:23] Loaded plugin: homebridge-indigo2
[2018-3-30 12:09:23] Registering platform 'homebridge-indigo2.Indigo2'
[2018-3-30 12:09:23] ---
[2018-3-30 12:09:23] Loaded config.json with 0 accessories and 1 platforms.
[2018-3-30 12:09:23] ---
[2018-3-30 12:09:23] Loading 1 platforms...
[2018-3-30 12:09:23] [HomeKit Bridge Server] Initializing Indigo2 platform...
[2018-3-30 12:09:23] [HomeKit Bridge Server] HomeKit Bridge base URL is http://127.0.0.1:8558
[2018-3-30 12:09:23] [HomeKit Bridge Server] HomeKit Bridge serverId is 213427823
[2018-3-30 12:09:23] Loading 0 accessories...
Load homebridge-camera-ffmpeg.Camera-ffmpeg
[2018-3-30 12:09:23] [HomeKit Bridge Server] Listening on port 8445
[2018-3-30 12:09:23] [HomeKit Bridge Server] HomeKit Bridge request: http://127.0.0.1:8558/HomeKit?cmd=deviceList&serverId=213427823
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device LockMechanism (ID d1e04e297b985c20c3ab3cb9373931ea5b3567d6a3cbe132436ca47831cfd48a): Car Port Door Lock
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Fanv2 (ID 0a48c63f493b350b736b8d79d6cfc9c2fdd3efe34b5c07a30a5e0ac15ac782da): Family Outlet Fan
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Switch (ID 0cc621fd9e9fe090e08408d3e55231e5ea31a4dfa5d64b24c0ffd6bc14d26625): Family Outlet Strip All
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device TemperatureSensor (ID 086588920f0c3dad517b08dc465c1d26a87ff4414dd1652a91714304b28e6df2): Family Temperature
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Outlet (ID 843459f892ae168937e256a8c825997a2595071a46ecc435176436f849199a71): Front House Outlet
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 4eca44fadc46e2ee01622bb456b620c7ff1551b8d15a1d7e0e807c1d37fbd647): Front Porch Light
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device GarageDoorOpener (ID d40b67e96e4d5c86a660fdf17be39f87cf883bc1fb003f8e2ab4b48fdb4ffeac): Garage Door Status LEFT
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device GarageDoorOpener (ID 9413920b9695725b4749e5d250f4f341d94f37796794eb27db75f753fbf31209): Garage Door Status RIGHT
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 8f4aeae2c1dfde0c97113f30d10f795c4f6b544ad8a58ebdca0c6b7a919eb603): Kitchen Ceiling Light
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID f52eb88cba2dd34f0cbf5ffc766b9d5d039391174cb78afdcd57e06c07b9233b): Master Balcony Light
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 47563e0f520d7b4234955b46b62328e41a8379443e91fda8fe29f2868c57f883): Master Bath Ceiling Light
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID aee9e2834dbbdb76e0524e7aa676025a6fcc836b2ba39f27ec4ad990deef3d9d): Master Dresser Light
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Thermostat (ID fbc72c7c5b18a8b1d1096640f7477e35bf672d0bb6d1b254a4f45f1ea8febfef): Master Thermostat
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device TemperatureSensor (ID 4340a8332726fcca7ef9e4b3b0e51cdc08ccfc40e522352a1f5f3d27e2550f0d): Media Room Indoor
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 377970e8af6f39a338f3f66de96a3e31be0258c9b8468050b963594a5ce5b968): Patio Laser Lights
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 01036dcf1bd9ee93c8e53fd14fd68e8ed5ab6fe4ffc83ed32e1b6f5f9f635c29): Patio Pole Left
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID e7e2cf16afe843fa20a0bd2a7cdf75bb72fee8faf9e650185678000434ccee8d): Patio Pole Rear
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID 0dfb0bbe3d5a446bbbee1492ebabdbce78eea3ff1e04efbc2686ec7049a83d6c): Patio Pole Right
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Outlet (ID 4530ce5dac476afb36954af422306fb0f978139ae3d3e4e5c325cb7fc68e6185): Patio Wall Outlet 1
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Outlet (ID b43bad839808b8b56346345c8f8bc8abd860b5f4cce8745f777250104fce8791): Patio Wall Outlet 2
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Switch (ID e77ef161752ad44470b5a97aa4219db9a0525a79e474d1a8e306c5fb8f697075): Set Party Mode
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Fanv2 (ID 50517b9785d0fcff55c948af10fc69d0552c9dc6b2c48c24520ae4a776575276): Terrace Fan
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID ce954a5c74c9e5dcf4fecb3a505c2b828bef2cec651a2185ff903029a269847c): Terrace Laser
[2018-3-30 12:09:26] [HomeKit Bridge Server] Discovered Device Lightbulb (ID f9451abaa6ab1563c3b5808cba854fd50b952692bd0fda0b17c3f045d3710dd7): Terrace Lights
[2018-3-30 12:09:26] [HomeKit Bridge Server] Created 24 accessories
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Car Port Door Lock'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Family Outlet Fan'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Family Outlet Strip All'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Family Temperature'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Front House Outlet'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Front Porch Light'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Garage Door Status LEFT'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Garage Door Status RIGHT'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Kitchen Ceiling Light'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Master Balcony Light'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Master Bath Ceiling Light'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Master Dresser Light'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Master Thermostat'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Media Room Indoor'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Laser Lights'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Left'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Rear'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Pole Right'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Wall Outlet 1'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Patio Wall Outlet 2'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Set Party Mode'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Fan'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Laser'...
[2018-3-30 12:09:26] [HomeKit Bridge Server] Initializing platform accessory 'Terrace Lights'...
Setup Payload:
X-HM://0023ISYWYGAL7
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     

[2018-3-30 12:09:26] Homebridge is running on port 51826.
[2018-3-30 12:14:10] Got SIGTERM, shutting down Homebridge...
Colorado4Wheeler commented 6 years ago

I really don’t know why you have issues, this is now a core issue with Homebridge, something else that nobody else is experiencing. From that message your Homebridge is corrupt which I know is not part of the plugin since many are on the latest build without any issues, let alone a corrupt Homebridge.

I still think you have some underlying issue unrelated to this plugin. It might be in your best interest to not use HomeKit Bridge for now, I don’t know what else to tell you about your issues.

mlooss commented 6 years ago

I am confused, if Homebridge is not part of the plug-in, then where does it come from? I only ever had HBB installed but have since beta testing this plug-in removed it from Indigo. I never had the web deck homebridge installed either.

The log I posted contains the following error message, what do they mean?

**Error: EPERM, Operation not permitted**
    at /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/node_modules/uid-number/uid-number.js:49:16

**TypeError: Cannot read property 'get' of undefined
    at errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-**x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18)

TypeError: Cannot read property 'get' of undefined
    at process.errorHandler (/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/EPS HomeKit Bridge.indigoPlugin/Contents/Server Plugin/bin/hb/node-v8.10.0-darwin-x64/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process._fatalException (bootstrap_node.js:375:26)
webdeck commented 6 years ago

EPERM is a permissions error.

mlooss commented 6 years ago

I figured so much but what is EPERM and I have removed already everything related to HomeKit several times already and this keeps happening?

mlooss commented 6 years ago

I now removed both of my home kit servers, but left the plug-in untouched. I figured let me start with my cameras server, it only contains my two cams and immediately I got these error.

HomeKit Bridge Error            Exception in homekit.getStashRecordForObject line 884: ('key includedDevices not found in dict', u'Server Id: 1635522145', u'Server data: com.eps.indigoplugin.homekit-bridge : (dict)')
                             CODE: includedDevices = json.loads(serverProps["includedDevices"])

   HomeKit Bridge Error            Exception in homekit.getStashRecordForObject line 884: ('key includedDevices not found in dict', u'Server Id: 1635522145', u'Server data: com.eps.indigoplugin.homekit-bridge : (dict)')
                             CODE: includedDevices = json.loads(serverProps["includedDevices"])

   HomeKit Bridge                  Server 'new device' has changed ports or users, validating config

Mar 30, 2018, 9:04:23 PM
   HomeKit Bridge Error            While performing a sanity check on the config folder, /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1635522145 was not there.
   HomeKit Bridge                  Recreated the configuration folder at /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1635522145.
   HomeKit Bridge Error            Exception in plugin.buildServerConfigurationDict line 4348: Failed to parse: indigo:xTeCD
                             CODE: data = requests.get(ssSystem).content# Pull XML data

   HomeKit Bridge Error            Unable to build server configuration for 'Homekit Cameras'.
   HomeKit Bridge                  Attempting to start 'Homekit Cameras'
   Error (client)                  timeout waiting for plugin response from com.eps.indigoplugin.homekit-bridge for request UiGetValues1
   Error (client)                  timeout waiting for plugin response from com.eps.indigoplugin.homekit-bridge for request CallPluginFunc
   Error (client)                  runDialogForMenuAction() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]

Mar 30, 2018, 9:05:32 PM
   HomeKit Bridge Error            HomeKit server 'Homekit Cameras' could not be started, please check the service logs for more information,
now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder.
Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder
   HomeKit Bridge                  Attempting to stop 'Homekit Cameras'
   Error (client)                  received unexpected packet response UiGetValues1 (waiting for CallPluginFunc)
   HomeKit Bridge                  HomeKit server 'Homekit Cameras' has been stopped
   HomeKit Bridge Error            send "Homekit Cameras" on failed
webdeck commented 6 years ago

No idea what's going on with your computer. The EPERM is when NodeJS (the underlying thing that homebridge runs in) is trying to get or set the effective user or group ID of a process. Something in your OS install is messed up is all that I can think of to cause that kind of an error.

mlooss commented 6 years ago

webdeck,

thanks for this answer and it puts me back to square one. I already had checked my hardware and all disk drives and I even reinstalled macOS Sierra, which did solve the problem with the zip expansion taking for ever. I even installed a brand-new disk drive, just in case and nothing points to problems with my system, which runs all other services with no problems at all. Like I stated already, I am not a developer but at one time I tried to get airsonos running and I ended up having to install node and other dependencies more than once but I never succeeded, could this be part of the problem?

I am now going to move my Indigo installation to another computer, that is running macOS High Sierra, the latest version, while my current server is on macOS Sierra.

Thanks

webdeck commented 6 years ago

I suppose is it possible that another installation of node could interfere, but the way HKB is encapsulated is designed to ignore anything outside of its embedded install. The environment is set so that the embedded version is first on the PATH, and node is configured only to look at the embedded directories via the NODE_PATH environment variable.

mlooss commented 6 years ago

Update and yes I didn't think another install of node would not be the reason that is why I never brought it up. This has been a very frustrating and unsuccessful troubleshooting process and I get an error already just loading the homekit plug-in now and my newly created server never starts. I keep rebuilding the folder and showing the homebridge bridge log informs me that since no server ever started it could not find a log.

Here are the additional streps I have taken this past weekend, using beta 2.1 and today the new 2.2 release, both giving me the same errors messages. I completely removed Homekit bridge again and rebooted too.

  1. Upgraded first to macOS High Sierra (I already went from 10.11. to 12 last week), this upgrade went smooth, including the upgrade to the new macOS Server. Again decompressing is taking longer, but downloading other files from different sites do not take this much time to unzip.
  2. I have another Mac mini, that I use for virtualization with PROXMOX. I swapped disk drive and gave this new server a through hardware test and they all passed. I even ran a very long memory test, it too passed. The disk I swapped is a new drive that I had cloned last week already and my problems continued or actually they have gotten worse. The disk is still formatted using HSF+ Journaled and not APFS.
  3. I booted in safe mode, to let it do its cleanup
  4. Zapped the PRAM.
  5. Reset the SMC.
  6. Re-installed Indigo and even fixed the permission with their Indigo Perm Fixer utility (see attached screenshot of the results).

There are many others services running on my server, nothing new since beta testing this plug-in and they all work just fine including Indigo. I firmly believed too that this must be system/hardware related but I now have different hardware, new disk drive and gone through two OS updates with no luck at all.

indigo perm fix - results

mlooss commented 6 years ago

Here are some of the last error messages.

 HomeKit Bridge Error            Exception in plugin.buildServerConfigurationDict line 4556: local variable 'e' referenced before assignment
                             CODE: self.logger.error (ext.getException(e))

   HomeKit Bridge Error            Unable to build server configuration for 'Indigo Homekit Camera'.
   HomeKit Bridge Error            Exception in plugin.buildServerConfigurationDict line 4556: local variable 'e' referenced before assignment
                             CODE: self.logger.error (ext.getException(e))

   HomeKit Bridge Error            Unable to build server configuration for 'Indigo Homekit Camera'.
   HomeKit Bridge                  Attempting to start 'Indigo Homekit Camera'
   HomeKit Bridge                  HomeKit Bridge is loaded and ready to use
   HomeKit Bridge Error            HomeKit server 'Indigo Homekit Camera' could not be started, please check the service logs for more information,
now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder.
Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder
Colorado4Wheeler commented 6 years ago

That error, while a bug to be fixed is the same error as you had before and is tripping the bug because you are still getting an exception on your config, something about your SS config. I've already recommended not using cameras on your system right now but this is your system, not mine.

I really don't have any answers for you in the other regard. I've suggested what makes sense, like going back to the last build that worked without errors, and if you are still getting errors then I don't know how I can possibly help you because it's a different wall of errors every time you post, it's a moving target. Obviously these kind of errors would be prevalent on all installs of the plugin.

As I've said before, perhaps you would be better served and have less frustration if you just don't use the plugin for now.

mlooss commented 6 years ago

Sorry, I must have missed your post about a bug in SS and scrolling through this post I don't see any reference to it. You did asked me to remove my cameras, which I did. Yesterday I started fresh again with HomeKit and I only configured one server without any cameras as accessories, why is their still a reference to SS? When you say remove, do you mean exclude them from the plug-in, because I did not?

Colorado4Wheeler commented 6 years ago

Apparently you didn't remove your cameras from the plugin:

HomeKit Bridge Error Unable to build server configuration for 'Indigo Homekit Camera'. HomeKit Bridge Error Exception in plugin.buildServerConfigurationDict line 4556: local variable 'e' referenced before assignment CODE: self.logger.error (ext.getException(e))

Or you wouldn't get this message. The only way it can even get into this process at all is if there is a camera being sent to HomeKit. That and since the name of your server is 'Indigo HomeKit Camera' it sort of points to the fact that cameras are being sent.

Regardless that error trap should be fixed in the next release, but I doubt that this will fix the other issues, like permissions problems, that you have.

mlooss commented 6 years ago

So when you say remove the cameras from the plug-in, you do mean excluding them? If this is the case, then no I did not do that. I removed the camera server, but I started over many times and I just deleted everything HomeKit, restarted and then setup just one server yesterday without any cameras. I will now exclude all of my SS cameras and see if this solves the issue.

Colorado4Wheeler commented 6 years ago

No, that’s not what I asked. I don’t want any cameras in the server device list, that’s it. You say you removed them from HomeKit, did you remove them from the device in the plugin? I don’t think you did or we wouldn’t still be trying to send them to HomeKit.

mlooss commented 6 years ago

I am sorry but I am not following along and I have been on this non-stop so my mind might not be fully working. Cameras used to work for me from day one when you introduced this feature and even on subsequent updates, up until v 0.20.0. Le me see if I got this straight, we have the Homekit Bridge plug-in, that allows me to exclude devices so they do not show up when I create a homekit server in Indigo, do I have this part correct? When you say you do not want to see any cameras in the server device list, there are only two options, either to exclude them in the plug-in or I delete the devices them from Indigo so that they never even show up in Homekit bridge? I am going to test this new release shortly and report back.

Thank you for your patience.

Colorado4Wheeler commented 6 years ago

I'm running out of ways to explain what I want for you to do.

I don't want, nor have I asked you to, exclude anything. You have added camera devices to a plugin server, it's obvious from the error messages that you are, I just want you to REMOVE THOSE DEVICES FROM THE PLUGIN SERVER. I want you to NOT be sending cameras to HomeKit, that's it, so you can run your other devices.

Your SecuritySpy server has an odd parameter that is causing the plugin to throw an error. I've fixed the error trap so that it won't bomb so hard, if you do send them they should error out but I don't even want to go there, I need to know if your plugin is working WITHOUT CAMERAS AS DEVICES before anything else.

This has been all over the map, I don't know what's what because it's gone from a server won't start to cameras not working to devices not working to a server error to permissions problems. This ticket should have probably been 10 different tickets by now.

Please, remove any camera devices from any server you have and see if you get message, if you are unable to accomplish this I cannot help further.

Colorado4Wheeler commented 6 years ago

And the reasons your camera broke is because in one revision I started polling the SecuritySpy server device to get the device resolutions. I'm sure we can fix that but I really need to get a baseline before I can even begin doing this. If, however, you have other issues - like permissions problems - that prevent this from working then there's nothing I can do to fix that.

mlooss commented 6 years ago

C4W, look I am not trying to be difficulty or incompetent, just looking to find a solutions to my problem. I also told you that I made tests without sending any cameras to HomeKit. My last clean install was yesterday after wiping everything HomeKit and I only created one server with no cameras at all. Apparently we both run out of ways to explain this correctly. Let me repeat myself, the error messages I posted was without any cameras in my server, so if it shows them then I do not know why. I did restart my computer after deleting everything HomeKit Bridge.

mlooss commented 6 years ago

All necessary software components are embedded in your plug-in and if it is a permission error, then what permission should your plug-in have? I have gone through hoops here, replaced disk drive with a new one even so the old one showed no signs of problems. Upgraded from 10.11 to 10.12 and now to 10.13 all without any issues. Changed computer, performed a barrage of extended hardware and disk drive tests with no sign of any issue. Everything else on my system is working and without a glitch, except HomeKit now.

mlooss commented 6 years ago

I just performed a fresh install of the new plug-in v0.22.1 and I created just one server with only some lights and a few switches (NO CAMERAS).

  1. I kept all the default settings, why would the first error indicate a change for the new device for the port or username?
  2. There is no error indicating permissions problems and the homebridge.log is empty because server never started.
  3. The first sanity check fails, because no server had been created yet, but it recreated the folder.
Apr 3, 2018 at 7:34:37 PM

   HomeKit Bridge                  Server 'new device' has changed ports or users, validating config
   HomeKit Bridge                  Caching all HomeKit Bridge devices...

Apr 3, 2018 at 7:35:36 PM
   HomeKit Bridge                  Caching all HomeKit Bridge devices...

Apr 3, 2018 at 7:39:03 PM
   HomeKit Bridge Error            While performing a sanity check on the config folder, /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1357768663 was not there.
   HomeKit Bridge                  Recreated the configuration folder at /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.eps.indigoplugin.homekit-bridge/1357768663.
   HomeKit Bridge                  Attempting to start 'Indigo Homekit Server'
   HomeKit Bridge Error            HomeKit server 'Indigo Homekit Server' could not be started, please check the service logs for more information,
now issuing a forced shutdown of the service to be safe.

If you continue to have problems starting this server use the Advanced Plugin Actions menu option to rebuild the Homebridge folder.
Instructions at https://github.com/Colorado4Wheeler/HomeKit-Bridge/wiki/Plugin-Menu-Utilities#rebuild-homebridge-folder
   HomeKit Bridge                  Attempting to stop 'Indigo Homekit Server'
   HomeKit Bridge                  HomeKit server 'Indigo Homekit Server' has been stopped
   HomeKit Bridge Error            send "Indigo Homekit Server" on failed
Colorado4Wheeler commented 6 years ago

Post your Homebridge log please.

mlooss commented 6 years ago

When I execute the Show HomeBridge Log, I get this message:

Apr 3, 2018 at 11:29:31 PM
   HomeKit Bridge
   Reloading plugin "HomeKit Bridge 0.22.1"
   Stopping plugin "HomeKit Bridge 0.22.1" (pid 44488)
   Stopped plugin "HomeKit Bridge 0.22.1"                  

I then choose to reload the plug-in in debug mode and got the following messages:

 Debugging plugin "HomeKit Bridge 0.22.1" (pid 45858)
   HomeKit Bridge Error            Error in plugin execution InitializeMain:

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 26, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/serial/__init__.py", line 13, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/serial/serialutil.py", line 10, in <module>
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
ImportError: dlopen(/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so

To my surprise, this started my single server and it is now running?

HomeKit Bridge Caching all HomeKit Bridge devices...

   Started plugin "HomeKit Bridge 0.22.1"
   HomeKit Bridge Warning          

#####################################################################
# HOMEKIT BRIDGE HIDDEN ITEMS WARNING                               #
#####################################################################
# You have 330 Indigo items being hidden, you can manage these      #
# from the plugin menu.                                             #
#####################################################################

   HomeKit Bridge                  Attempting to start 'Indigo Homekit Server'

   HomeKit Bridge                  HomeKit Bridge is loaded and ready to use

Apr 3, 2018 at 11:32:15 PM
   HomeKit Bridge                  Server 'Indigo Homekit Server' has successfully started, you can use your HomeKit apps or Siri for this accessory
mlooss commented 6 years ago

The Terminal window opened after reloading the plug-in Debugger mode and this is the output.

Starting PuDB debugging of plugin EPS HomeKit Bridge.indigoPlugin.
To set breakpoints add indigo.debugger() calls and reload debugger.

2018-04-03 23:30:20.530 IndigoPluginHost[45858:5942739] Quitting Indigo Plugin Host - received quit signal
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...11 completed.

[Process completed]
mlooss commented 6 years ago

I had then reloaded the plug-in in normal mode and it is running?

mlooss commented 6 years ago

Quick update, the server keeps running and I can toggle it off/on and it will start again. But, I tried to add my server to the Home app, it showed the server and allowed me to enter the code, but failed to connect twice. On the third attempt, no HomeKit accessory is now found by the Home app, but server is running.

Colorado4Wheeler commented 6 years ago

I then choose to reload the plug-in in debug mode and got the following messages:

That's not the plugin, that's Python on your Mac and python in relation to how it is implemented by Indigo.

I had then reloaded the plug-in in normal mode and it is running?

Likely because you just needed to reload your plugin. Something that some folks have had to do after installing HKB. There is no explanation as to what changes, especially since so many never had to do this.

But, I tried to add my server to the Home app, it showed the server and allowed me to enter the code, but failed to connect twice. On the third attempt, no HomeKit accessory is now found

You likely corrupted that server in HomeKit. I've also run across having it spend a lot of time trying to load up, I have found that if I'm impatient and cancel because it doesn't work in 10 seconds that it can, and generally does, result in the same thing. So now I wait, and the last time I waited about 3-5 minutes before it finally kicked in.

To fix this you need to stop the Indigo device, change the Indigo device name, edit the config and change the HB User under advanced options by one hex character and restart, this should prime the pump again.