Integrating Mikrotik DHCP Table into Lovelace: A Smooth Experience

Hey everyone! I wanted to share my recent experience integrating my Mikrotik router’s DHCP table into Lovelace. It’s been a game-changer for managing my network devices!

The Challenge: I have a variety of devices connected to my LAN—raspberry pis, shellies, sonoffs, and more. Keeping track of their IPs was a hassle, especially when troubleshooting. Every time I needed an IP, I’d have to log into my Mikrotik router, which was time-consuming.

The Solution: I stumbled upon a way to fetch the DHCP leases directly from Mikrotik and display them in Lovelace. It wasn’t straightforward, but with some research and tinkering, I got it working!

The Process: I used a combination of MQTT and a custom Lovelace card. Mikrotik’s API provides the DHCP data, which I then publish to MQTT. From there, Lovelace pulls the data and displays it neatly. It’s now a breeze to see all my devices and their IPs in one place.

The Outcome: This integration has saved me so much time. No more juggling between apps or manually checking IPs. It’s all right there in my dashboard. Plus, it’s given me a clearer picture of my network usage.

Tips for Others: If you’re looking to do something similar, start by familiarizing yourself with Mikrotik’s API. There are some great community scripts that can help automate the data fetching. Also, don’t hesitate to reach out to the community for advice—every tip helps!

I’m really happy with how this turned out and excited to explore more ways to streamline my smart home setup. Thanks to everyone who contributed to the resources that made this possible! :tada: