Simple DHCP Server client list?

Hi all experts,

just have a question around using the simple DHCP server in hassio, is it possible to display a list of DHCP clients within the Hassio UI? I have got 4 ap/routers at home, but the problem is most of them only allow 20-30 static ip assignment, so bascially what I have done is turned off all the DHCP on my routers then just use the simple DCHP hassio running on my raspberry pie to assign ip out and keep all my static ip there. but I can’t figure out where/how to display the currently leased ip or connected devices.

cheers,

thanks in advance :slight_smile:

1 Like

same doubt here any lucky?

1 Like

Following as I have the same request

1 Like

Same issue here, I have no idea - I tried to access the /data/dhcpd.lease from the terminal in the web interface but visibly this is not the right OS level access, as I don’t see this file at all. Without a client list the DHCP server is kindda useless…

I will reply to myself here as I managed to find the answer, albeit a tricky one.
You need to have terminal addon enabled in Home Assistant and running not in protected mode (change the option of the addon and restart it if needed)
Then you need to access the file through the docker command line, like this:
docker exec -it addon_core_dhcp_server more /data/dhcpd.lease
Be really careful with those commands as you can do a lot of damage
You can also copy the current lease file to your config directory for reading there more comfortably:
docker cp addon_core_dhcp_server:/data/ /config/

Voila!

1 Like

Thought I’d explain the command to anyone trying to figure it out…

So dhcpd runs in a docker container. So to interact with it’s environment you need to use docker.

docker exec : says ‘hey I want to run this command’
-it : says “run it in interactive mode rather than in the background and give it a terminal to interact with”
addon_core_dhcp_server : tells docker which container you want to play with (aka the dhcp server)
more /data/dhcpd.lease : is the command you want to run

If you were to swap out the more command with bash instead you’d be granted a terminal running inside the docker container

Hi,

So I was looking into using this addon but as others have said, without seeing a client list it would be useless. I followed Laurenthu’s instruction above but I was unable to make the terminal/ssh addon run “not in protected mode” as i couldn’t find the option.
Therefore I didn’t have the correct permissions to execute the docker commands.

However following these instructions Debugging the Home Assistant Operating System | Home Assistant Developer Docs (home-assistant.io), I managed to ssh into HA with the correct permissions.
So now the docker commands Laurenthu used in his post above, work and I can see the dhcp client list, although I am underwhelmed by the format.

Hi,
you may want to checkout my addon here: DHCP server addon with Web UI

I developed that exactly to allow me to easily visualize and filter DHCP clients!