Jump to content

Clear old Mac Adresses


darkside40

Recommended Posts

darkside40

Could please anybody, with indepth knowledge of Emby, explain to me how i could clear out old or totally unknown Mac Adresses from Emby Mac Adress DB?

I am still trying to tackle down problems i have with the WOL funktion of the Android TV Emby App, althought i have seen that there is a beta Update which should solve the WOL Problem.

My problem is that when i use Swagger to get the WakeOnLanInfo i get this:

[
  {
    "MacAddress": "000000000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "000000000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "18C0XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "18C0XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "0242XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "5254XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "5254XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "1EAAXXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "36D6XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "7A69XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "6E86XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "06BBXXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "0A34XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "7E4DXXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "4A55XXXXXXXX",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "00000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "00000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "00000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  },
  {
    "MacAddress": "00000000",
    "BroadcastAddress": "255.255.255.255",
    "Port": 9
  }
]

The nulled Adresses make no sense, also most of the real MacAdresses dont.

So is there a way to purge these useless Adresses? Or even to set the correct one?

I know that there is no GUI Way to do it. So is there any config file etc?

Link to comment
Share on other sites

We don't store this information anywhere, so there's nothing to clear out. The server queries it dynamically when requested using .NET core api's. (or mono api's, if you're on a platform that we use the mono runtime with).

Our apps will send packets to all of them, so that's why you don't need to pick one specifically.

Link to comment
Share on other sites

I'm not sure why the system is reporting so many mac addresses (maybe virtual adapters of some sort) but the TV app is currently only sending to the first one.  This will be corrected in the next version.

Link to comment
Share on other sites

darkside40
2 hours ago, Luke said:

We don't store this information anywhere, so there's nothing to clear out. The server queries it dynamically when requested using .NET core api's. (or mono api's, if you're on a platform that we use the mono runtime with).

Our apps will send packets to all of them, so that's why you don't need to pick one specifically.

Thanks for making this clear. My Emby is running inside a Docker container. So maybe that could be the reason why there are some weird empty Mac addresses, but it does not explain the old Mac Adresses which arent use for a couple of years. Maybe someone should have a look at the Code for that WOL Part, at least nulled Mac addresses could be easily filtered.

I have already suggested that it should be possible for the Emby Server Admin to manually set the Mac address of the easy or to leave it automatic. I think that should be a fairly easy code change and would solve some problems.

2 hours ago, ebr said:

I'm not sure why the system is reporting so many mac addresses (maybe virtual adapters of some sort) but the TV app is currently only sending to the first one.  This will be corrected in the next version.

Thanks, i hope that will solve the problem the Android TV App already has such a long time.

Link to comment
Share on other sites

darkside40

You should really rethink how you handle Mac addresses used for WOL in Emby. If there are old Mac addresses involved this could get uncool for people reusing old hardware and wonder themselfs why that stuff is keep waking up because the Emby client send WOL to old addresses.

Your solution for this problem is easy (simply send out to all addresses we know) but not very streamlined. I like the idea that the client get the mac addresses  from the server, but it should be configureable by the admin.

Link to comment
Share on other sites

Painkiller8818

If Emby is not storing this informations, it must be the ARP table of the local device.

Maybe you can flush the ARP table for the device

Link to comment
Share on other sites

Painkiller8818
1 minute ago, darkside40 said:

Are you talking about the Client or the Server?

Must be the device where you use swagger

Link to comment
Share on other sites

darkside40

So flushed the Arp Cache on the Server Emby is running on, result stays the same.

i dont know why i should flush it on a client device, according to @Luke the client gets the List from the Emby Server.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...