NEEOInc / neeo-sdk

NEEO Brain SDK
https://neeoinc.github.io/neeo-sdk/
MIT License
49 stars 17 forks source link

Starting with Node Docker image not working #65

Closed benzman81 closed 6 years ago

benzman81 commented 6 years ago

I get an error: ERROR! BRAIN_NOT_REACHABLE

I used the simple Accessory as sample.

Docker is started with:

docker run --name=neeo-http -d --restart=on-failure:3 --net=host -p 3000:3000 -p 6336:6336 -v /volume1/docker/neeo-http:/usr/src/app -w /usr/src/app node:8.9.4 node index.js --loglevel=debug

Is there anything special needed for communication?

benzman81 commented 6 years ago

Just to add: The discovery works and shows correct ip but right after that, the above error gets raised.

neophob commented 6 years ago

can you share a reproducible project?

benzman81 commented 6 years ago

I simply used the nee-sdk-examples/lib/simpleAccessory and started it with docker on my NAS. Didn't work. Today I tested using the IP and not the discovery and it works like a charm. Only with discovery it doesn't work with docker on my NAS. Maybe because it has two network interfaces (read something like this somewhere)?

neophob commented 6 years ago

can try applying this patch https://github.com/NEEOInc/neeo-sdk/pull/39?

benzman81 commented 6 years ago

nope, didn't help

neophob commented 6 years ago

well let me help you, please post the output with enabled debug, so instead docker ... node index.js ... use docker ... DEBUG="*" node index.js ... and past the complete output

benzman81 commented 6 years ago

Here is the output (without the patch). Look like it cannot resolve the hostname. I also tried the docker "--dns" option with my router as dns server, but it didn't change the output. Rename the file to html for best visibility.

neeo-http-2.txt

cro13 commented 6 years ago

This should work now. Please use the multiInterface functionality in the SDK.