MB30 IP Changes After Router Restart – Best Practice for ERPNext Sync?

I have successfully integrated a ZKTeco MB30 biometric device with ERPNext v16 using the official Frappe Biometric Attendance Sync Tool (Python-based).

The synchronization works correctly when the device IP configured in local_config.py matches the current IP address of the MB30.

However, I noticed the following issue:

The MB30 is connected to the network via a LAN cable.
The device currently has DHCP enabled.
After the router is restarted or after certain network events, the MB30 receives a different IP address.
Once the IP changes, the Frappe Biometric Attendance Sync Tool cannot connect to the device until I manually update the IP address in local_config.py and restart the sync service.

This makes the setup unsuitable for a production environment because attendance synchronization stops whenever the device IP changes.

My Questions
What is the recommended production setup for using the Frappe Biometric Attendance Sync Tool with ZKTeco MB30 devices?
Should I disable DHCP on the biometric device and configure a static IP address?
Is it better to keep DHCP enabled and configure a DHCP Reservation (Static Lease) on the router instead?
How are others managing MB30 devices to ensure the IP address remains stable and the Frappe Biometric Attendance Sync Tool continues syncing automatically after router or device restarts?

I would appreciate recommendations and best practices from anyone using the Frappe Biometric Attendance Sync Tool with ZKTeco devices in a production ERPNext environment.

You should be able to assign a static local IP for your biometric device and use the same in the script.
(assuming your script runs on LAN)

how static ip find tell me ? i don’t know

Check if similar screens are available for your setup.

This is more of a general networking question. Some routers actively send the same DHCP address, some are more random.

When using IP addresses vs DNS names you have two choices (as you’ve already listed). I prefer to set DHCP reservations over assigning static IPs. While both methods accomplish same goal, I prefer reservations because they are more centrally managed on the DHCP server and if you move the device, change networks, or have to factory reset the device, the reservation is still there.

I’d go with a DHCP reservation on your router, then use the IP in local_config.py. It survives router and device restarts, and unlike a static IP on the device it stays managed centrally (so a factory reset or device swap won’t break anything).