NRCHKB / node-red-contrib-homekit-bridged

Node-RED Contribution - HomeKit Bridged : Node-RED nodes to simulate Apple HomeKit devices.
https://nrchkb.github.io
MIT License
416 stars 51 forks source link

Sometimes "No Response" when open up Homekit #343

Closed klopo1990 closed 3 years ago

klopo1990 commented 3 years ago

Good day everybody My problem is easy to describe, so I am surprised that I have not yet been able to find anything about the problem via google. When I open the Homekit app, all devices that run via Node-Red show "No-Response". Then it takes about 5-10 seconds for it to connect. My Philips Hue Bridge works without any problems and is always immediately accessible. Does anyone have any idea where the problem could be? The Raspberry Pi4 CPU usage is below 5% I use IOS 14 Thanks for your help!

crxporter commented 3 years ago

A few questions to kick off the discussion:

Does it actually show "no response" or does it show spinning circles?

Does this happen when you are on home wifi, cellular, or both?

Node version?

Node red version?

Version of our plugin? (should be 1.2.0 currently)

TheNON75 commented 3 years ago

@klopo1990 If once the connection is restored, roughly when does the same occur again? In an hour, half a day, next day... Just for the sake of completeness:

klopo1990 commented 3 years ago

Thank you for your quick replies. -Node-Red version 1.1.3 -Node version 1.2

-Sometimes it shows "no response" -Sometimes it shows "updating"

Last time it first show "updating" and then after 3-4 seconds "no response" Then after again 5-6 seconds it worked.

Updating is translated it from German. On German = aktualisieren

If I use the app more often, it occurs significantly less. But when I get home and haven't been connected to the WIFI for a long time, it always occurs.

If I close the Homekit app, deactivate WIFI, reactivate WIFI and open the Homekit app, everything is fine if I was already running shortly before. It looks like it's going to sleep mode or something.

-I'm connected to wifi. I don't use a VPN to connect to my home network. -I don't use a control center like a Homepod or Apple TV -Node-Red does not run in a Docker -Raspi is connected by cable

Everything is going great so far and I love the possibility to control all my GPIOs with this node.

Only when I come home and want to quickly turn on the light or close the window blinds, and each time you have to wait the time until it works is a realy too bad. It's really great that something like this is available for free. Many thanks to the developers!

crxporter commented 3 years ago

-I don't use a control center like a Homepod or Apple TV

I'm going to highlight this bit. I'd guess this is the issue. Anyone else around running without a home hub? Any commentary on how things go?

Without the HomePod, Apple TV, iPad, HomeKit router, or... (is there another?) then your phone will have to reconnect fresh to the pi each time you open the Home app.

My guess. Feel free to correct me @Shaquu if I misunderstood.

grafdezimal commented 3 years ago

I started using homekit-bridged without homepod or simmilar a couple of days ago and have the same issue with "not responding". I was looking for resatring issues of node-red but there is everything stable so I came acros this thread. Exactly like klopo1990: sometimes "wait circle", sometimes "device not responding" and after a couple of seconds it starts to work. No very useful for "quick turn the light". Would be happy to try any posible fixes.

Shaquu commented 3 years ago

I have an idea what might be the solution. In dev version we use new devices network advertiser. It might help as it is clearly networking issue.

grafdezimal commented 3 years ago

Just updated to 1.3.0-dev.21 (in node-red it says it were 1.3.0-dev.18). Looks better. I've still seen "device not responding" but only for a second or two, I'll try a bit with this version, I think it might be a solution. Thanks!

crxporter commented 3 years ago

Dev 19, 20, and 21 are within the last 18 hours or so I think... keep us updated on how it goes!

matteocapuzzo commented 3 years ago

I'm using AppleTV as home hub. Just switched from node-red-contrib-homekit to node-red-contrib-homekit-bridged 1.2.0 and I'm not able to add a lightbulb any more. The accessory is detected, but after I input the PIN I get 'Connection to the bridge accessory' and after a few seconds of "wait circle", I get 'Unable to add the accessory, accessory not available'. I'm running Node Red 1.2.6.

Any help will be appreciated. Thanks you all,

Shaquu commented 3 years ago

@matteocapuzzo from which version did you updated?

matteocapuzzo commented 3 years ago

@Shaquu I used node-red-contrib-homekit 0.2.1

Shaquu commented 3 years ago

