Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate devices in Alexa since 5.0.0 #806

Closed
mol7os opened this issue Nov 24, 2017 · 45 comments
Closed

Duplicate devices in Alexa since 5.0.0 #806

mol7os opened this issue Nov 24, 2017 · 45 comments
Labels

Comments

@mol7os
Copy link

mol7os commented Nov 24, 2017

Hi,

in Alexa I can find now duplicates of devices.

Every Device will also listed as "Royal Phillips Electronics intelligent device" and as "dimmable light".

If I activate the flag "inactive" to hide actions/scenes (devices) in HA-Bridge the "dimmable light" device will be marked as offline in Alexa (or not discovered in scan). The Royal Phillips doesnt care.

Didn´t find any option to stop this behavior.

@mol7os mol7os closed this as completed Nov 25, 2017
@mol7os mol7os reopened this Nov 25, 2017
@mol7os
Copy link
Author

mol7os commented Nov 25, 2017

Getting carzy ... the Royal Phillips devices must come from HA-Brigde.
I renamed some devices to be sure. And they will be listed in Alexa.

It doesnt matter:

  • ... if i switch back to 4.5.6 Version
  • ... set inactive to devices
  • ... shut down HA-Bridge

Alexa discover this devices also when HA-Bridge is stopped ...
It feels like Echo2 discovers different to Echo1/Dot. Removing "Royal" Devices by hand and change port 80 of HA-Bridge to 8081 (only Dot can discover at moment) the "Royal" Devices will not be discoverd.

Switching back to Port 80 cause a complete discovery of HA-Bridge devices as "Royal" including the inactive ones.

@bwssytems
Copy link
Owner

You will need to forget the devices that are from the U.S.-bridge and then rediscover them.

@mol7os
Copy link
Author

mol7os commented Nov 25, 2017

Thanks for your quick response.

It sounds like "Royal Phillips Electronics intelligent device" are the U.S.-bridge devices (rights).
How should I "forget this devices" when discovered again and again.
Is there any special option I need to enable, or do i need to ignore the doubled devices?

@bwssytems
Copy link
Owner

Sorry, some how the U.S.-bridge was supposed to mean you r ha-bridge.

So, go into the echo control panel for your smart devices and forget them all and do a rediscover.

@bwssytems
Copy link
Owner

Any other info on this?

@mol7os
Copy link
Author

mol7os commented Dec 6, 2017

Not really.

The old Echo and Echo Dot discovers the expected and configured devices from HABridge.
The new Echo2 discovers every device (it does not matter if flagged as inactive) as "Royal Phillips Electronics intelligent device".

Option "Forget All", or "Forget item" doesn´t help.

Everything is working - but with many devices in HABridge you have a mass in Alexa which is confusing.

@bwssytems
Copy link
Owner

Unfortunate;y, there is some configuration in your environment that is causing this. Multiple interfaces exposing the api or muleiple ha-bridges running.

@mol7os
Copy link
Author

mol7os commented Dec 7, 2017

Running on Raspberry PI 3 Debian stretch. Only one interface.
For me it looks like something with UPNP ...
But i didn´t had this bahavior with Version 4 and no ECHO 2.

@bwssytems
Copy link
Owner

This may be an issue with some redirect code that was in the ha-bridge. The next version changes that and that it may help with this issue....

@bwssytems
Copy link
Owner

Please try the new release 5.1.0 https://github.com/bwssytems/ha-bridge/releases/tag/v5.1.0

@bwssytems
Copy link
Owner

Any update on this after trying 5.1.0?

@mol7os
Copy link
Author

mol7os commented Dec 19, 2017

No chance to check before weekend. But I will try 5.1.0 soon as possible and provide a feedback.

@mol7os
Copy link
Author

mol7os commented Dec 22, 2017

Looks ok for me now. Every Bridge Device listed only one times.

@mol7os mol7os closed this as completed Dec 22, 2017
@mol7os mol7os reopened this Dec 22, 2017
@mol7os
Copy link
Author

mol7os commented Dec 22, 2017

Sorry to fast,
in first scan ist seems to be ok.
But no i checked again in Alexa Web and its still the same behavoir.

image

image

Additonal i have some devices listed which are not up to date and in my opinion already removed past weeks. I cannot find this device in my HABridge. But its discovered by Alexa.

Example:
image

Absolutly no idea. I have only one HA-Bridge running now on Vers. 5.1.0

@bwssytems
Copy link
Owner

@mol7os Do you have a real hue hub as well?

@mol7os
Copy link
Author

mol7os commented Dec 22, 2017

Yes i have a hue bridge 2.0.

@bwssytems
Copy link
Owner

bwssytems commented Dec 24, 2017

So you are exposing your Philips lights with the ha-bridge, you need to use one or the other for those devices, I would leave the hue lights on the hue hub only.

@Nomar383
Copy link

I'm having the same issue on 5.1 and 4.5.6. In the docker container or in a Ubuntu VM. Duplicate Royal devices all of the sudden.

I do not have a physical hue bridge and I have only one instance of habridge running.

@bwssytems
Copy link
Owner

@Nomar383 Then it will be network setup with docker.

