I need to develop a server. This server is required for the binding of "smart home" with the phone (mobile application). "Smart home" controller connects to the server and sends id. Server must remember "key"-"value" where "key" id id of devide and "value" - ip address of controller. How to determine the ip address of the remote device. To implement this i can use PHP or NodeJs.
I shall be grateful for any help
There is no device discovery mechanism in the Modbus standard. It assumes that you know the IP address.
You need to build an out-of-band mechanism to find the devices. For Modbus devices, I have seen a lot of custom UDP based discovery messages.