add function get device_id from ip