@mol7os
Copy link
Author

mol7os commented Dec 26, 2017

I dont think so.
Everything was fine till i added a "new Echo" into my environment.

With old Dot & Echo the devices were listed as expected. If i switch back to a special port (ex. 8081) everything is fine. In this case only the old Echo Dot is able to discover.

There is something wrong/changed in the discovery with new Echo Devices.
For me it feels like the HA.Bridge provides some old cached data. There must be an issue in exchanging device information with the new 2017 Alexa devices.

@Nomar383
Copy link

Nomar383 commented Dec 26, 2017 via email

@bwssytems
Copy link
Owner

@mol7os Are you using docker?

@mol7os
Copy link
Author

mol7os commented Jan 5, 2018

No, my current setup runs on a debian stretch.

But I had a installation running well in docker under 4.5.6 without new Echo devices. (port 8081)
I switched to a dedicated Raspberry before adding Echo 2 in my environment.

Echo2, Echo Spot, Echo Plus does something different discover devices as the old once ....

@audiofreak9
Copy link
Collaborator

@bwssytems

FWIW, I too am experiencing the duplicate devices, since adding an Echo Spot. I have: an Echo Gen 1, 3 Dots (mixed gens), an Echo Show and an Echo Spot. However here is what I am noticing, all Echos but the Spot discover and configure the ha-bridge devices as "Dimmable Light", the Spot discovers and configures the devices as "Royal Philips Electronics smart device" all else being the same.

@bwssytems
Copy link
Owner

Interesting, so Amazon has different characteristics for different device firmware. So, that will not be fixable by the ha-bridge. But, since there are 2 devices looking for the ha-bridge, you could use the ip address filter for the devices and then it would only respond to one of them.

@audiofreak9
Copy link
Collaborator

Just after posting above, I went to the Alexa Webpage and Forgot all the "Dimmable Light" devices. I did discovery with all my Echos, the app and the webpage one at a time. The duplicates have not returned. At this point all devices are listed as "Royal Philips Electronics smart device". I know there was a software update for the Alexa app and webpage yesterday. Maybe there was a device software update too? i don't track the software version numbers for date of change to know.

@dpullen-fml
Copy link

I have seen the same problem. My duplicates started when I added Echo Dots (2nd Gen). The Echo Show and Echo (2nd Gen) appeared to produce devices listed as "Royal Philips Electronics smart device". The Echo Dots introduced the "Dimmable Light". I have tried forgetting the devices (each type) and forgetting "all" but they all return. The Dots have sw 597465220. The Echo is 595530420 and the Show is 597464020.

@kandlg
Copy link

kandlg commented Feb 26, 2018

I was having this issue consistently and noticed the earlier posts about different Amazon devices. I have a Show, Tap, Original Echo, 2nd gen Echo, original Dot, 2nd gen Dots. I removed the original dot from service about a week ago and haven't had the issue since.

@bwssytems
Copy link
Owner

So, has this still been happening?

@kandlg
Copy link

kandlg commented Mar 9, 2018

It happened once during the last echo firmware update, but other than that no.

@heikoh81
Copy link

Still happening here with 1x Echo Show, 2x Echo 2017 and 2x Echo dot 2017.
1 HA Bridge running on port 80 on Raspi 2, Lan, static IP.
No original Philips Hue in the House.

@bwssytems
Copy link
Owner

Yep, different Alexa systems report different source names for a hue. Since they all do discoveries you will get two....

@heikoh81
Copy link

Shouldn't the different Echos cooperate?
They are all in the same prime account, in the same LAN...

@bwssytems
Copy link
Owner

That would be a good question for Amazon....

@kandlg
Copy link

kandlg commented May 1, 2018

Have you identified which Alexa systems report different source names? It would be helpful if you could post that in an FAQ since it is a recurring issue. I have a Show, Tap, Original Echo, 2nd gen Echo, original Dot, 2nd gen Dots (~2016 when they first came out). Taking the original Dot offline seems to have fixed my duplication issues, so that one would seem to be different. I find it interesting that current mix of devices are all consistent, despite being mixed generations. Heikoh81's experience suggests maybe a 2017 dot is different?

Further info, I have a hue bridge on a rasp version 3 and a real hue.

@mol7os
Copy link
Author

mol7os commented Jun 21, 2018

I can confirm that the problem is still there and it's annoying.
Among other things I already have:

IPtables excured my HUE Bridge
IPtabels 2 Echo Dot 1st generation UDP prohibited (should prevent discovery)
On the PI all interfaces deactivated and only eth0 with fixed IP

and so on, finally nothing solved the issue.... its really annoying.

