I had this same issue.
I followed this example (https://github.com/genieacs/genieacs/wiki/Virtual-Parameters) to create a virtual parameter the first time every new device registers with the ACS. Once that exists I query the API by virtual Parameters MAC to obtain the Device.ID.
I suspect you could do the same with the IP as well but it would need to update if the IP changes.