added a defined check to the test_websocket.pl code for the thermostat object