Get data from Enigma2 webinterface

I want to implement some kind of light control using data from my Dreambox webinterface (Enigma2:WebInterface – DreamboxWIKI). Actually, the light is supposed to be switched on if the dreambox is running. To get to know the status of the box I want to use a ping to see if it is switched on and the command /web/powerstate that returns an xml file to find out if it is in standby or running. How can I accomplish that bearing in mind that the webinterface has a password protection switched on?