Coder Social home page Coder Social logo

Comments (23)

datech avatar datech commented on August 14, 2024

Hello,

Can you confirm the following:

  • you can access http://:80/api/1028d66426293e821ecfd9ef1a0731df/lights
  • Echo device and Node-Red machine are connected to one and the same network
  • if docker container is used to run the Node-Red, it is configured to use host network. Otherwise, Amazon Echo Hub node will not be discovered
  • the multicast traffic is not filtered

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Hi datech,

thanks for your response!

Here the results:
grafik

  • URL is accessible.

  • All devices are within the same VLAN and subnet

  • No Docker is in place

  • as there is no firewall in place (it is disabled and service does not run) I have no idea what should block any multicast traffic.

Further information:

  • Node-Red runs on a virtual machine on VMware ESXi 6.7, which is connected to a trunk port on a L3-switch. Any other service running on this particular machine is fully accessible from my network. No routing is (because of the trunking) in place.

  • Similar services like the node-red wemo emulator are working fine.

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Looks like the SSDP multicast traffic is not routed to the virtual machine.

I’ve just found this:
Enable Multicast Snooping on a vSphere Distributed Switch
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.networking.doc/GUID-50AF72D4-F766-4D68-8330-BA15250E4E99.html

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

This only applies to Virtual distributed switches using a vSphere vCenter (I don't use vCenter). I already checked this.
The vSwitch (not distributed) i use has no multicast filtering enabled.

Nevertheless thank you :)! Do you have any other ideas?

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

What about the working node-red Wemo emulator - isn't it using SSDP as well? Only for diagnosis of the problem.

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

I see, just ESX without vCenter.

Yep, Wemo emulator is using SSDP.

You may try to sniff the SSDP traffic. It has to be:

Src: <ECHO DEVICE IP>, Dst: 239.255.255.250, Protocol: SSDP
Src: <NODE-RED IP>, Dst: <ECHO DEVICE IP>, Protocol: UDP
Src: <ECHO DEVICE IP>, Dst: <NODE-RED IP>, Protocol: HTTP,  GET /description.xml

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Okay I will install wireshark in a few minutes.

But I think this may be the wrong direction because SSDP works with the wemo.

I'll reply in a few minutes

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

I did various sniffs - Alexa sends various SSDP packages, but my server does not reply.
Just to be sure i deployed a Wemo node on the same server - now it answers visbly in wireshark, but only for the wemo.

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

I'm using "peer-ssdp" module to implement the discovery procedure. The library is responding with packages which are not recognize as SSDP by Wireshark. So, if you use Wireshark the packages will be marked just as UDP.
Wemo emulator is using "node-ssdp" module and it seems that it is responding with correct SSDP packages.

Anyway, can you try to sniff the traffic on the Node-Red machine with tcpdump:

sudo tcpdump -i <your-network-interface> udp and dst <echo-device-ip> -vv -X

The package we are looking for is similar to this one:

.....:.P./..HTTP
/1.1.200.OK..HOS
T:.239.255.255.2
50:1900..CACHE-C
ONTROL:.max-age=
100..EXT:...LOCA
TION:.http://XXX
.XXX.XXX.XXX:80/d
escription.xml..
SERVER:.Linux/3.
14.0.UPnP/1.0.Ip
Bridge/1.17.0..S
T:.urn:schemas-u
pnp-org:device:b
asic:1..USN:.uui
d:00112233-4455-
6677-8899-..DATE
:.Sun,.27.Jan.20
19.00:12:44.GMT.

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Can you check if the new version (v0.1.5), that is using node-ssdp, will fix the issue?

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Good morning,

I can report some success. Now I can see ssdp traffic after starting a new discovery with the new version:
grafik

Unfortunately Alexa does not show any new devices :-/
I opened the URL stated in the trace:
grafik

Is there anything wrong?

I took the trace on a tablet in the same WiFi at the same access point where one of my Echo devices resides.

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Good morning,

Do you see any HTTP traffic from Echo to Node-Red? Echo device will try to open this URL and it has to be recored by Wireshark.

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Nope, no http traffic

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Just to be sure I initiated a full reboot of the whole infrastructure here at my place... Maybe it is just a faulting network stack of any device...
If there is still no success, I will deploy a VM on the same vSwitch as my node-red instance and sniff the traffic from there. But I have to do this later :D

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Still no http traffic after full restart

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Update: the fifth discovery was successful. I actually don't know what changed in this time, but now It works

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

I think that you don't see the HTTP packages, because the traffic is not routed through the Wireshark machine. You can see the SSDP packages as they are multicast and will be received by all network hosts.

Can you confirm that, now you can turn on/off the devices? Some users reported that they cannot set the color mode with Echo Dot 2nd gen. Is it working on your setup?

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Yes everything is turning off an on with dimming like a charm!

Of course you have to translate On and off commonly to true / false in the payload or use the msg.on msg.bri properties of the object by creating a new object with the respective payload.

Thank you datech! You helped me a lot :)

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

Furthermore I cannot test the color of the light because I don't have the right bulbs for this...

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

I’m glad that it is working now.

Light devices are simulated, so the color mode have to be available in the Alexa app. Here is how it is looking on my setup with Echo Dot 3rd gen:

node-red amazon echo alexa

from node-red-contrib-amazon-echo.

nike12354 avatar nike12354 commented on August 14, 2024

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Thanks, I will close it.

from node-red-contrib-amazon-echo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.