def test_0110_get_switch_state(self): """ check if the xpl messages about get_switch_state are OK Sample message : xpl-trig { hop=1 source=domogik-daikcode.domogik-vm1 target=* } sensor.basic { device=/home device=Daikin remote 1 current=19465224 } """ global device_id global xpl_plugin # do the test print(u"********** start testing xpl command set_power.") command = TestCommand(self, device_id, 'set_power') print (u'try to send xpl_cmnd fake....') self.assertTrue(command.test_XplCmd({"command" : "switch", "power" : "On"}, {"state" :"On"})) msg1_time = datetime.now() time.sleep(8) print(u"********** start testing xpl command set_setpoint.") command2 = TestCommand(self, device_id, 'set_setpoint') self.assertTrue(command2.test_XplCmd({"command" : "setpoint", "temp": 23}, {"temp" : 23})) time.sleep(8)
def test_0110_send_test_battery(self): """ check if the xpl messages about get_switch_state are OK Sample message : xpl-trig { hop=1 source=domogik-daikcode.domogik-vm1 target=* } irtrans.basic { device=/home device=Daikin remote 1 current=19465224 } dmg_send xpl-cmnd irtrans.basic "device=IRTrans_1,command=send,datatype=IRTrans standard,code=a22222,timing=a45454" """ global device_id global xpl_plugin # do the test print(u"********** start testing xpl command send test_battery_start.") command = TestCommand(self, device_id, 'test_battery_start') print (u'try to send xpl_cmnd fake....') self.assertTrue(command.test_XplCmd({"test": 'a battery test', "command": 'test-battery-start'}, {"result" :"ok"})) msg1_time = datetime.now() time.sleep(8)
def test_0110_send_code_standard(self): """ check if the xpl messages about get_switch_state are OK Sample message : xpl-trig { hop=1 source=domogik-daikcode.domogik-vm1 target=* } irtrans.basic { device=/home device=Daikin remote 1 current=19465224 } dmg_send xpl-cmnd irtrans.basic "device=IRTrans_1,command=send,datatype=IRTrans standard,code=a22222,timing=a45454" """ global device_id global xpl_plugin # do the test print(u"********** start testing xpl command send standard code IR.") command = TestCommand(self, device_id, 'send_standard') print(u'try to send xpl_cmnd fake....' ) # "command" : "send", "datatype" : "IRTrans standard", self.assertTrue( command.test_XplCmd({ "code": CODE_IR, "timing": TIMING }, {"result": "ok"})) msg1_time = datetime.now() time.sleep(8)
def test_0110_get_switch_state(self): """ check if the xpl messages about get_switch_state are OK Sample message : xpl-trig { hop=1 source=domogik-daikcode.domogik-vm1 target=* } sensor.basic { device=/home device=Daikin remote 1 current=19465224 } """ global device_id global xpl_plugin # do the test print(u"********** start testing xpl command set_power.") command = TestCommand(self, device_id, 'set_power') print(u'try to send xpl_cmnd fake....') self.assertTrue( command.test_XplCmd({ "command": "switch", "power": "On" }, {"state": "On"})) msg1_time = datetime.now() time.sleep(8) print(u"********** start testing xpl command set_setpoint.") command2 = TestCommand(self, device_id, 'set_setpoint') self.assertTrue( command2.test_XplCmd({ "command": "setpoint", "temp": 23 }, {"temp": 23})) time.sleep(8)