Modified script to poll devices, first test