From eb1f7bc33c2ae4f6680e9ca6d47c89730cb1d54d Mon Sep 17 00:00:00 2001 From: Nico Melone Date: Thu, 28 May 2020 08:42:31 -0500 Subject: [PATCH] added single control tag --- dualactuator/alt/dualactuator/python-driver/Tags.py | 3 ++- dualactuator/alt/dualactuator/python-driver/config.txt | 2 +- dualactuator/alt/dualactuator/python-driver/dualactuator.py | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dualactuator/alt/dualactuator/python-driver/Tags.py b/dualactuator/alt/dualactuator/python-driver/Tags.py index fe39b86..8a9e838 100644 --- a/dualactuator/alt/dualactuator/python-driver/Tags.py +++ b/dualactuator/alt/dualactuator/python-driver/Tags.py @@ -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") ] \ No newline at end of file diff --git a/dualactuator/alt/dualactuator/python-driver/config.txt b/dualactuator/alt/dualactuator/python-driver/config.txt index e9df72e..1126cdc 100644 --- a/dualactuator/alt/dualactuator/python-driver/config.txt +++ b/dualactuator/alt/dualactuator/python-driver/config.txt @@ -8,7 +8,7 @@ "file4": "Tags.py" }, "deviceName": "dualactuator", - "releaseVersion": "1", + "releaseVersion": "2", "driverFileName": "dualactuator.py", "driverId": "0100" } \ No newline at end of file diff --git a/dualactuator/alt/dualactuator/python-driver/dualactuator.py b/dualactuator/alt/dualactuator/python-driver/dualactuator.py index 74f54c4..80db173 100644 --- a/dualactuator/alt/dualactuator/python-driver/dualactuator.py +++ b/dualactuator/alt/dualactuator/python-driver/dualactuator.py @@ -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):