datech / node-red-contrib-amazon-echo

Alexa controlled Node-Red nodes supporting latest Amazon Echo devices. NO Alexa Skills required. NO cloud dependencies.
MIT License
140 stars 42 forks source link

Cannot Find Devices #104

Open Jefferson25625 opened 4 years ago

Jefferson25625 commented 4 years ago
SUMMARY

After Installing Node Red Table, i cannot find any device i created

ECHO DEVICES

Using the newest Version of ioBroker, NodeRed and node-red-contrib-amazon-echo

Tried all whats listened here https://github.com/datech/node-red-contrib-amazon-echo/issues/66

tried default port 80 and remapt port to 8080 from 80 over iptables nat rules

datech commented 4 years ago

@Jefferson25625 Do you have access to description.xml on port 80? Can you see the SSDP messages on debug listed in #66.

DerWossi commented 4 years ago

Since i updated to version 0.1.10 i got the same problem. I can't find new devices. The older ones are still working. My enviroment: Latest iobroker, js-controller 2.2.9 Node.js v10.19.0 NPM 6.13.4 embedded node-red 1.16.5 3 echo dot 3. gen 2 echo 2. gen

station7 commented 4 years ago

Downgrading node-red-contrib-amazon-echo to v0.1.9 fixed the issue and I was able to discover the new device: pi@nodered:~/.node-red/node_modules $ npm install node-red-contrib-amazon-echo@0.1.9

datech commented 4 years ago

@station7, can you help me to find what the problem is.

Can you try to remove the Amazon Hub Node and drag a new node from the palette, before upgrading again to v0.1.10

Or Disable / Enable the SSDP option after the upgrade.

station7 commented 4 years ago

datech, I am happy to help. How can disable/enable SSDP?

thebigpotatoe commented 4 years ago

@station7,

You made a typo in your command. Added an extra 0 to the version. it should be this;

pi@nodered:~/.node-red/node_modules $ npm install node-red-contrib-amazon-echo@0.1.9

station7 commented 4 years ago

@thebigpotatoe: Thanks, you are right. I edited my post to avoid further confusion

datech commented 4 years ago

@station7,

Device discovery on the Hub settings is responsible for SSDP

The idea is to try the following steps:

  1. Upgrade to 0.1.10
  2. Open Hub Node settings
  3. Disable "Device discovery"
  4. Enable "Device discovery"
  5. Add a new device
  6. Ask Alexa to search for new devices

Thanks

station7 commented 4 years ago

Enabling the checkbox "Device discovery" in the Hub Node settings did the trick and I was able to find a new device with the recent version v0.1.10. Sorry, if I missed it before.

Barabba11 commented 4 years ago

I have a question, may you please try this, when you discovered a device and after that you disable the discovery, will the device keep working fine? Even after a reboot? (Echo and raspberry, if you use that) Thank you a lot for this test

station7 commented 4 years ago

It all works fine, even after a reboot and with "Device discovery" disabled.

datech commented 4 years ago

Thanks @station7

@Jefferson25625 Can you confirm that the workaround above works for you too?

beppe2k commented 4 years ago

just to share my 6 hours troubleshooting session's result. I went through most of your suggestions and I actually learned a lot in the process.

I had another docker (zigbee2mqtt) running with --net=host.

If nodered started AFTER zigbee2mqtt it was not working; it was not receiving SSDP messages sent to 239.255.255.250.

If nodered runs by itself with no other docker and it's started when all other dockers are already off it WORKS

thanks for this product datech

didiht commented 4 years ago

@beppe2k Thanks for this hint! I was dangling with failing discovery for hours too, but after stop of other containers it works!

I tried with version 0.1.9. Now I will upgrade to 0.1.10

Also from my side: thanks for this product datech

didiht commented 4 years ago

In my environment it works after upgrade to 0.1.10

I did:

  1. Upgrade to 0.1.10
  2. Open Hub Node settings
  3. Enable "Device discovery"
  4. Ask Alexa to search for new devices
  5. Now I had double devices. After deletion and re-discover two times the device list was fine.
  6. Add a new device
  7. Ask Alexa to search for new devices
  8. New device is added to the Alexa device list

Thanks

sameersbn commented 4 years ago

