update lua script to use new remote_id lookup API