Open locke4 opened 4 years ago
Seems it's a common issue for whom running NR with root permissions. NR stuff recommend to install without root
Just updating, I've nuked and reinstalled Node-red, NodeJS and NPM all without installing under root permissions.
I'm now running node-red without root permissions, which as expected doesn't allow it to bind to port 80. I haven't yet bound port 80 to the app directly, but running node-red with sudo (as before) doesn't change anything.
please follow what they clearly reccomend, do not run node red with sudo and do not install it as root, in both cases I suppose it uses different path. Simply start node red with the line node-red-start. I hope you didn't install modules when you run node red with sudo, in that case if it still not working I recomend you to nuke again. Do the nat of port 80 as we did too
Just confirming, I have not run node-red with sudo and I have not installed it as root. I also have not installed any packages through node red, all of them managed through npm. I will try the NAT of port 80 later today
You need the NAT on port 80, else it will not work. Without root you can't open a port lower than 1024, and you need 80.
Same issue using docker with node setcap to use port 80 with nodered user and macvlan to use own IP
UPDATE: Ok I found the problem and it is realated to a malfunctioning switch with a bad IGMP Snooping implementation, that causes deny unicast/multicast from Wifi Acces Point ethernet port I disabled IGMP Snopping from the switch and Alexa can found my devices. Thanks!
Dockerfile
FROM nodered/node-red:latest USER root RUN setcap 'cap_net_bind_service=+ep' $(eval readlink -f
which node
) USER node-red COPY package.json . RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
Run fixed nodered
docker build . -t juampe/node-red
docker run --init -d --restart=always --network=macvlannet --ip 192.168.0.129 --dns 192.168.0.1 --hostname="nodered" --name="nodered" -v /opt/docker/nodered/data:/data -e NODE_RED_ENABLE_SAFE_MODE=false -e DEBUG="node-ssdp:*" juampe/node-red:latest
From other host in the same net SSPD seems to respond to multicast (upnp UDP 1900)
gssdp-discover -i br0 --timeout=5
resource available
USN: uuid:00112233-4455-6677-8899-cd272225bd01a8::upnp:rootdevice
Location: http://192.168.0.129:80/description.xml
resource available
USN: uuid:00112233-4455-6677-8899-cd272225bd01a8::urn:schemas-upnp-org:device:basic:1
Location: http://192.168.0.129:80/description.xml
resource available
USN: uuid:00112233-4455-6677-8899-cd272225bd01a8
Location: http://192.168.0.129:80/description.xml
"Alexa please search new devices" seems not work to find the hub
Glad you solved this tricky problem, @datech it would be useful I guess to put this solution on troubleshooter too
Were you able to discover node red devices without an Echo device, just using the Alexa Android app?
My situation is very similar to yours, I can open description.xml successfully, but Alexa app doesn't find any devices. I'm not sure if not having any Echo devices in my network could by the root problem.
Same issue using docker with node setcap to use port 80 with nodered user and macvlan to use own IP
UPDATE: Ok I found the problem and it is realated to a malfunctioning switch with a bad IGMP Snooping implementation, that causes deny unicast/multicast from Wifi Acces Point ethernet port I disabled IGMP Snopping from the switch and Alexa can found my devices. Thanks!
Thank you for this, it may have been my issue too.
I have NR setup in Docker with its own IP address, listening on port 80. Occasionally the Echo Dot would pickup new devices but it was unreliable so I never got past the testing phase. The first 'discover devices' after completely disabling IGMP snooping on my switch and several new devices were found (some from my existing ZigBee gateway).
Summary:
After adding the npm package node-red-contrib-amazon-echo, and following the setup instructions, as well as going through the applicable troubleshooting on the Wiki, I'm still unable to discover the hub. I'm able to access 192.168.0.21:80/api/description.xml, which is the server I am running node-red on. The description.xml returns the device name that is in my flow.
Devices:
Node-Red debug logging
Description.xml:
Node-Red flow
[{"id":"d7ef8621.922dc8","type":"tab","label":"Send NRF24L01","disabled":false,"info":"Send data to NRF24L01 topic"},{"id":"cbcade4e.b0b5f","type":"mqtt out","z":"d7ef8621.922dc8","name":"","topic":"","qos":"","retain":"","broker":"909c3b6c.3fc918","x":710,"y":200,"wires":[]},{"id":"787ec2b0.536c9c","type":"inject","z":"d7ef8621.922dc8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":0.1,"topic":"nrf24l01/bedroomlight","payload":"off","payloadType":"str","x":390,"y":200,"wires":[[]]},{"id":"fc017a21.0ebc58","type":"inject","z":"d7ef8621.922dc8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"20","topic":"nrf24l01/bedroomlight","payload":"on","payloadType":"str","x":320,"y":260,"wires":[[]]},{"id":"a4446a01.a73198","type":"debug","z":"d7ef8621.922dc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":830,"y":340,"wires":[]},{"id":"6bc8ba79.f212b4","type":"mqtt in","z":"d7ef8621.922dc8","name":"","topic":"nrf24l01/bedroomlight","qos":"2","datatype":"auto","broker":"909c3b6c.3fc918","x":580,"y":340,"wires":[["a4446a01.a73198"]]},{"id":"60be5a84.49c344","type":"amazon-echo-hub","z":"d7ef8621.922dc8","port":"80","processinput":0,"discovery":true,"x":250,"y":100,"wires":[["4a9011f9.b8e65"]]},{"id":"4a9011f9.b8e65","type":"amazon-echo-device","z":"d7ef8621.922dc8","name":"Bedroom Light","topic":"nrf24l01/bedroomlight","x":490,"y":80,"wires":[["cbcade4e.b0b5f"]]},{"id":"909c3b6c.3fc918","type":"mqtt-broker","z":"","name":"","broker":"192.168.0.19","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Is there anything I've missed? I've gone through many of the issues with these and unfortunately I have struggled to find one that matches my exact setup. I'm running node-red as root, and am able to access the description.xml from all devices on my network (mobile phone running Alexa app, my PC, etc.). I can run Wireshark on my network but I wasn't able to identify the filters to show only Alexa App related traffic.
Any advice would be greatly appreciated!