node-red-contrib-homekit-bridged icon indicating copy to clipboard operation
node-red-contrib-homekit-bridged copied to clipboard

[Help needed]: lost hub from Homekit

Open Barabba11 opened this issue 2 years ago • 15 comments

Your Current NRCHKB Plugin Version

1.3.6

Operating System

Pi3 5.10.48

How can we help?

Hi, it happened before, but I've solved it changeing the PIN number, ti heppens now.. I can't see more hub on iPad. I can see the Amplifer Denon, but not the hub (I've selected Bojour). I've installed a tool on PC and it can find this Type: _hap._tcp. Name: Homekit-Franco 28C6 Denon has many more entries, the homekit module juct this. Starting NR I've this: Preparing Advertiser for 'Homekit-Franco 28C6' using bonjour-hap backend! Starting to advertise 'Homekit-Franco 28C6' using bonjour-hap backend!

I've rbooted Pi, and also iPad, it didn't help. Since today it was woring fine, then we tried to share homekit from iPad to the main iPhone, it asked to enable cloud.. I haven't followed it personally, waht can go wrong? There is any way I can simulate iPad and try to discover hub? How can I debug? Thank you for help

Any more details?

If this is specific to some hardware or specific software version, please explain here.

Any code or functions to add?

No response

Barabba11 avatar Sep 04 '21 15:09 Barabba11

I'm not really sure how to continue. Some basic troubleshooting-

1- delete the bridge, deploy and restart nodered, create a new bridge

2- test changing between Bonjour and Caio

3- check LAN firewall settings

crxporter avatar Sep 04 '21 16:09 crxporter

no firewall, it's raspberry pi and in the same LAN (wifi) the iPad. Probably creating a new bridge will help, it did the last time, but damn I've to reassign all devices to the new bridge. More.. I need to locate on homekit all devices into all the different rooms on the flat! I have 50 devices, it will take me more than one hour! Why this happens? It's really uncomfortable!

Barabba11 avatar Sep 04 '21 16:09 Barabba11

Why it happens? First of all, do you have a home hub? Is it constantly online? Do you have power outage? Do you have network issues from time to time?

Shaquu avatar Sep 04 '21 17:09 Shaquu

thanks for support, I have an iPad, and for now is the only one connected running Homikit, yes it's always on (battery), I've rebooted it after it lost the hub. No power outages on the router wifi, the raspberry is under power+battery, sot it's always on and safe. No network issueas at all. Other systems as alexa and google home are fine with NR Today I did 3/4 times a complete deply, maybe it's because of that. If you bleieve your program is working corrctly, then maybe you have to consider that iOS can "ban" a device that may behaviour in strange way for their expectations (supposing they consider that). Why even after reboot everything there was no way to see it back? In my opinion 2 options, the hub is buggy or they impose a ban for that device. Sorry too late for doing that backup, as you said I removed, restart NR, created a new hub and associated all devices. I can't say now if it's working cause I did it remotely, probably I have to recreate all rooms. It would be great to know how to debug it, if it happens again, I'll try to don't deploy more..

Barabba11 avatar Sep 04 '21 17:09 Barabba11

I would not expect a ban on device. For many people it works correctly so I have to assume you either found a bug or your config is missing something.

Sometimes I redeploy many times with no issues. Remember to redeploy changed nodes only and not whole flow.

Once again, do you have a hub set up on iPad? Check in home.app under home settings and bridges

image

Shaquu avatar Sep 04 '21 18:09 Shaquu

Hi, I'll have a look as soon I can, yes I deploy only changes, but to test the initial things I should did a whole deploy. Anyway I did some before get the trouble, it didn't happen at the first. By the way it's important to know what to do if it will happen again, you told me to check if the hub still be present int the list of devices, if so, and devices are not present more in the app, I may think there is a bug in the module.. like it's not starting up properly. Correct? If it is not present, then for some reasons Homekit deleted it, as you say this is not probable.

Now, how can I test bonjour? How can I connect to it (with Windows PC for example) and try to get the list of devices, testing it? Thanks

Barabba11 avatar Sep 05 '21 14:09 Barabba11

I just see that you are playing with Windows. Unfortunately Windows is not a recommended platform to run nrchkb. As Windows api is unpredictable and likes to drop bridge advertising. Best platform is raspberry pi.

Shaquu avatar Sep 06 '21 08:09 Shaquu

No no ) as I wrote I'm using a Pi3B with recent rasbian, nodejs, npm and NR.. all is ok there. I just asked for a Windows tool to debug Bonjour, to simulate a homekit client, to try to figure out what is going on. Is the module answering properly to Bonjour request? Does it provide the list of devices? These are the questions to understand, and to help you eventually correct a bug. How you debug your module when you developed it? I guess you have some instruments..

