Duplicated devices in Roku integration

I’ve tried about everything I can think of to rename a duplicated Roku device:

I have removed these devices from my Roku account. I have removed all devices from the Roku integration and restarted HA. I have named & renamed the devices within the Roku application. Each time I add these two devices, they’re both added with “Roku Kitchen” as the device ID. While I can identify and rename each entity ID correctly, they’re all listed under the same device ID and those can’t be renamed.

I’ve verified the IP addresses on the devices and within my router. Those names and IPs are consistent. Both MAC addresses are listed under a single Roku integration in HA.

Not sure how to proceed here.

Do you have 2 roku devices?

I have 5. I’ve added 4 successfully in the past, and they’ve been in use for a few years. I swapped two of the devices’ physical locations and renamed them within my router and within the Roku app. Those names are shown correctly everywhere except for HA. For the 5th… I’ve tried all manner of allowing network control over the device in the settings, but I can’t add it. I’m not too concerned with it until I get beyond this other issue.

The reason I swapped the Roku locations is because one wasn’t working, and so I removed it from my account and network for a month or so. Physically unplugged it. I got curious to see if I could get it working, and when I plugged it in it resumed working. So… I installed it in the location where I pulled its replacement from.

Currently, I have two working and showing up correctly. I added them today, after deleting all Roku devices. And when I play media on one of the “bad” ones shown in the screen shot, it displays correctly. The problem I’m having is these two sets of entities showing up under a single integration instance. Here’s where I am after deleting the two above:

Two working. Two that won’t configure with the correct names.

If you’re on the latest version, go take a look at the dhcp data (Settings → System → Network → DHCP Browser) that HA sees. That’s how it creates discovered devices. Secondly, you can always just manually add roku devices instead of going through discovery.

Thanks–the names, MACs, and IPs all jive with everything in my router:

Oddly, x.x.x.86 isn’t picked up by discovery, and I’m unable to add it manually. But again… that’s not what I’m trying to solve at the moment.

what about the ssdp data? Not sure exactly which info is used to make unique devices for that integration. However roku devices do supply ssdp. Also appears in zeroconf as well.

Here’s the error I get if I try to add one of the two bad actors manually:

I probably have to “ignore” them first. I’ll try that. However, this time I was able to add x.x.x.86 manually. Not sure what changed there.

Well… I’m not sure how to parse this. I have multiple records for a few of the devices that are working just fine, and I have multiple records for the ones that aren’t. Nothing is jumping out at me here:

Green is adding OK. Red are adding on top of each other.

Adding manually: had a glimmer of hope after ignoring the two auto-discovered devices and x.x.x.84 added OK. It auto-populated the wrong name, and I corrected it. Then I added x.x.x.82, corrected the name, and got this:

So… same problem, adding manually.

That’s telling you that it can’t use the same entity_id. Are the old entities lingering around in your system?

Not that I can find:

Keep in mind, I only get that message when adding the second of the two bad devices. The “duplicated” entity ID comes in with the first device, which I’m careful to name correctly.

Something somewhere in discovery is telling HA to use that name. That’s all I’m trying to help you find.

Right, understood. And I don’t know where it’s coming from. Before posting this question, I went through external to HA and made sure the names & IPs were all good. Then I cleared the Roku instances, restarted HA, and started from scratch. It keeps coming back with this conflicting name only for these two instances. The others work fine.

I used the nuclear option… I scrubbed those devices from my router and factory reset them. I picked one to set up first, put it back on the network and let the router assign a new IP address. Now it won’t connect:

I’m going to guess it’s for the same reason my 5th device wouldn’t connect earlier, which is to say… I don’t know why, and maybe it’ll come back sometime soon.

I was able to add one of the misbehaving devices back with a new IP address. It immediately added the correct MAC address and the MAC for the other, factory-reset, off-the-network device. I believe something is going on with the ASUS integration that is linking those two MAC addresses somehow. I can’t remove the old device from the router; it keeps coming back, despite the fact that the device is factory reset and doesn’t have any network connection details.

After some time, deleting the offline device from the router took hold. I took advantage of that and rebooted the router to make sure it stayed off the list. I then removed the ASUS router integration from HA, then reinstalled. The old offline Roku did not return. I’ve added one Roku back successfully and the 2nd MAC address isn’t anywhere to be seen. That’s the first step forward I’ve made on this.

Next, I’ll set up and add the last Roku to see if the integration instance is named correctly.

It’s been a couple of hours… and I’m still getting “failed to connect” on that last Roku device. I’ve tried a DHCP-assigned IP and a static IP. I’ve done a number on my device_trackers list coming from my router, and lots of those need to be recovered/renamed.