travisghansen / hass-opnsense

OPNsense integration with Home Assistant
209 stars 28 forks source link

[FR]: DHCP Stats #167

Open knom opened 2 weeks ago

knom commented 2 weeks ago

Hey, I would love to have dhcp stats as sensors.. similar to what is happening with OpenVPN.

E.g. number of total DHCP leases and such..

I started to take a look at the source code and saw that actually some dhcp things are in the source code, but commented out..

What's the story there?

And what do I need to do to bring them back?

thx, knom

mt98987987 commented 1 week ago

Second for this. I would love to be able to show current DHCP leases.

Snuffy2 commented 1 week ago

Yes, this can likely be done.

I don't know what it used to look like, but what would you like to see?

knom commented 1 week ago

that's great news!!

for sure the count of active leases

and ideally the leases with time, Mac & IP Adress & hostname

I just wonder, how is this different than the presence tracker though..

thanks!

Snuffy2 commented 1 week ago

Right but that is a lot of data.

alexdelprete commented 1 week ago

an active leases sensor, with all data in attributes, otherwise it gets confusing...

a reservations sensor (static leases) would also be useful.

knom commented 4 days ago

Agreed! Ideally: The sensor returns the count and has all the details as an array in the attributes.