sprut666666 / com.sprut.homekit

Homekit app for Homey
77 stars 13 forks source link

HomeKit no longer finds the Homey #5

Closed rickardp closed 6 years ago

rickardp commented 6 years ago

I managed to add the Homey to HomeKit once, then the HomeKit device stopped responding (icon with an exclamation mark), possibly due to the Homey receiving a new IP from DHCP. I tried removing the device, but now I can not add the device back (it is not discovered in the Home app). I tried uninstalling the app, restarting the Homey, manually installing the latest version from the master branch, and neither did help.

I tried running the "Fan" example from has-node and it works perfectly (even with IP change). I ran "dns-sd -B _hap._tcp" on my computer, and it shows both the "NodeJS Fan" and the "Homey xxxxx" services. Both services respond with a zero-length response on the HTTP port. Both TCP ports are open when I "nc" to them.

Is there anything I can do to track down the problem?

rickardp commented 6 years ago

Got it working now by changing the filename ../userdata/homey.json into ../userdata/homey_2.json for the config file parameter to has-node. Maybe it was corrupted somehow? Is there any way to reset this file from the UI? Otherwise I can't see how I could reset the state without hacking the app to delete the file for me.

rickardp commented 6 years ago

What differs between the files are the following fields:

publicKey
CCN (was 39, now 7)
privateKey

and some fields in the UUIDMap. The "parings" key is the same.

sprut666666 commented 6 years ago

The problem is floating until it can be completely corrected = ( But we are working on this, there is no debug information from Apple.... You can remove the application from the Homey interface, and reinstall it and everything will work.

mhabedinpour commented 6 years ago

Hey @rickardp, Can you do these things and let me know?

  1. Install the package and be sure HomeKit is working.
  2. Change IP address of your Homey device.
  3. See if HomeKit is still working.
  4. Restart your Homey device.
  5. See if HomeKit is working now.
  6. Restore the Homey IP address and restart it.
  7. See if HomeKit is working.
mhabedinpour commented 6 years ago

If it didn't work in step 5, Please check the IP address and TXT records of related Bonjour service before restoring the IP address. Also can you confirm one more time that HAS itself working even with IP address change? Thanks.

rickardp commented 6 years ago

Here’s what I found so far: • Changing the IP address breaks HomeKit, but I also have to restart the Homey a coupe of times for the DHCP renewal to take effect, meaning I cannot really say if it is the IP change that breaks it. • After pinning the IP, HomeKit worked for over two weeks, then broke (It could have been after Homey updated itself). It has now happened twice with a pinned IP, so clearly it is not only caused by an IP change. • I have still not found a way of restoring HomeKit without removing the Homey and resetting the app, meaning I have to set up the rooms all over again.

sprut666666 commented 6 years ago

Try using version 1.3.5, it should fix all problems.

rickardp commented 6 years ago

I see now that the issue was closed and according to the change log it is supposed to be fixed. It probably broke last time when updating to that version, so I will try and reset the thing once more :)

rickardp commented 6 years ago

I just checked and it had updated to 1.3.2 around the time when it broke (still not sure if the update had anything to do with it).

I now updated to the latest github version. I still had to install with “—run-clean” and delete everything to get it to respond again. Time will tell, but at least it survived a couple of Homey restarts.

rickardp commented 6 years ago

Been running for a month with no issues at all!

sprut666666 commented 6 years ago

nice )