mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
23 lines
715 B
Python
Executable File
23 lines
715 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from esptest import *
|
|
|
|
#node0 has 2x ds18b20. values are send to domoticz mqtt
|
|
|
|
espeasy[0].controller_domoticz_mqtt(index=1, controllerip=config.mqtt_broker)
|
|
espeasy[0].device_p004(index=1, taskdevicepin1=2, plugin_004_dev=0, plugin_004_res=9, TDID1=1417)
|
|
espeasy[0].device_p004(index=2, taskdevicepin1=2, plugin_004_dev=1, plugin_004_res=9, TDID1=1418)
|
|
|
|
|
|
# check mqtt results
|
|
temp1=mqtt_expect_json("domoticz/in", { 'idx': 1417 }, timeout=5)
|
|
temp2=mqtt_expect_json("domoticz/in", { 'idx': 1418 }, timeout=5)
|
|
|
|
if int(temp1.svalue)>0 and int(temp1.svalue)<40:
|
|
if int(temp1.svalue)>0 and int(temp1.svalue)<40:
|
|
|
|
#FIXME:
|
|
log.info("passed")
|
|
|
|
raise(Exception("Test failed"))
|