@datech I have a sonos one which is not listed as a supported device. I have been trying to search for new devices using the Alexa mobile app without any success. Is it supposed to work with the Alexa app?

edit: My setup is Hassio on Rpi B+ (32 bit) with Node-red running in docker containers. Port 80 is free.

datech commented 4 years ago

@sameersbn I don't have any info if Philips Hue Bridge v1 is working with Sonos. If it does, probably this module should work too. Maybe debugging of SSDP will help you to check if both systems are communicating with each other at all.

sameersbn commented 4 years ago

thanks for the quick reply. but do you know if the device discovery can work with just the amazon alexa mobile app or is a compatible hardware required on the network. Excuse me if I sound dumb, I'm relatively new to this and trying to figure out things.

sameersbn commented 4 years ago

Maybe debugging of SSDP

Sure thing. I will do this as well.

yonz2 commented 4 years ago

Enabling the checkbox "Device discovery" in the Hub Node settings did the trick and I was able to find a new device with the recent version v0.1.10. Sorry, if I missed it before.

I ran into similar problems, this solved it, BUT It would be great to include this info in the description (Readme.md file).

I deleted (using the Alexa App) all old devices (created by the "emulated_hue" integration) enabled the "Device discovery" option, ask me Girlfriend Alexa to "discover devices", and every thing worked!

truresma commented 4 years ago

it's a pity no one here writes the answer...

  1. sudo iptables -t nat -L --line-numbers (if it doesn't say anything about 8083/your port, then it's clear that it doesn't work)
  2. sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
  3. sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8083
  4. For the Node-Red Adapter insert port 8083 at the "Amazon Echo Hub" node and click deploy in the upper right corner and it works or it finds the devices and it is green.
  5. Another time sudo iptables -t nat -L --line-numbers (see if it says 8083, if it does then it should work) Now the whole thing must be saved permanently if the device is restarted
  6. sudo apt-get install iptables-persistent
  7. sudo bash -c "iptables-save > /etc/iptables/rules" | or service iptables save | if the 1 does not work, in any case the problem is the saving

It does not work with most of them because it is not saved permanently and the port forwarding is gone again at the next restart. Therefore save the iptable or port forwarding at the end.


Ich finde es schade, dass keiner hier die Lösung schreibt...

  1. sudo iptables -t nat -L --line-numbers (wenn hier nichts von 8083/euren Port steht, dann ist es klar, dass es nicht geht)
  2. sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
  3. sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8083
  4. Bei dem Node-Red Adapter bei dem "Amazon Echo Hub" Node den Port 8083 einfügen und oben rechts deploy klicken und es funktioniert bzw. er findet nun die Geräte und es ist grün.
  5. Nochmal sudo iptables -t nat -L --line-numbers (gucken ob da nun 8083 steht, wenn ja dann sollte es gehen) Nun muss das Ganze noch dauerhaft gespeichert werden falls das Gerät neugestartet wird
  6. sudo apt-get install iptables-persistent
  7. sudo bash -c "iptables-save > /etc/iptables/rules" | oder service iptables save falls das 1 nicht gehen sollte, auf jeden Fall ist die Speicherung das Problem

Es geht bei den meisten nicht da es so nicht dauerhaft gespeichert wird und beim nächsten Neustart die Portweiterleitung wieder weg ist. Deshalb am Ende das iptable bzw. die Portweiterleitung speichern.

Chris-656 commented 3 years ago

Enabling the checkbox "Device discovery" in the Hub Node settings did the trick and I was able to find a new device with the recent version v0.1.10. Sorry, if I missed it before.

Where ist the check box Device recovery in the Hub Node I have 0.1.10 grafik

regards Chris

rolsch commented 10 months ago

Enabling the checkbox "Device discovery" in the Hub Node settings did the trick and I was able to find a new device with the recent version v0.1.10. Sorry, if I missed it before.

Where ist the check box Device recovery in the Hub Node I have 0.1.10 grafik

regards Chris

I have the same question...., can't find the option?

Avatarsia commented 8 months ago

I solved it that way, if you want to enable to search you connect function 1 with the amazon echo hub, if you dont search just delete the connection image the message of the inject is msg.server=msg.false the http request is a POST with the url 127.0.0.1 and the function 1 is msg.headers = { "Content-Type": "application/json" };

msg.payload = { "server": true };

return msg;