Hello,
trying to set up a beagle box server that has node red installed.
Can not change version of node red and node.js.
Are there dependencies that needs looking at to run NRCHKB on it?
Node-RED version: v1.0.5
Node.js version: v8.15.0
Linux 4.9.194-venus arm LE
I can install NRCHKB, and the bridges appear in the home app but will not go beyond
"connecting to bridge". I have managed to get this to run before but I suspect some dependency
that is missing? Would appreciate a few words of help ;) Many thanks!
Hi, question is more about Hap-NodeJS
It requires 10+ I believe since it uses some security features of it.
Possibly if you want we could work on some kind of pollyfill but it would require more work and might be unsafe and could end unsuccessfully
Thanks @Shaquu
Appreciate the reply.
.. unsafe and more work polyfill sounds like something you don't have time for ;)
I guess I am looking for a way to hack it until the dependencies will be updated by the devs for this box. And they will be at some point, but we need something for now
... so if you have some kind of neat way to get working homekit switches working for now
on this node. I would appreciate a hint... I am trying the old non-bridge sibling to this plugin and that appears to load, but obviously does not have the functionality
of this plugin..at all.. but many thanks regardless!
@houser42
let's try to solve it somehow...
What is error you see currently while trying to use it?
That is very kind of you!
The error I see is on an iPhone when attempting to add a new service/bridge.
I can see the bridges and then when tapping an accessory, it says "connecting to bridge" and then "accessory not reachable" after a while. Not much I know...
I had a decent setup working on a similar machine so I know what I am after.
But struggling with this. Ah well. Late here so logging off. Hope to hear some clever hint tomorrow! Many thanks!
Here is an attempt at debugging. Does this help at all?
I am trying to set up one bridge that has 10 linked services that are switches or outlets'They could as well all be bridges if that makes it easier
Very grateful for any hints to get these into HK. Many thanks!
root@beagle:~# DEBUG=NRCHKB,HAP node-red
* Starting node-red *
30 Oct 06:08:09 - [info] Node-RED version: v1.0.5
30 Oct 06:08:09 - [info] Node.js version: v8.15.0
30 Oct 06:08:09 - [info] Linux 4.9.194-beagle arm LE
30 Oct 06:08:29 - [info] Loading palette nodes
NRCHKB RED settings available +0ms
NRCHKB HAPStorage path set to /home/root/.node-red/homekit-persist +9ms
NRCHKB:api Initialize ServiceAPI +0ms
NRCHKB:api Initialize NRCHKBVersionAPI +2s
NRCHKB:api Running version: 1.2.0 +2ms
NRCHKB:api Evaluated as: 1.2.0 +6ms
NRCHKB Registering homekit-service type +0ms
NRCHKB Registering homekit-bridge type +0ms
30 Oct 06:09:07 - [info] Dashboard version 2.23.4 started at /ui
30 Oct 06:09:09 - [info] Settings file : /home/root/.node-red/settings.js
30 Oct 06:09:09 - [info] Context store : 'default' [module=memory]
30 Oct 06:09:09 - [info] User directory : /home/root/.node-red
30 Oct 06:09:09 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 Oct 06:09:09 - [info] Flows file : /home/root/.node-red/flows_beagle.json
30 Oct 06:09:11 - [info] Starting flows
NRCHKB:HAPBridgeNode Setting name to 393bridge +0ms
NRCHKB:HAPBridgeNode Creating Bridge with name '393bridge' and UUID 'xxx' +9ms
NRCHKB:HAPBridgeNode Setting name to shellysb4 +41ms
NRCHKB:HAPBridgeNode Creating Bridge with name 'shellysb4' and UUID 'xxx' +3ms
_(note, more identical lines here for 10 or so more services that are also switches)_
30 Oct 06:09:26 - [info] Started flows
NRCHKB:HAPServiceNode Starting Parent Service 393 +0ms
NRCHKB:AccessoryUtils Looking for accessory with service subtype 'xxx'... +0ms
NRCHKB:AccessoryUtils ... didn't find it. Adding new accessory with name '393' and UUID 'xxx' +12ms
HAP-NodeJS:Accessory [393] Identification request +0ms
HAP-NodeJS:Accessory [393] Identification request ignored; no listeners to 'identify' event +6ms
NRCHKB:AccessoryUtils Bridge now has 1 accessories. +86ms
NRCHKB:ServiceUtils Looking for service with UUID 'xxx'... +0ms
NRCHKB:ServiceUtils ... didn't find it. Adding new Switch service. +2ms
NRCHKB:HAPServiceNode Starting Linked Service shellysb4 +245ms
NRCHKB:ServiceUtils Looking for service with UUID 'xxx'... +0ms
NRCHKB:ServiceUtils ... didn't find it. Adding new Switch service. +2ms
NRCHKB:ServiceUtils ... and linking service to parent. +2ms
_(note, more identical lines here for 10 or so more services that are also switches)_
30 Oct 06:09:27 - [error] Unable to listen on http://127.0.0.1:1880/
30 Oct 06:09:27 - [error] Error: port in use
root@beaglebox:~#
Could this maybe be fixed by the imminent release Candidate 1.3.0 by any chance?
It seems it could be somewhat related on the surface of it..
Logs are really useful.
First let's solve 1880 binding issue.
Looks like another process is running on that port.
About pairing issue. I need you to try to pair during debug session.
Or if you did then let me know.
Also if you could describe your setup and networking? Any information is valuable.
ok, sounds good.
Yes, I tried adding a bridge when capturing that recent log.
Just one question:
Do I actually start another extra instance of node red when I type DEBUG=NRCHKB,HAP node-red
in the terminal? That is not the dual port issue by any chance? It does say "starting node red" so maybe I am confused here?
Topology:
I am running node red on a beagle bone machine that runs Linux 4.9.194-beagle arm LE
this machine is on ethernet and handles some other stuff that requires the 8.15.0 node.js for now.
I am controlling a number of shelly relays over wifi via http and get feedback for them via mqtt.
The mqtt feedback is working and all the Homekit nodes display data correctly in the node red web GUI.
I just can not get the bridges and switches to add and appear in the home app.
I had all this working on an identical setup a few weeks ago, so it is not ashot in the dark.
I was also wondering if there has been an update to this excellent node recently?
Maybe I was running a slightly earlier version that worked with this HAP node js?
Many thanks for listening!
Ok, switched off other instance and ran again. Port conflict gone, so that was that
and I assume it has no bearing on my errors.
I can not install node.js 10 at this time. Hopefully at a later point..
This pops up all through the log, I assume it is significant?
"HAP-NodeJS:Accessory Reachability update is no longer being supported."
Here is the pairing request. Error with decrypting?
HAP-NodeJS:EventedHTTPServer [::ffff:192.168.11.115] HTTP request: /pair-setup +2s
HAP-NodeJS:HAPServer [A9:52:79:FE:28:2A] HAP Request: POST /pair-setup +6s
HAP-NodeJS:HAPServer [A9:52:79:FE:28:2A] Pair step 3/5 +6ms
HAP-NodeJS:HAPServer [A9:52:79:FE:28:2A] Error while decrypting and verifying M5 subTlv: +16ms
HAP-NodeJS:EventedHTTPServer [::ffff:192.168.11.115] HTTP Response is finished +27ms
And this is crypto module issue linked with old NodeJS.
We could try with polyfill actually.
Cause, NodeJS 8 is missing "chacha20-poly1305" cipher.
@houser42 sorry, it is more complicated then I expected, it is not easy to polyfill
hap-nodejs which is the heart of NRCHKB is using NodeJS crypto since a while for chacha20 poly1305 which support for was introduced in NodeJS 10.
So only solution is to upgrade NodeJS to 10+
Thanks @Shaquu
I understand and truly appreciate the attempt!
One final question: is it possible to install a slightly older version of your plugin to work around
it in waiting for the other bits to fall into place? Unsupported of course, but might be worth it for me.
As I am 100% sure I had it working a few weeks back.
Of course it is possible.
https://www.npmjs.com/package/node-red-contrib-homekit-bridged
After you click on Versions there will be a list visible. You will have to manually install specific version in node-red directory (possibly ~/.node-red)
Try 1.0.4
Thanks!
I managed to d-load and install version 0.9 I think. I can at least drag the node it into a flow and configure it.
edit: it semi-works but is not stable so far. Probably some dirt suff in my n麓NR flows..
I will continue to experiment and see if I can get it usable. Really appreciate your help!
Just wanted to leave a note to say thank you again, and also leave a hint to anyone searching for similar issues.
In short, it does work with these components:
NRCHKB node 0.9
Node-RED version: v1.0.5
Node.js version: v8.15.0
Linux 4.9.194-venus arm LE
It has a slightly odd caveat: Node red needs a restart for the NRCHKB node to work again,
after every change to a flow.
It makes editing time-consuming, but once compiled it appears to work 100%.
FWIW, YMMV. Many thanks again!
Hello,
Opening this thread and hope that is ok.
As I have updated dependencies (that I have to work with as they are fixed)
and same problem but with these new dependencies:
node-red v1.2.7
nodejs v10.16.3
With NRCHKB 1.2.0 I get the same "unable to add accessory" again
When I try to add the legacy versions via SSH, NR adds version 1.2.0 regardless.
npm i [email protected]
npm i [email protected]
Is there a special syntax to force a legacy version?
I would of course prefer to get the latest version going if that is a possibility with these dependencies.
Many thanks
@houser42 Probably you should start from uninstalling 1.2 then try to install older versions.
Thanks @Shaquu ,
So just to be clear on where to start, should nodejs v10.16.3 be ok to run NRCHKB 1.2.0?
If not I will wait for the relevant update on my beagle this time so.
Are there other dependencies that may need to be met that you can comment on?
If it helps, below are the current branches in the current build of the Venus OS I am using.
It is under current development and I can possibly ask for relevant updates to dependencies to be met
for as NRCHKB I am testing it and it is probably an important node for many users.
Many thanks
sources/bitbake: 1.44
sources/meta-openembedded: mans/zeus
sources/meta-qt4: zeus
sources/meta-qt5: master_venus
sources/meta-swupdate: rocko_venus
sources/openembedded-core: zeus
10 should be okay.
Can you update to 10.22.1+?
Or you have to stick to what you have?
Thanks for reply @Shaquu
I am part of the test community for Victron who maintain the Venus OS for this box.
I can't update it as it will break other dependencies, but I have asked the devs to update to a more recent version as soon as their devcycle permits and they have promised they will. Probably not in a distant future..
Meanwhile I am just trying to see if I can make it work with the current build.
If i can not, I will probably simply wait for new dependencies in the Venus OS unless there is something obvious I can fix myself
Many thanks.
Most helpful comment
Just wanted to leave a note to say thank you again, and also leave a hint to anyone searching for similar issues.
In short, it does work with these components:
NRCHKB node 0.9
Node-RED version: v1.0.5
Node.js version: v8.15.0
Linux 4.9.194-venus arm LE
It has a slightly odd caveat: Node red needs a restart for the NRCHKB node to work again,
after every change to a flow.
It makes editing time-consuming, but once compiled it appears to work 100%.
FWIW, YMMV. Many thanks again!