added single control tag

This commit is contained in:
2020-05-28 08:42:31 -05:00
parent a0fb00b758
commit eb1f7bc33c
3 changed files with 6 additions and 3 deletions

View File

@@ -15,5 +15,6 @@ tags = [
PLCChannel(PLC_IP_ADDRESS, "fm2_month","Val_FlowmeterMonthTotal","REAL", 1000, 86400, plc_type="Micro800"),
PLCChannel(PLC_IP_ADDRESS, "fm2_lastmonth","Val_FlowmeterLastMonthTotal","REAL", 1000, 86400, plc_type="Micro800"),
PLCChannel(PLC_IP_ADDRESS, "v1_open_fbk","FBK_Valve_Open","STRING", 1, 3600, plc_type="Micro800"),
PLCChannel(PLC_IP_ADDRESS, "v2_open_fbk","FBK_Valve_Open","STRING", 1, 86400, plc_type="Micro800")
PLCChannel(PLC_IP_ADDRESS, "v2_open_fbk","FBK_Valve_Open","STRING", 1, 86400, plc_type="Micro800"),
PLCChannel(PLC_IP_ADDRESS, "single_control","single_control","STRING", 1, 86400, plc_type="Micro800")
]

View File

@@ -8,7 +8,7 @@
"file4": "Tags.py"
},
"deviceName": "dualactuator",
"releaseVersion": "1",
"releaseVersion": "2",
"driverFileName": "dualactuator.py",
"driverId": "0100"
}

View File

@@ -40,7 +40,7 @@ class start(threading.Thread, deviceBase):
mqtt=mqtt, Nodes=Nodes)
self.daemon = True
self.version = "1"
self.version = "2"
self.finished = threading.Event()
self.force_send = False
self.public_ip_address = ""
@@ -89,6 +89,8 @@ class start(threading.Thread, deviceBase):
val = "Unknown State"
elif chan.mesh_name == "v2_open_fbk":
val = "N/A"
elif chan.mesh_name == "single_control":
val = 1
else:
val = chan.read()
if chan.check(val, self.force_send):