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

DHCP feature - client and/or relay + server #321

Open
TV456 opened this issue Nov 5, 2023 · 4 comments
Open

DHCP feature - client and/or relay + server #321

TV456 opened this issue Nov 5, 2023 · 4 comments
Labels
enhancement New feature or request planned To be implemented in future release

Comments

@TV456
Copy link

TV456 commented Nov 5, 2023

Is your feature request related to a problem?

It would be awesome to have a feature where you can integrate the dhcp values like client, relay and/or server. In my case I would really like to read the dhcp client values and let them show up in HA. It is helpfull to get this information when you have a dynamic dns from your ISP. There has been a earlier feature request.

Desired solution

Not all users need this information, because it depends on their set up. I would love to see an extra option in the configuration to select. In this case the option (i.e.) 'DHCP client list' which returns the various interface, IP-address, lease and status values.

While tinkering with setting up other sensors for my system health, I found that the script/api already retrieves the ip/dhcp/client values. I have tried to alter the code to set it up like I described above, but unfortunately I lack the coding skills to get it up and running. (I am breaking the configuration options and with that the api request for all 'extra' values.)

Alternatives

There is also the possibility to retrieve the desired values from the IP Address list, which I used in my reply on the earlier feature request I have replied how to create and environmental variable and a script to update it. This works but it would be a very nice feature to have 'out-of-the-box'.

@TV456 TV456 added the enhancement New feature or request label Nov 5, 2023
@tomaae
Copy link
Owner

tomaae commented Nov 5, 2023

I'm not sure I understand. can you show me which value(s) you need in mikrotik?

@tomaae tomaae added the more info needed Need more information label Nov 5, 2023
@TV456
Copy link
Author

TV456 commented Nov 5, 2023

To explain I have made some screen shots and some mockup's.

In RouterOS Winbox, I need the value(s) of the /ip/dhcp-client/ table. Especially the IP Address corresponding to the Interface, marked with the red oval:

RouterOS-DHCP-Client

I attempted to set up an extra option in the options for the configuration (2/2), also marked with the red oval in the mockup:

RouterOS - HA - configuration screen

Then it would be great to see the dhcp clients as devices in HomeAssistant, something like the next mockup:

RouterOS - HA - device

And with i.e. the following attributes of the device (escpecially the IP-Address and the Status), like the following mockup:
RouterOS - HA - Device - Attributes

@tomaae
Copy link
Owner

tomaae commented Nov 5, 2023

I see, so adding ip and interface to clients where possible.
Should be doable.
IP and mac is actually available on traffic sensors for clients already.

@tomaae tomaae added planned To be implemented in future release and removed more info needed Need more information labels Nov 5, 2023
@TV456
Copy link
Author

TV456 commented Nov 6, 2023

The MAC-addresses are indeed already available, but the IP-addresses are only available when internally given (from the dhcp-server), when a port or bond is a dhcp-client, the IP-address shows up as none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned To be implemented in future release
Projects
None yet
Development

No branches or pull requests

2 participants