Barabba11 avatar Sep 06 '21 10:09 Barabba11

Hi @Barabba11 Do I understand correctly that the bridge is gone by each reboot? Can it be that your sdcard became corrupted?

TheNON75 avatar Sep 17 '21 15:09 TheNON75

dear friend, thanks for support. No it happened after a full deply, but it absolutely does not happen at any full deploy. Chenaces are it happened avter a reboot, but before I stopped node red, and when the prompt returns I launched a sudo reboot now. I haven't noticed it suddenly after the reboot, maybe another full deploy has taken place. I was testing critical things like restore variables from a file, I2C bus and hardware inizialization after big changes, but I've never touched homekit nodes/configuration.

This is why I asked you to give me instruments for understanging what is going on, if it happens in future. For exaple I would like to test wit a bonjour client, if there is one for windows to see if the node is outputting correctly what iOS is expecting. I don't believe I've problems with SD, I don't have any hardware waring on syslogs Thanks

Barabba11 avatar Sep 17 '21 16:09 Barabba11

Yesterday I restored the homekit functions, I hope they will be stable this time. The device was discovered but after typing password the connection went very long.. till goes on timeout. To solve that I needed to uncheck "secure connection", then it worked promptly. Is it normal? PS: I'm using it on iPad home, this device is not protected and useful to any friend/guest, for this reason no one of personal data from the phone (same account) should be copied/transfered there. To see homekit from phone and use iPad as hub I need to enable cloud, if I enable cloud I'm afraid data will be copied. Do you know how to avoid that? Thank you

Barabba11 avatar Sep 25 '21 16:09 Barabba11

@Barabba11 As for privacy issue, I am afraid it might be difficult. You could duplicate Bridges etc nodes in Node-RED: For example, for one Switch you should create two nodes, pair one with family (iCloud) and pair the second on public iPad.

Shaquu avatar Sep 28 '21 22:09 Shaquu

Thanks for answer, You mean that once iPad will be connected to iCloud all data will be shared between devices without the chance to choose which one? Really Apple never considered such problems? I can't believe..

Talking about your solution, how your node can send to cloud directly? You mean 2 iOS devices on the same WiFi, served by double hub. But when one of them will move on internet will loose the connection

Barabba11 avatar Sep 28 '21 22:09 Barabba11

@Shaquu and @Barabba11

I'm the cleanup ~~bot~~ guy doing my rounds. How's this one going? Are there more questions or can we close it?

crxporter avatar Oct 04 '21 15:10 crxporter

hi, for now it's working, but I've never deployed it again and I guess I reboot a couple of times only. My question it, there is any way I can debug the Bonjour service? Any tool to see if it is responsive? (better for Windows if possible) Thank you a lot!

Barabba11 avatar Oct 04 '21 15:10 Barabba11

@Barabba11 I do not know of any good tools. You can try Discover app on iOS and DEBUG mode for NRCHKB/HapNodeJS

Shaquu avatar Sep 20 '22 16:09 Shaquu