Please check this. Part of our readme: image Mentioned notice about 0.x to 1.y upgrade: https://github.com/NRCHKB/node-red-contrib-homekit-bridged/pull/163#issuecomment-590108567

matteocapuzzo commented 3 years ago

@Shaquu I set-up a brand new VM where I re-installed node & node-red from scratch. Now it works. Thanks Shaquu for your prompt support.

Shaquu commented 3 years ago

@klopo1990 did you managed to resolve it? Or do you still need some help?

klopo1990 commented 3 years ago

@klopo1990 did you managed to resolve it? Or do you still need some help?

Hey Shaquu, Unfortunately, I cannot say more specifically about this problem. I now use an iPad as a control center. When I'm at home on the WiFi, the connection is established quickly and reliably. On the go, it usually takes a while to establish the connection. But this is not due to the Node. The connection to the Philips Hue is also not there immediately. This becomes a "problem" on Apple's part.

Ok anyway I would like to say thank you for the quick and nice support. Is it possible to buy you Redbull / coffee?

Shaquu commented 3 years ago

@klopo1990 you may also try reinstalling Apple TV or other home hub you are using. Also review your network. Most problems may come from there.

Regarding redbull look for Sponsor button on our repo (you may cancel right after to process as a single donation).

Shaquu commented 3 years ago

homebridge/HAP-NodeJS#875

crxporter commented 3 years ago

Stale.

Please comment and we will happily re-open for more work on this.

Christian-Me commented 2 years ago

Hello @Shaquu , Happy new Year!

I'm facing the same problem. When I open the home app (or using the control center) all devices are shown as "not responding" for a couple of seconds (1-10). This makes siri commands unusable because siri in impatient and refuses all spoken commands. All of this happens at home (not remotely)

My Setup: AppleTV (wired) to 16 port switch, 2 UniFiy APs (same switch), one network segment 192.168.2.x, no VLANs or something fancy. Node-Red is running on Windows 10. node-red-contrib-homekit-bridged Version 1.4.3, Node Red 2.1.4, Node.js v14.18.1

image

So basically I tried everything "out of the box"

BTW: After the last two updates I've done the "old" bridge config is not working (not responding) any more and I have to reconfigure everything again from scratch (new homekit bridge config) and assigning all devices in the home app again.

Perhaps someone can help. Thank you for your hard work!

Shaquu commented 2 years ago

@Christian-Me Happy New Year :)

Unfortunately it can be caused by many different things:

Most of the time it is enough to just restart all devices. Sometimes it may be required to debug further.

You can also check if you are using Ciao as advertised for your bridges.

Christian-Me commented 2 years ago

@Shaquu , thank you for your fast response.

I updated apple TV, Deleted the complete homekit configuration and started from scratch with only a few components.

I "think" my network is quite stable (ubnt edge X router, UniFy APs - not the typical router / ap / modem / .... from your isp).

Don't think that my node red flow is wrong as I build it from scratch and monitor all in and outputs. There seems to be no message where there should not be one.

Using Ciao as advertiser makes things worse - all devices stay as "not responding"! (and BTW switching back to bonjour makes node-red to crash

` 2 Jan 18:01:10 - [red] Uncaught Exception: 2 Jan 18:01:10 - [error] Error: Service name is already in use on the network at Registry._onProbeComplete (C:\Users\cmeinert.node-red\node_modules\bonjour-hap\lib\Registry.js:108:27) at Prober.done (C:\Users\cmeinert.node-red\node_modules\bonjour-hap\lib\Prober.js:67:10) at Prober.onMDNSresponse (C:\Users\cmeinert.node-red\node_modules\bonjour-hap\lib\Prober.js:61:102) at EventEmitter.emit (events.js:400:28) at Socket. (C:\Users\cmeinert.node-red\node_modules\multicast-dns\index.js:49:43) at Socket.emit (events.js:400:28) at UDP.onMessage (dgram.js:931:8)

C:\Users\cmeinert.node-red> `

But node-red works after restart ;)

You mentioned "bridges". When and why should I use more than one bridge?

After "playing" around one day I'm back at the beginning ... I'm not a siri user but my wife will be not happy :(

Christian-Me commented 2 years ago

@Shaquu TBI: restarting Apple TV helps if this effect appears. I don't know why but after adding new services sometimes it is necessary to reboot my Apple TV. But everything else works! Awesome, thank you!