From 19321d4a3bc9068de518f6f6caca6ece563a9990 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Tue, 20 Sep 2016 10:40:12 -0500 Subject: [PATCH] Fixes sending strings by changing sendtodbJSON to sendtodb, increments version number because this shit is important --- POCloud_Driver/config.txt | 2 +- POCloud_Driver/ipp.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/POCloud_Driver/config.txt b/POCloud_Driver/config.txt index 8f8e829..382d01e 100644 --- a/POCloud_Driver/config.txt +++ b/POCloud_Driver/config.txt @@ -3,7 +3,7 @@ "driverFileName":"ipp.py", "deviceName":"ipp", "driverId":"0090", -"releaseVersion":"4", +"releaseVersion":"5", "files": { "file1":"ipp.py", "file2":"micro800.py" diff --git a/POCloud_Driver/ipp.py b/POCloud_Driver/ipp.py index b9aba49..5c1f093 100644 --- a/POCloud_Driver/ipp.py +++ b/POCloud_Driver/ipp.py @@ -247,7 +247,7 @@ class start(threading.Thread, deviceBase): 'cfgvvoltagemode': Channel('cfgvvoltagemode', 'cfg_V_VoltageMode', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), 'cfgwrite': Channel('cfgwrite', 'cfg_WRITE', 86400, self.sendtodbJSON, writeable=True, e300_param=False), 'contactorstatus': Channel('contactorstatus', 'Contactor_Status', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'devicestatus': Channel('devicestatus', 'Device_Status_INT', 3600, self.sendtodbJSON, writeable=False, e300_param=False, map_obj=device_status), + 'devicestatus': Channel('devicestatus', 'Device_Status_INT', 3600, self.sendtodb, writeable=False, e300_param=False, map_obj=device_status), 'dhdownholestatusint': Channel('dhdownholestatusint', 'DH_DownholeStatus_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), 'dhfluidlevel': Channel('dhfluidlevel', 'DH_Fluid_Level', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), 'dhintakepressure': Channel('dhintakepressure', 'DH_IntakePressure', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), @@ -353,10 +353,10 @@ class start(threading.Thread, deviceBase): 'tripenablevvoltageunbalance': Channel('tripenablevvoltageunbalance', 'TripEnable_V_VoltageUnbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), 'tripresetcmd': Channel('tripresetcmd', 'TripResetCmd', 3600, self.sendtodbJSON, writeable=True, e300_param=False), 'tripstatus': Channel('tripstatus', 'TripStatus', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'tripstatuscontrolint': Channel('tripstatuscontrolint', 'TripStatusControl_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_control), - 'tripstatuscurrentint': Channel('tripstatuscurrentint', 'TripStatusCurrent_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_current), - 'tripstatuspowerint': Channel('tripstatuspowerint', 'TripStatusPower_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_power), - 'tripstatusvoltageint': Channel('tripstatusvoltageint', 'TripStatusVoltage_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), + 'tripstatuscontrolint': Channel('tripstatuscontrolint', 'TripStatusControl_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_control), + 'tripstatuscurrentint': Channel('tripstatuscurrentint', 'TripStatusCurrent_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_current), + 'tripstatuspowerint': Channel('tripstatuspowerint', 'TripStatusPower_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_power), + 'tripstatusvoltageint': Channel('tripstatusvoltageint', 'TripStatusVoltage_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), 'valoverloadtripcount': Channel('valoverloadtripcount', 'val_OverloadTripCount', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), 'valtripcount': Channel('valtripcount', 'val_TripCount', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), 'voltageok': Channel('voltageok', 'VoltageOK', 3600, self.sendtodbJSON, writeable=False, e300_param=False), @@ -377,10 +377,10 @@ class start(threading.Thread, deviceBase): 'warningenablevundervoltage': Channel('warningenablevundervoltage', 'WarningEnable_V_Undervoltage', 3600, self.sendtodbJSON, writeable=True, e300_param=False), 'warningenablevvoltageunbalance': Channel('warningenablevvoltageunbalance', 'WarningEnable_V_VoltageUnbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), 'warningstatus': Channel('warningstatus', 'WarningStatus', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningstatuscontrolint': Channel('warningstatuscontrolint', 'WarningStatusControl_INT', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_control), - 'warningstatuscurrentint': Channel('warningstatuscurrentint', 'WarningStatusCurrent_INT', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_current), - 'warningstatuspowerint': Channel('warningstatuspowerint', 'WarningStatusPower_INT', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_power), - 'warningstatusvoltageint': Channel('warningstatusvoltageint', 'WarningStatusVoltage_INT', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), + 'warningstatuscontrolint': Channel('warningstatuscontrolint', 'WarningStatusControl_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_control), + 'warningstatuscurrentint': Channel('warningstatuscurrentint', 'WarningStatusCurrent_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_current), + 'warningstatuspowerint': Channel('warningstatuspowerint', 'WarningStatusPower_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_power), + 'warningstatusvoltageint': Channel('warningstatusvoltageint', 'WarningStatusVoltage_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), } def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None):