I have no double devices with Hue Bridge or other bridges .... so no glue where the HA-Bridge devices get discoverd different. :(

@heikoh81
Copy link

@mol7os

IPtabels 2 Echo Dot 1st generation UDP prohibited (should prevent discovery)

Could you please give me the iptables command to block a certain echo from access to my HA Bridge?

I have 3 Echo Dots, 1 Echo Show, 2 Echos (2017), and my impression is that finding devices from HA Bridge is much more reliable if the 2 Echos (2017) are unplugged from power.

Maybe Echo Dots are better at finding devices from HA Bridge?
I noticed this: If I plugin the 2 Echo (2017) and start searching for new devices from the Alexa app or alexa.amazon.com, I see the blue ring on both Echos (2017), so obviously Amazon seems to prefer the Echos (2017) for discovery, although with HA Bridge they are probably less suitable?

Thanks, Heiko

@mol7os
Copy link
Author

mol7os commented Jul 17, 2018

Hi,

/etc/iptables/rules.v4

:INPUT ACCEPT [392:47811]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [290:56603]
-A INPUT -m iprange --src-range 10.0.0.243-10.0.0.250 -p udp -j DROP /
-A INPUT -m iprange --src-range 10.0.0.243-10.0.0.250 -p tcp --dport 80 -j ACCEPT
-A INPUT -m iprange --src-range 10.0.0.243-10.0.0.250 -p tcp -j DROP
-A INPUT -s 10.0.0.24/32 -j DROP
COMMIT

All Echo and UPNP devices will have fix IPs to limit communication to HA-Bridge.
I have some more rules as shown in example. Many devices cache UPNP information and it feels like some of them have bad TTLs. (I excluded for example every FireTV, QNAP, HueBridge .... in communication to HAB).

My Echo Dot1 devices discover HA-Bridge (IPs 10.0.0.240-242), Echo2 cannot discover (10.0.0.243-250 cause of iptables), in Example you find additional .24 which is my HueBridge.

This fixed my communication with Alexa Service and prevent stupid doubled discovery for me.

@heikoh81
Copy link

Thank you for the rules. I'm not that familiar with iptables, so this helps a lot.

Is it correct that I have to add these rules to the Raspberry running HABridge?

Do I need these lines for Alexa, also, or are they for other use in your scenario?

:INPUT ACCEPT [392:47811]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [290:56603]
-A INPUT -s 10.0.0.24/32 -j DROP

Do I need the COMMIT line?

I have "static" IPs assigned to my Echos by isc-dhcp-server, however, they are not in a range.
How would I have to modify the lines to block a certain IP? (I would then copy these for each unwanted Echo).

Heiko

@mol7os
Copy link
Author

mol7os commented Jul 17, 2018

There is already a file on your HA-Bridge Rasperry (or docker, whatever).
Only add your lines. (-A INPUT ....)
The commit line stands at the end. The order (lines) presents the priority .
First hit wins:
Example:
-A INPUT -m iprange --src-range 10.0.0.243-10.0.0.250 -p tcp --dport 80 -j ACCEPT
-A INPUT -m iprange --src-range 10.0.0.243-10.0.0.250 -p tcp -j DROP

ALL TCP will be DROPED after Port 80 TCP is ACCEPTED.
Each hit interrupts further processing - so be careful about your rule order.

@heikoh81
Copy link

heikoh81 commented Jul 18, 2018

So, for my two echos with IPs .240 and .245, are the following lines correct and the only lines I Need to add?

-A INPUT -m iprange --src-range 192.168.178.240 -p tcp --dport 80 -j ACCEPT
-A INPUT -m iprange --src-range 192.168.178.240 -p tcp -j DROP
-A INPUT -m iprange --src-range 192.168.178.250 -p tcp --dport 80 -j ACCEPT
-A INPUT -m iprange --src-range 192.168.178.250 -p tcp -j DROP

@mol7os
Copy link
Author

mol7os commented Jul 18, 2018

  1. --src range stands for IP Range FROM -> TO example: 10.0.0.243-10.0.0.250

  2. If you want to allow only HTTP which is needed to trigger commands from .240 & .250

-A INPUT -s 192.168.178.240/32 -p tcp --dport 80 -j ACCEPT
-A INPUT -s 192.168.178.240/32 -p tcp -j DROP
-A INPUT -s 192.168.178.250/32 -p tcp --dport 80 -j ACCEPT
-A INPUT -s 192.168.178.250/32 -p tcp -j DROP

In my case the discovery is only handled by 2 old Echo Dot 1. If .240 & .250 should not discovery devices from HA-Bridge that add following lines for UDP which is used for UPNP discovery.

-A INPUT -s 192.168.178.240/32 -p udp -j DROP
-A INPUT -s 192.168.178.250/32 -p udp -j DROP

@popy2k14
Copy link

Hey guys, i also have this issue with the duplicate devices.

I have the following echo devices:
3x Echo 1st Generation (192.168.0.230 and up)
2x echo dot 2nd Generation (192.168.0.240 and up)
2x echo show 5 (192.168.0.240 and up)

Which one of those should ill let the discovery do and which to block?

I am running ha-bridge on raspbian buster and sadly there is no iptables.
There is the replacement nftables.

Any guide how to set it up?
(already googled, but hell the nftables is complicated for a noob like me :-)

Hope you can help me.
thx

@popy2k14
Copy link

popy2k14 commented Jul 22, 2020

See here for a solution/workaround: #1216 (comment)

1 similar comment
@popy2k14
Copy link

popy2k14 commented Jul 23, 2020

See here for a solution/workaround: #1216 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants