Script allows to detect RaspberryPi local ip address and return. Actually that can be use for any device as long as known the device id.

Just Put your device id instead of camera 1.local. Widely name of RPİ is raspberrypi.local