commit 059fc58ed32a2778da9fbe6c37c5aa294afc1fc6 Author: Patrick McDonagh Date: Mon May 14 10:29:41 2018 -0500 Initial commit diff --git a/M1-Modbus-Bug.md b/M1-Modbus-Bug.md new file mode 100644 index 0000000..cfaf875 --- /dev/null +++ b/M1-Modbus-Bug.md @@ -0,0 +1,76 @@ +# M1 Modbus Bug + +When adding more than one register that uses the multiplier feature, there is an error in the processing of the value. This is logged to the console: + +```python +error reading modbus value +No communication with the instrument (no answer) +Error reading register, retries exhausted +local variable 'val' referenced before assignment +Sending log to log-modbus: (X) Retries Exhausted: local variable 'val' referenced before assignment +``` + +## Steps to re-create the error + +1. Set up a single channel with no multiplier value. + +2. Set Modbus settings and Sync to Device. + + ``` + here is the answer + �� + '\xf7\x03\x02\x13\x16\xfc\xaf' + '\xf7\x03\x02\x13\x16\xfc\xaf' + here is the payload from slave + + '\x02\x13\x16' + here is the payload + + '\x02\x13\x16' + success reading + 4886 + 4886 + ``` + +3. Set up another channel with Multiplier parameter of "Divide" and Multiplier Value of "10". + +4. Sync to Device. + + on first register: + + ``` + here is the answer + + '' + '' + error reading modbus value + No communication with the instrument (no answer) + had an error on the modbus loop, retrying read + here is your period: 120 + 23.4706990719 + here is your send value: False + getting int + writing 485: �,P� + ``` + + on second register: + + ``` + here is the answer + + '' + '' + error reading modbus value + No communication with the instrument (no answer) + Error reading register, retries exhausted + local variable 'val' referenced before assignment + here is your period: 120 + 1525193769.02 + here is your send value: True + getting int + writing 485: �7 � + ``` + + + + diff --git a/M1-Modbus-Bug.pdf b/M1-Modbus-Bug.pdf new file mode 100644 index 0000000..3d31b45 Binary files /dev/null and b/M1-Modbus-Bug.pdf differ diff --git a/Submonitor Modbus Points.xlsx b/Submonitor Modbus Points.xlsx new file mode 100644 index 0000000..9f1c20a Binary files /dev/null and b/Submonitor Modbus Points.xlsx differ diff --git a/submonitor/html-templates/Alerts.html b/submonitor/html-templates/Alerts.html new file mode 100644 index 0000000..2971cab --- /dev/null +++ b/submonitor/html-templates/Alerts.html @@ -0,0 +1 @@ +Alerts diff --git a/submonitor/html-templates/Device.html b/submonitor/html-templates/Device.html new file mode 100644 index 0000000..0797f12 --- /dev/null +++ b/submonitor/html-templates/Device.html @@ -0,0 +1,42 @@ +
+
+

Public IP Address

+

<%= channels["submonitor.public_ip_address"].value %>

+

+
+ + diff --git a/submonitor/html-templates/NodeDetailHeader.html b/submonitor/html-templates/NodeDetailHeader.html new file mode 100644 index 0000000..28262a3 --- /dev/null +++ b/submonitor/html-templates/NodeDetailHeader.html @@ -0,0 +1,6 @@ +
+
+
+
+

<%= node.vanityname %>

+
diff --git a/submonitor/html-templates/Nodelist.html b/submonitor/html-templates/Nodelist.html new file mode 100644 index 0000000..1622f37 --- /dev/null +++ b/submonitor/html-templates/Nodelist.html @@ -0,0 +1,39 @@ + + +
+
+
+
+ +
+ +
+ +
+

<%= node.vanityname %>

+
+
+

Avg. Current

+

<%= Math.round(channels['submonitor.current_average'].value * 100) / 100 %> A.

+
+
+

Avg. Voltage

+

<%= Math.round(channels['submonitor.voltage_average'].value * 100) / 100 %> V.

+
+
diff --git a/submonitor/html-templates/Overview.html b/submonitor/html-templates/Overview.html new file mode 100644 index 0000000..c559cf4 --- /dev/null +++ b/submonitor/html-templates/Overview.html @@ -0,0 +1,308 @@ +
+
+
+ +
+ +
+
+
+ +
+
+
+

Voltage

+
+
+ +
+
+ +
+ +
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+

Current

+
+
+ +
+
+ +
+ +
+
+ +
+
+
+
+
+
+ +
+ + + + + + + + + diff --git a/submonitor/html-templates/Sidebar.html b/submonitor/html-templates/Sidebar.html new file mode 100644 index 0000000..de8f1af --- /dev/null +++ b/submonitor/html-templates/Sidebar.html @@ -0,0 +1,15 @@ +" + class="data-table btn-block btn btn-theme animated" + title="Device Log"> Device Log + +" + data-techname="<%=channels["submonitor.sync"].techName %>" + data-name="<%= channels["submonitor.sync"].name%>" + data-nodechannelcurrentId="<%= channels["submonitor.sync"].nodechannelcurrentId %>" + id="<%= channels["submonitor.sync"].channelId %>" + class="btn btn-large btn-block btn-theme animated setstatic mqtt"> + Sync All Data diff --git a/submonitor/html-templates/Trends.html b/submonitor/html-templates/Trends.html new file mode 100644 index 0000000..744ce61 --- /dev/null +++ b/submonitor/html-templates/Trends.html @@ -0,0 +1,37 @@ +
+
+ + to + + + Run + +
+
+
+
+
+ diff --git a/submonitor/python-driver/Channel.py b/submonitor/python-driver/Channel.py new file mode 100644 index 0000000..adb6680 --- /dev/null +++ b/submonitor/python-driver/Channel.py @@ -0,0 +1,287 @@ +"""Define Meshify channel class.""" +from pycomm.ab_comm.clx import Driver as ClxDriver +from pycomm.cip.cip_base import CommError, DataError +import time + + +def binarray(intval): + """Split an integer into its bits.""" + bin_string = '{0:08b}'.format(intval) + bin_arr = [i for i in bin_string] + bin_arr.reverse() + return bin_arr + + +def read_tag(addr, tag, plc_type="CLX"): + """Read a tag from the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + try: + if c.open(addr, direct_connection=direct): + try: + v = c.read_tag(tag) + return v + except DataError as e: + c.close() + print("Data Error during readTag({}, {}): {}".format(addr, tag, e)) + except CommError: + # err = c.get_status() + c.close() + print("Could not connect during readTag({}, {})".format(addr, tag)) + # print err + except AttributeError as e: + c.close() + print("AttributeError during readTag({}, {}): \n{}".format(addr, tag, e)) + c.close() + return False + + +def read_array(addr, tag, start, end, plc_type="CLX"): + """Read an array from the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + if c.open(addr, direct_connection=direct): + arr_vals = [] + try: + for i in range(start, end): + tag_w_index = tag + "[{}]".format(i) + v = c.read_tag(tag_w_index) + # print('{} - {}'.format(tag_w_index, v)) + arr_vals.append(round(v[0], 4)) + # print(v) + if len(arr_vals) > 0: + return arr_vals + else: + print("No length for {}".format(addr)) + return False + except Exception: + print("Error during readArray({}, {}, {}, {})".format(addr, tag, start, end)) + err = c.get_status() + c.close() + print err + pass + c.close() + + +def write_tag(addr, tag, val, plc_type="CLX"): + """Write a tag value to the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + if c.open(addr, direct_connection=direct): + try: + cv = c.read_tag(tag) + print(cv) + wt = c.write_tag(tag, val, cv[1]) + return wt + except Exception: + print("Error during writeTag({}, {}, {})".format(addr, tag, val)) + err = c.get_status() + c.close() + print err + c.close() + + +class Channel(object): + """Holds the configuration for a Meshify channel.""" + + def __init__(self, mesh_name, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False): + """Initialize the channel.""" + self.mesh_name = mesh_name + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + + def __str__(self): + """Create a string for the channel.""" + return "{}\nvalue: {}, last_send_time: {}".format(self.mesh_name, self.value, self.last_send_time) + + def check(self, new_value, force_send=False): + """Check to see if the new_value needs to be stored.""" + send_needed = False + send_reason = "" + if self.data_type == 'BOOL' or self.data_type == 'STRING': + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif not (self.value == new_value): + if self.map_: + if not self.value == self.map_[new_value]: + send_needed = True + send_reason = "value change" + else: + send_needed = True + send_reason = "value change" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + else: + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif abs(self.value - new_value) > self.chg_threshold: + send_needed = True + send_reason = "change threshold" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + if send_needed: + self.last_value = self.value + if self.map_: + try: + self.value = self.map_[new_value] + except KeyError: + print("Cannot find a map value for {} in {} for {}".format(new_value, self.map_, self.mesh_name)) + self.value = new_value + else: + self.value = new_value + self.last_send_time = time.time() + print("Sending {} for {} - {}".format(self.value, self.mesh_name, send_reason)) + return send_needed + + def read(self): + """Read the value.""" + pass + + +def identity(sent): + """Return exactly what was sent to it.""" + return sent + + +class ModbusChannel(Channel): + """Modbus channel object.""" + + def __init__(self, mesh_name, register_number, data_type, chg_threshold, guarantee_sec, channel_size=1, map_=False, write_enabled=False, transformFn=identity): + """Initialize the channel.""" + super(ModbusChannel, self).__init__(mesh_name, data_type, chg_threshold, guarantee_sec, map_, write_enabled) + self.mesh_name = mesh_name + self.register_number = register_number + self.channel_size = channel_size + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + self.transformFn = transformFn + + def read(self, mbsvalue): + """Return the transformed read value.""" + return self.transformFn(mbsvalue) + + +class PLCChannel(Channel): + """PLC Channel Object.""" + + def __init__(self, ip, mesh_name, plc_tag, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False, plc_type='CLX'): + """Initialize the channel.""" + super(PLCChannel, self).__init__(mesh_name, data_type, chg_threshold, guarantee_sec, map_, write_enabled) + self.plc_ip = ip + self.mesh_name = mesh_name + self.plc_tag = plc_tag + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + self.plc_type = plc_type + + def read(self): + """Read the value.""" + plc_value = None + if self.plc_tag and self.plc_ip: + read_value = read_tag(self.plc_ip, self.plc_tag, plc_type=self.plc_type) + if read_value: + plc_value = read_value[0] + + return plc_value + + +class BoolArrayChannels(Channel): + """Hold the configuration for a set of boolean array channels.""" + + def __init__(self, ip, mesh_name, plc_tag, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False): + """Initialize the channel.""" + self.plc_ip = ip + self.mesh_name = mesh_name + self.plc_tag = plc_tag + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + + def compare_values(self, new_val_dict): + """Compare new values to old values to see if the values need storing.""" + send = False + for idx in new_val_dict: + try: + if new_val_dict[idx] != self.last_value[idx]: + send = True + except KeyError: + print("Key Error in self.compare_values for index {}".format(idx)) + send = True + return send + + def read(self, force_send=False): + """Read the value and check to see if needs to be stored.""" + send_needed = False + send_reason = "" + if self.plc_tag: + v = read_tag(self.plc_ip, self.plc_tag) + if v: + bool_arr = binarray(v[0]) + new_val = {} + for idx in self.map_: + try: + new_val[self.map_[idx]] = bool_arr[idx] + except KeyError: + print("Not able to get value for index {}".format(idx)) + + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif self.compare_values(new_val): + send_needed = True + send_reason = "value change" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + + if send_needed: + self.value = new_val + self.last_value = self.value + self.last_send_time = time.time() + print("Sending {} for {} - {}".format(self.value, self.mesh_name, send_reason)) + return send_needed diff --git a/submonitor/python-driver/channels_submonitor.csv b/submonitor/python-driver/channels_submonitor.csv new file mode 100644 index 0000000..6617bfb --- /dev/null +++ b/submonitor/python-driver/channels_submonitor.csv @@ -0,0 +1,42 @@ +id,name,deviceTypeId,fromMe,io,subTitle,helpExplanation,channelType,dataType,defaultValue,regex,regexErrMsg,units,min,max,change,guaranteedReportPeriod,minReportTime +13648,log,462,FALSE,readonly,Log,Device Log,device,string,Initialized,,,,,,,, +13650,voltage_average,462,FALSE,readonly,Average Voltage,Volts,device,float,,,,,,,,, +13651,voltage_ab,462,FALSE,readonly,Voltage: A-B,Volts,device,float,,,,,,,,, +13652,voltage_bc,462,FALSE,readonly,Voltage: B-C,Volts,device,float,,,,,,,,, +13653,voltage_ca,462,FALSE,readonly,Voltage: C-A,Volts,device,float,,,,,,,,, +13654,voltage_ln,462,FALSE,readonly,Voltage: L-N,Volts,device,float,,,,,,,,, +13655,frequency,462,FALSE,readonly,Frequency,Hz,device,float,,,,,,,,, +13656,phase_order,462,FALSE,readonly,Phase Order,ABC/ACB,device,string,,,,,,,,, +13657,voltage_unbalance,462,FALSE,readonly,Voltage Unbalance,%,device,float,,,,,,,,, +13658,voltage_ab_min,462,FALSE,readonly,Voltage Min: A-B,Volts,device,float,,,,,,,,, +13659,voltage_bc_min,462,FALSE,readonly,Voltage Min: B-C,Volts,device,float,,,,,,,,, +13660,voltage_ca_min,462,FALSE,readonly,Voltage Min: C-A,Volts,device,float,,,,,,,,, +13661,current_average,462,FALSE,readonly,Average Current,Amps,device,float,,,,,,,,, +13662,current_a,462,FALSE,readonly,Current: A Phase,Amps,device,float,,,,,,,,, +13663,current_b,462,FALSE,readonly,Current: B Phase,Amps,device,float,,,,,,,,, +13664,current_c,462,FALSE,readonly,Current: C Phase,Amps,device,float,,,,,,,,, +13665,current_ground,462,FALSE,readonly,Current: Ground,Amps,device,float,,,,,,,,, +13666,current_unbalance,462,FALSE,readonly,Current Unbalance,%,device,float,,,,,,,,, +13667,current_peak,462,FALSE,readonly,Peak Current,Amps,device,float,,,,,,,,, +13668,power_kw,462,FALSE,readonly,Power: kW,kW,device,float,,,,,,,,, +13669,power_kva,462,FALSE,readonly,Power: kVA,kVA,device,float,,,,,,,,, +13670,power_kvar,462,FALSE,readonly,Power: kVAR,kVAR,device,float,,,,,,,,, +13671,power_pf_average,462,FALSE,readonly,Power Factor: Average,pf,device,float,,,,,,,,, +13672,power_pf_a,462,FALSE,readonly,Power Factor: A Phase,pf,device,float,,,,,,,,, +13673,power_pf_b,462,FALSE,readonly,Power Factor: B Phase,pf,device,float,,,,,,,,, +13674,power_pf_c,462,FALSE,readonly,Power Factor C Phase,pf,device,float,,,,,,,,, +13675,power_kwh,462,FALSE,readonly,Power: kWh Elapsed,kWh,device,float,,,,,,,,, +13676,motor_insulation,462,FALSE,readonly,Motor Insulation,Ohms,device,float,,,,,,,,, +13677,motor_temp_rtd,462,FALSE,readonly,Motor Temp RTD,deg,device,float,,,,,,,,, +13678,motor_temp_subtrolx,462,FALSE,readonly,Motor Temp SubtrolX,deg,device,float,,,,,,,,, +,system_state,462,FALSE,readonly,System State,state,device,string,,,,,,,,, +,hoa_mode,462,FALSE,readonly,HOA Mode,state,device,string,,,,,,,,, +,motor_state,462,FALSE,readonly,Motor State,state,device,string,,,,,,,,, +,fault_current,462,FALSE,readonly,Current Fault,fault,device,string,,,,,,,,, +,alarm_1,462,FALSE,readonly,Alarm 1,alarm,device,string,,,,,,,,, +,alarm_2,462,FALSE,readonly,Alarm 2,alarm,device,string,,,,,,,,, +,alarm_3,462,FALSE,readonly,Alarm 3,alarm,device,string,,,,,,,,, +,alarm_4,462,FALSE,readonly,Alarm 4,alarm,device,string,,,,,,,,, +,alarm_5,462,FALSE,readonly,Alarm 5,alarm,device,string,,,,,,,,, +,terminal_v1_v2,462,FALSE,readonly,V1/V2 Terminal,on/off,device,string,,,,,,,,, +,motor_run_Time,462,FALSE,readonly,Motor Run Time,hours,device,float,,,,,,,,, \ No newline at end of file diff --git a/submonitor/python-driver/config.txt b/submonitor/python-driver/config.txt new file mode 100644 index 0000000..1546190 --- /dev/null +++ b/submonitor/python-driver/config.txt @@ -0,0 +1,10 @@ +{ + "driverFileName": "submonitor.py", + "deviceName": "submonitor", + "driverId": "0210", + "releaseVersion": "2", + "files": { + "file1": "submonitor.py", + "file2": "modbusMap.p" + } +} \ No newline at end of file diff --git a/submonitor/python-driver/device_base.py b/submonitor/python-driver/device_base.py new file mode 100644 index 0000000..edbd53d --- /dev/null +++ b/submonitor/python-driver/device_base.py @@ -0,0 +1,2 @@ +class deviceBase(object): + pass \ No newline at end of file diff --git a/submonitor/python-driver/driverConfig.json b/submonitor/python-driver/driverConfig.json new file mode 100644 index 0000000..b44dcef --- /dev/null +++ b/submonitor/python-driver/driverConfig.json @@ -0,0 +1,10 @@ +{ + "name": "submonitor", + "driverFilename": "submonitor.py", + "driverId": "0210", + "additionalDriverFiles": [ + "modbusMap.p" + ], + "version": 2, + "s3BucketName": "submonitor" +} \ No newline at end of file diff --git a/submonitor/python-driver/modbusMap.p b/submonitor/python-driver/modbusMap.p new file mode 100644 index 0000000..06700df --- /dev/null +++ b/submonitor/python-driver/modbusMap.p @@ -0,0 +1,3367 @@ +(dp0 +S'1' +p1 +(dp2 +S'c' +p3 +VM1-485 +p4 +sS'b' +p5 +V19200 +p6 +sS'addresses' +p7 +(dp8 +V247 +p9 +(dp10 +V2-34 +p11 +(dp12 +Val +p13 +V +p14 +sVah +p15 +g14 +sVbytary +p16 +NsVvm +p17 +NsVvn +p18 +VAlarm 1 +p19 +sVct +p20 +Vnumber +p21 +sVle +p22 +V16 +p23 +sVgrp +p24 +V600 +p25 +sVla +p26 +S'' +p27 +sVchn +p28 +Valarm_1 +p29 +sVun +p30 +V1 +p31 +sVdn +p32 +Vsubmonitor +p33 +sVda +p34 +V247 +p35 +sVlrt +p36 +V0 +p37 +sVr +p38 +V0-65535 +p39 +sVa +p40 +V204 +p41 +sVc +p42 +g31 +sVmisc_u +p43 +g14 +sVf +p44 +V3 +p45 +sVmrt +p46 +V10 +p47 +sVm +p48 +Vnone +p49 +sS'm1ch' +p50 +g11 +sVs +p51 +VOn +p52 +sVmv +p53 +g37 +sVt +p54 +Vint +p55 +ssV2-32 +p56 +(dp57 +Val +p58 +g14 +sVah +p59 +g14 +sVbytary +p60 +NsVvm +p61 +NsVvn +p62 +VMotor State +p63 +sVct +p64 +Vnumber +p65 +sVle +p66 +V16 +p67 +sVgrp +p68 +V600 +p69 +sVla +p70 +g27 +sVchn +p71 +Vmotor_state +p72 +sVun +p73 +g31 +sVdn +p74 +Vsubmonitor +p75 +sVda +p76 +V247 +p77 +sVlrt +p78 +F1525815076.4383951 +sg38 +V0-65535 +p79 +sg40 +V202 +p80 +sg42 +g31 +sVmisc_u +p81 +g14 +sg44 +g45 +sVmrt +p82 +V10 +p83 +sg48 +Vnone +p84 +sg50 +g56 +sg51 +VOn +p85 +sVmv +p86 +g37 +sg54 +Vint +p87 +ssV2-33 +p88 +(dp89 +Val +p90 +g14 +sVah +p91 +g14 +sVbytary +p92 +NsVvm +p93 +NsVvn +p94 +VFault State +p95 +sVct +p96 +Vnumber +p97 +sVle +p98 +V16 +p99 +sVgrp +p100 +V600 +p101 +sVla +p102 +g27 +sVchn +p103 +Vfault_current +p104 +sVun +p105 +g31 +sVdn +p106 +Vsubmonitor +p107 +sVda +p108 +V247 +p109 +sVlrt +p110 +g37 +sg38 +V0-65535 +p111 +sg40 +V203 +p112 +sg42 +g31 +sVmisc_u +p113 +g14 +sg44 +g45 +sVmrt +p114 +V10 +p115 +sg48 +Vnone +p116 +sg50 +g88 +sg51 +VOn +p117 +sVmv +p118 +g37 +sg54 +Vint +p119 +ssV2-35 +p120 +(dp121 +Val +p122 +g14 +sVah +p123 +g14 +sVbytary +p124 +NsVvm +p125 +NsVvn +p126 +VAlarm 2 +p127 +sVct +p128 +Vnumber +p129 +sVle +p130 +V16 +p131 +sVgrp +p132 +V600 +p133 +sVla +p134 +g27 +sVchn +p135 +Valarm_2 +p136 +sVun +p137 +g31 +sVdn +p138 +Vsubmonitor +p139 +sVda +p140 +V247 +p141 +sVlrt +p142 +g37 +sg38 +V0-65535 +p143 +sg40 +V205 +p144 +sg42 +g31 +sVmisc_u +p145 +g14 +sg44 +g45 +sVmrt +p146 +V10 +p147 +sg48 +Vnone +p148 +sg50 +g120 +sg51 +VOn +p149 +sVmv +p150 +g37 +sg54 +Vint +p151 +ssV2-30 +p152 +(dp153 +Val +p154 +g14 +sVah +p155 +g14 +sVbytary +p156 +NsVvm +p157 +NsVvn +p158 +VSystem State +p159 +sVct +p160 +Vnumber +p161 +sVle +p162 +V16 +p163 +sVgrp +p164 +V600 +p165 +sVla +p166 +g27 +sVchn +p167 +Vsystem_state +p168 +sVun +p169 +g31 +sVdn +p170 +Vsubmonitor +p171 +sVda +p172 +V247 +p173 +sVlrt +p174 +F1525815076.965099 +sg38 +V0-65535 +p175 +sg40 +V200 +p176 +sg42 +g31 +sVmisc_u +p177 +g14 +sg44 +g45 +sVmrt +p178 +V10 +p179 +sg48 +Vnone +p180 +sg50 +g152 +sg51 +VOn +p181 +sVmv +p182 +g37 +sg54 +Vint +p183 +ssV2-31 +p184 +(dp185 +Val +p186 +g14 +sVah +p187 +g14 +sVbytary +p188 +NsVvm +p189 +NsVvn +p190 +VHOA Mode +p191 +sVct +p192 +Vnumber +p193 +sVle +p194 +V16 +p195 +sVgrp +p196 +V600 +p197 +sVla +p198 +g27 +sVchn +p199 +Vhoa_mode +p200 +sVun +p201 +g31 +sVdn +p202 +Vsubmonitor +p203 +sVda +p204 +V247 +p205 +sVlrt +p206 +F1525815077.6294771 +sg38 +V0-65535 +p207 +sg40 +V201 +p208 +sg42 +g31 +sVmisc_u +p209 +g14 +sg44 +g45 +sVmrt +p210 +V10 +p211 +sg48 +Vnone +p212 +sg50 +g184 +sg51 +VOn +p213 +sVmv +p214 +g37 +sg54 +Vint +p215 +ssV2-29 +p216 +(dp217 +Vah +p218 +g14 +sVbytary +p219 +NsVal +p220 +g14 +sVvn +p221 +VMotor Temp: SubtrolX +p222 +sVct +p223 +Vnumber +p224 +sVle +p225 +V16 +p226 +sVgrp +p227 +V600 +p228 +sVla +p229 +g27 +sVchn +p230 +Vmotor_temp_subtrolx +p231 +sVun +p232 +V1 +p233 +sVdn +p234 +Vsubmonitor +p235 +sVvm +p236 +NsVlrt +p237 +F1525815078.1144631 +sVda +p238 +V247 +p239 +sVa +p240 +V329 +p241 +sVc +p242 +g233 +sVmisc_u +p243 +Vdeg +p244 +sVf +p245 +V3 +p246 +sVmrt +p247 +V10 +p248 +sVm +p249 +Vdivide +p250 +sS'm1ch' +p251 +g216 +sVmv +p252 +V10 +p253 +sVs +p254 +VOn +p255 +sVr +p256 +V0-500 +p257 +sVt +p258 +Vint +p259 +ssV2-28 +p260 +(dp261 +g38 +V0-5000 +p262 +sVah +p263 +g14 +sVbytary +p264 +NsVal +p265 +g14 +sVvn +p266 +VMotor Temp: RTD +p267 +sVct +p268 +Vnumber +p269 +sVle +p270 +V16 +p271 +sVgrp +p272 +V600 +p273 +sVla +p274 +g27 +sVchn +p275 +Vmotor_temp_rtd +p276 +sVun +p277 +g31 +sVdn +p278 +Vsubmonitor +p279 +sVvm +p280 +NsVlrt +p281 +g37 +sVda +p282 +V247 +p283 +sg40 +V328 +p284 +sg42 +g31 +sVmisc_u +p285 +Vdeg +p286 +sg44 +g45 +sVmrt +p287 +V10 +p288 +sg48 +Vdivide +p289 +sVm1ch +p290 +g260 +sg51 +VOn +p291 +sVmv +p292 +V10 +p293 +sg54 +Vint +p294 +ssV2-25 +p295 +(dp296 +Vah +p297 +g14 +sVbytary +p298 +NsVal +p299 +g14 +sVvn +p300 +VPower: PF C +p301 +sVct +p302 +Vnumber +p303 +sVle +p304 +V16 +p305 +sVgrp +p306 +V600 +p307 +sVla +p308 +g27 +sVchn +p309 +Vpower_pf_c +p310 +sVun +p311 +g233 +sVdn +p312 +Vsubmonitor +p313 +sVvm +p314 +NsVlrt +p315 +F1525815079.810442 +sVda +p316 +V247 +p317 +sg240 +V324 +p318 +sg242 +g233 +sVmisc_u +p319 +V% +p320 +sg245 +g246 +sVmrt +p321 +V10 +p322 +sg249 +Vdivide +p323 +sg251 +g295 +sVmv +p324 +V10 +p325 +sg254 +VOn +p326 +sg256 +V0-100 +p327 +sg258 +Vint +p328 +ssV2-24 +p329 +(dp330 +Vah +p331 +g14 +sVbytary +p332 +NsVal +p333 +g14 +sVvn +p334 +VPower: PF B +p335 +sVct +p336 +Vnumber +p337 +sVle +p338 +V16 +p339 +sVgrp +p340 +V600 +p341 +sVla +p342 +g27 +sVchn +p343 +Vpower_pf_b +p344 +sVun +p345 +g233 +sVdn +p346 +Vsubmonitor +p347 +sVvm +p348 +NsVlrt +p349 +F1525815080.344325 +sVda +p350 +V247 +p351 +sg240 +V323 +p352 +sg242 +g233 +sVmisc_u +p353 +g320 +sg245 +g246 +sVmrt +p354 +V10 +p355 +sg249 +Vdivide +p356 +sg251 +g329 +sVmv +p357 +V10 +p358 +sg254 +VOn +p359 +sg256 +V0-100 +p360 +sg258 +Vint +p361 +ssV2-27 +p362 +(dp363 +g38 +V0-65535 +p364 +sVah +p365 +g14 +sVbytary +p366 +NsVal +p367 +g14 +sVvn +p368 +VMotor Insulation +p369 +sVct +p370 +Vnumber +p371 +sVle +p372 +V16 +p373 +sVgrp +p374 +V600 +p375 +sVla +p376 +g27 +sVchn +p377 +Vmotor_insulation +p378 +sVun +p379 +g31 +sVdn +p380 +Vsubmonitor +p381 +sVvm +p382 +NsVlrt +p383 +F1525815080.82966 +sVda +p384 +V247 +p385 +sg40 +V327 +p386 +sg42 +g31 +sVmisc_u +p387 +VOhms +p388 +sg44 +g45 +sVmrt +p389 +V10 +p390 +sg48 +Vnone +p391 +sVm1ch +p392 +g362 +sg51 +VOn +p393 +sVmv +p394 +V10 +p395 +sg54 +Vint +p396 +ssV2-26 +p397 +(dp398 +Vah +p399 +g14 +sVbytary +p400 +NsVal +p401 +g14 +sVvn +p402 +VPower: kWh +p403 +sVct +p404 +Vnumber +p405 +sVle +p406 +V32 +p407 +sVgrp +p408 +V600 +p409 +sVla +p410 +g27 +sVchn +p411 +Vpower_kwh +p412 +sVun +p413 +g233 +sVdn +p414 +Vsubmonitor +p415 +sVvm +p416 +NsVlrt +p417 +F1525815081.4780059 +sVda +p418 +V247 +p419 +sg240 +V325 +p420 +sg242 +V100 +p421 +sVmisc_u +p422 +VkWh +p423 +sg245 +g246 +sVmrt +p424 +V10 +p425 +sg249 +Vnone +p426 +sg251 +g397 +sVmv +p427 +V0 +p428 +sg254 +VOn +p429 +sg256 +V0-1000000 +p430 +sg258 +Vfloat +p431 +ssV2-21 +p432 +(dp433 +Vah +p434 +g14 +sVbytary +p435 +NsVal +p436 +g14 +sVvn +p437 +VPower: kVAR +p438 +sVct +p439 +Vnumber +p440 +sVle +p441 +V16 +p442 +sVgrp +p443 +V600 +p444 +sVla +p445 +g27 +sVchn +p446 +Vpower_kvar +p447 +sVun +p448 +g233 +sVdn +p449 +Vsubmonitor +p450 +sVvm +p451 +NsVlrt +p452 +F1525815081.964795 +sVda +p453 +V247 +p454 +sg240 +V320 +p455 +sg242 +V5 +p456 +sVmisc_u +p457 +VkVAR +p458 +sg245 +g246 +sVmrt +p459 +V10 +p460 +sg249 +Vdivide +p461 +sg251 +g432 +sVmv +p462 +V10 +p463 +sg254 +VOn +p464 +sg256 +V0-65535 +p465 +sg258 +Vint +p466 +ssV2-20 +p467 +(dp468 +Vah +p469 +g14 +sVbytary +p470 +NsVal +p471 +g14 +sVvn +p472 +VPower: kVA +p473 +sVct +p474 +Vnumber +p475 +sVle +p476 +V16 +p477 +sVgrp +p478 +V600 +p479 +sVla +p480 +g27 +sVchn +p481 +Vpower_kva +p482 +sVun +p483 +g233 +sVdn +p484 +Vsubmonitor +p485 +sVvm +p486 +NsVlrt +p487 +F1525815082.4758321 +sVda +p488 +V247 +p489 +sg240 +V319 +p490 +sg242 +g456 +sVmisc_u +p491 +VkVA +p492 +sg245 +g246 +sVmrt +p493 +V10 +p494 +sg249 +Vdivide +p495 +sg251 +g467 +sVmv +p496 +V10 +p497 +sg254 +VOn +p498 +sg256 +V0-65535 +p499 +sg258 +Vint +p500 +ssV2-23 +p501 +(dp502 +Vah +p503 +g14 +sVbytary +p504 +NsVal +p505 +g14 +sVvn +p506 +VPower: PF A +p507 +sVct +p508 +Vnumber +p509 +sVle +p510 +V16 +p511 +sVgrp +p512 +V600 +p513 +sVla +p514 +g27 +sVchn +p515 +Vpower_pf_a +p516 +sVun +p517 +g233 +sVdn +p518 +Vsubmonitor +p519 +sVvm +p520 +NsVlrt +p521 +F1525815082.9779911 +sVda +p522 +V247 +p523 +sg240 +V322 +p524 +sg242 +g233 +sVmisc_u +p525 +g320 +sg245 +g246 +sVmrt +p526 +V10 +p527 +sg249 +Vdivide +p528 +sg251 +g501 +sVmv +p529 +V10 +p530 +sg254 +VOn +p531 +sg256 +V0-100 +p532 +sg258 +Vint +p533 +ssV2-22 +p534 +(dp535 +Vah +p536 +g14 +sVbytary +p537 +NsVal +p538 +g14 +sVvn +p539 +VPower: PF Average +p540 +sVct +p541 +Vnumber +p542 +sVle +p543 +V16 +p544 +sVgrp +p545 +V600 +p546 +sVla +p547 +g27 +sVchn +p548 +Vpower_pf_average +p549 +sVun +p550 +g233 +sVdn +p551 +Vsubmonitor +p552 +sVvm +p553 +NsVlrt +p554 +F1525815083.4619391 +sVda +p555 +V247 +p556 +sg240 +V321 +p557 +sg242 +g233 +sVmisc_u +p558 +g14 +sg245 +g246 +sVmrt +p559 +V10 +p560 +sg249 +Vdivide +p561 +sg251 +g534 +sVmv +p562 +V10 +p563 +sg254 +VOn +p564 +sg256 +V0-100 +p565 +sg258 +Vint +p566 +ssV2-2 +p567 +(dp568 +Vah +p569 +g14 +sVbytary +p570 +NsVal +p571 +g14 +sVvn +p572 +VAverage Current +p573 +sVct +p574 +Vnumber +p575 +sVle +p576 +V16 +p577 +sVgrp +p578 +V600 +p579 +sVla +p580 +g27 +sVchn +p581 +Vcurrent_average +p582 +sVun +p583 +g233 +sVdn +p584 +Vsubmonitor +p585 +sVda +p586 +V247 +p587 +sVlrt +p588 +F1525815084.007163 +sg256 +V0-250 +p589 +sg240 +V311 +p590 +sg242 +g233 +sVmisc_u +p591 +VA +p592 +sg245 +g246 +sVmrt +p593 +V10 +p594 +sg249 +Vdivide +p595 +sVm1ch +p596 +g567 +sg254 +VOn +p597 +sVmv +p598 +V10 +p599 +sg258 +Vint +p600 +sVvm +p601 +NssV2-3 +p602 +(dp603 +Vah +p604 +g14 +sVbytary +p605 +NsVal +p606 +g14 +sVvn +p607 +VVoltage: A-B +p608 +sVct +p609 +Vnumber +p610 +sVle +p611 +V16 +p612 +sVgrp +p613 +V600 +p614 +sVla +p615 +g27 +sVchn +p616 +Vvoltage_ab +p617 +sVun +p618 +g31 +sVdn +p619 +Vsubmonitor +p620 +sVda +p621 +V247 +p622 +sVlrt +p623 +F1525815497.5719991 +sg38 +V0-600 +p624 +sg40 +V301 +p625 +sg42 +V2.0 +p626 +sVmisc_u +p627 +VV +p628 +sg44 +g45 +sVmrt +p629 +V10 +p630 +sg48 +Vdivide +p631 +sVm1ch +p632 +g602 +sg51 +VOn +p633 +sVmv +p634 +V10 +p635 +sg54 +Vint +p636 +sVvm +p637 +NssV2-1 +p638 +(dp639 +Vah +p640 +g14 +sVbytary +p641 +NsVal +p642 +g14 +sVvn +p643 +VAverage Voltage +p644 +sVct +p645 +Vnumber +p646 +sVle +p647 +V16 +p648 +sVgrp +p649 +V600 +p650 +sVla +p651 +g27 +sVchn +p652 +Vvoltage_average +p653 +sg256 +V0-600 +p654 +sVun +p655 +g233 +sVdn +p656 +Vsubmonitor +p657 +sVda +p658 +V247 +p659 +sVlrt +p660 +F1525815498.0583251 +sg240 +V300 +p661 +sg242 +V2.0 +p662 +sVmisc_u +p663 +VV +p664 +sg245 +g246 +sVmrt +p665 +V10 +p666 +sg249 +Vdivide +p667 +sVm1ch +p668 +g638 +sg254 +VOn +p669 +sVmv +p670 +V10 +p671 +sg258 +Vint +p672 +sVvm +p673 +NssV2-6 +p674 +(dp675 +Vah +p676 +g14 +sVbytary +p677 +NsVal +p678 +g14 +sVvn +p679 +VVoltage: L-N +p680 +sVct +p681 +Vnumber +p682 +sVle +p683 +V16 +p684 +sVgrp +p685 +V600 +p686 +sVla +p687 +g27 +sVchn +p688 +Vvoltage_ln +p689 +sVun +p690 +g233 +sVdn +p691 +Vsubmonitor +p692 +sVvm +p693 +NsVlrt +p694 +F1525815085.4837161 +sVda +p695 +V247 +p696 +sg240 +V304 +p697 +sg242 +V2 +p698 +sVmisc_u +p699 +g664 +sg245 +g246 +sVmrt +p700 +V10 +p701 +sg249 +Vdivide +p702 +sg251 +g674 +sVmv +p703 +V10 +p704 +sg254 +VOn +p705 +sg256 +V0-600 +p706 +sg258 +Vint +p707 +ssV2-7 +p708 +(dp709 +Vah +p710 +g14 +sVbytary +p711 +NsVal +p712 +g14 +sVvn +p713 +VFrequency +p714 +sVct +p715 +Vnumber +p716 +sVle +p717 +V16 +p718 +sVgrp +p719 +V600 +p720 +sVla +p721 +g27 +sVchn +p722 +Vfrequency +p723 +sVun +p724 +g233 +sVdn +p725 +Vsubmonitor +p726 +sVvm +p727 +NsVlrt +p728 +F1525814970.4699421 +sVda +p729 +V247 +p730 +sg240 +V305 +p731 +sg242 +V0.5 +p732 +sVmisc_u +p733 +VHz +p734 +sg245 +g246 +sVmrt +p735 +V10 +p736 +sg249 +Vdivide +p737 +sg251 +g708 +sVmv +p738 +V10 +p739 +sg254 +VOn +p740 +sg256 +V0-100 +p741 +sg258 +Vint +p742 +ssV2-4 +p743 +(dp744 +Vah +p745 +g14 +sVbytary +p746 +NsVal +p747 +g14 +sVvn +p748 +VVoltage: B-C +p749 +sVct +p750 +Vnumber +p751 +sVle +p752 +V16 +p753 +sVgrp +p754 +V600 +p755 +sVla +p756 +g27 +sVchn +p757 +Vvoltage_bc +p758 +sVun +p759 +g233 +sVdn +p760 +Vsubmonitor +p761 +sVvm +p762 +NsVlrt +p763 +F1525814994.487744 +sVda +p764 +V247 +p765 +sg240 +V302 +p766 +sg242 +g698 +sVmisc_u +p767 +g664 +sg245 +g246 +sVmrt +p768 +V10 +p769 +sg249 +Vdivide +p770 +sg251 +g743 +sVmv +p771 +V10 +p772 +sg254 +VOn +p773 +sg256 +V0-600 +p774 +sg258 +Vint +p775 +ssV2-5 +p776 +(dp777 +Vah +p778 +g14 +sVbytary +p779 +NsVal +p780 +g14 +sVvn +p781 +VVoltage: C-A +p782 +sVct +p783 +Vnumber +p784 +sVle +p785 +V16 +p786 +sVgrp +p787 +V600 +p788 +sVla +p789 +g27 +sVchn +p790 +Vvoltage_ca +p791 +sVun +p792 +g233 +sVdn +p793 +Vsubmonitor +p794 +sVvm +p795 +NsVlrt +p796 +F1525815503.6747411 +sVda +p797 +V247 +p798 +sg240 +V303 +p799 +sg242 +g698 +sVmisc_u +p800 +g664 +sg245 +g246 +sVmrt +p801 +V10 +p802 +sg249 +Vdivide +p803 +sg251 +g776 +sVmv +p804 +V10 +p805 +sg254 +VOn +p806 +sg256 +V0-600 +p807 +sg258 +Vint +p808 +ssV2-8 +p809 +(dp810 +Vah +p811 +g14 +sVbytary +p812 +NsVal +p813 +g14 +sVvn +p814 +VPhase Order +p815 +sVct +p816 +Vnumber +p817 +sVle +p818 +V16 +p819 +sVgrp +p820 +V600 +p821 +sVla +p822 +g27 +sVchn +p823 +Vphase_order +p824 +sVun +p825 +g233 +sVdn +p826 +Vsubmonitor +p827 +sVvm +p828 +NsVlrt +p829 +F1525815087.807087 +sVda +p830 +V247 +p831 +sg240 +V306 +p832 +sg242 +g233 +sVmisc_u +p833 +VABC/ACB +p834 +sg245 +g246 +sVmrt +p835 +V10 +p836 +sg249 +Vnone +p837 +sg251 +g809 +sVmv +p838 +g428 +sg254 +VOn +p839 +sg256 +V0-10 +p840 +sg258 +Vint +p841 +ssV2-9 +p842 +(dp843 +Vah +p844 +g14 +sVbytary +p845 +NsVal +p846 +g14 +sVvn +p847 +VVoltage Unbalance +p848 +sVct +p849 +Vnumber +p850 +sVle +p851 +V16 +p852 +sVgrp +p853 +V600 +p854 +sVla +p855 +g27 +sVchn +p856 +Vvoltage_unbalance +p857 +sVun +p858 +g233 +sVdn +p859 +Vsubmonitor +p860 +sVvm +p861 +NsVlrt +p862 +F1525815088.318854 +sVda +p863 +V247 +p864 +sg240 +V307 +p865 +sg242 +g233 +sVmisc_u +p866 +g320 +sg245 +g246 +sVmrt +p867 +V10 +p868 +sg249 +Vdivide +p869 +sg251 +g842 +sVmv +p870 +V10 +p871 +sg254 +VOn +p872 +sg256 +V0-150 +p873 +sg258 +Vint +p874 +ssV2-36 +p875 +(dp876 +Val +p877 +g14 +sVah +p878 +g14 +sVbytary +p879 +NsVvm +p880 +NsVvn +p881 +VAlarm 3 +p882 +sVct +p883 +Vnumber +p884 +sVle +p885 +V16 +p886 +sVgrp +p887 +V600 +p888 +sVla +p889 +g27 +sVchn +p890 +Valarm_3 +p891 +sVun +p892 +g31 +sVdn +p893 +Vsubmonitor +p894 +sVda +p895 +V247 +p896 +sVlrt +p897 +g37 +sg38 +V0-65535 +p898 +sg40 +V206 +p899 +sg42 +g31 +sVmisc_u +p900 +g14 +sg44 +g45 +sVmrt +p901 +V10 +p902 +sg48 +Vnone +p903 +sg50 +g875 +sg51 +VOn +p904 +sVmv +p905 +g37 +sg54 +Vint +p906 +ssV2-40 +p907 +(dp908 +Val +p909 +g14 +sVah +p910 +g14 +sVbytary +p911 +NsVvm +p912 +NsVvn +p913 +VMotor Run Time +p914 +sVct +p915 +Vnumber +p916 +sVle +p917 +V32 +p918 +sVgrp +p919 +V600 +p920 +sVla +p921 +NsVchn +p922 +Vmotor_run_time +p923 +sVun +p924 +g31 +sVdn +p925 +Vsubmonitor +p926 +sVda +p927 +V247 +p928 +sVlrt +p929 +g37 +sg38 +V0-1000000 +p930 +sg40 +V228 +p931 +sg42 +V10 +p932 +sVmisc_u +p933 +VHours +p934 +sg44 +g45 +sVmrt +p935 +V10 +p936 +sg48 +Vnone +p937 +sg50 +g907 +sg51 +VOn +p938 +sVmv +p939 +g37 +sg54 +Vfloat +p940 +ssV2-37 +p941 +(dp942 +Val +p943 +g14 +sVah +p944 +g14 +sVbytary +p945 +NsVvm +p946 +NsVvn +p947 +VAlarm 4 +p948 +sVct +p949 +Vnumber +p950 +sVle +p951 +V16 +p952 +sVgrp +p953 +V600 +p954 +sVla +p955 +g27 +sVchn +p956 +Valarm_4 +p957 +sVun +p958 +g31 +sVdn +p959 +Vsubmonitor +p960 +sVda +p961 +V247 +p962 +sVlrt +p963 +g37 +sg38 +V0-65535 +p964 +sg40 +V207 +p965 +sg42 +g31 +sVmisc_u +p966 +g14 +sg44 +g45 +sVmrt +p967 +V10 +p968 +sg48 +Vnone +p969 +sg50 +g941 +sg51 +VOn +p970 +sVmv +p971 +g37 +sg54 +Vint +p972 +ssV2-14 +p973 +(dp974 +Vah +p975 +g14 +sVbytary +p976 +NsVal +p977 +g14 +sVvn +p978 +VCurrent: B Phase +p979 +sVct +p980 +Vnumber +p981 +sVle +p982 +V16 +p983 +sVgrp +p984 +V600 +p985 +sVla +p986 +g27 +sVchn +p987 +Vcurrent_b +p988 +sVun +p989 +g233 +sVdn +p990 +Vsubmonitor +p991 +sVvm +p992 +NsVlrt +p993 +F1525815088.9524621 +sVda +p994 +V247 +p995 +sg240 +V313 +p996 +sg242 +g233 +sVmisc_u +p997 +g664 +sg245 +g246 +sVmrt +p998 +V10 +p999 +sg249 +Vdivide +p1000 +sg251 +g973 +sVmv +p1001 +V10 +p1002 +sg254 +VOn +p1003 +sg256 +V0-100 +p1004 +sg258 +Vint +p1005 +ssV2-15 +p1006 +(dp1007 +Vah +p1008 +g14 +sVbytary +p1009 +NsVal +p1010 +g14 +sVvn +p1011 +VCurrent: C Phase +p1012 +sVct +p1013 +Vnumber +p1014 +sVle +p1015 +V16 +p1016 +sVgrp +p1017 +V600 +p1018 +sVla +p1019 +g27 +sVchn +p1020 +Vcurrent_c +p1021 +sVun +p1022 +g233 +sVdn +p1023 +Vsubmonitor +p1024 +sVvm +p1025 +NsVlrt +p1026 +F1525815089.436875 +sVda +p1027 +V247 +p1028 +sg240 +V314 +p1029 +sg242 +g233 +sVmisc_u +p1030 +g592 +sg245 +g246 +sVmrt +p1031 +V10 +p1032 +sg249 +Vdivide +p1033 +sg251 +g1006 +sVmv +p1034 +V10 +p1035 +sg254 +VOn +p1036 +sg256 +V0-100 +p1037 +sg258 +Vint +p1038 +ssV2-16 +p1039 +(dp1040 +Vah +p1041 +g14 +sVbytary +p1042 +NsVal +p1043 +g14 +sVvn +p1044 +VCurrent: Ground +p1045 +sVct +p1046 +Vnumber +p1047 +sVle +p1048 +V16 +p1049 +sVgrp +p1050 +V600 +p1051 +sVla +p1052 +g27 +sVchn +p1053 +Vcurrent_ground +p1054 +sVun +p1055 +g233 +sVdn +p1056 +Vsubmonitor +p1057 +sVvm +p1058 +NsVlrt +p1059 +F1525815089.922854 +sVda +p1060 +V247 +p1061 +sg240 +V315 +p1062 +sg242 +g233 +sVmisc_u +p1063 +g592 +sg245 +g246 +sVmrt +p1064 +V10 +p1065 +sg249 +Vdivide +p1066 +sg251 +g1039 +sVmv +p1067 +V10 +p1068 +sg254 +VOn +p1069 +sg256 +V0-100 +p1070 +sg258 +Vint +p1071 +ssV2-17 +p1072 +(dp1073 +Vah +p1074 +g14 +sVbytary +p1075 +NsVal +p1076 +g14 +sVvn +p1077 +VCurrent Unbalance +p1078 +sVct +p1079 +Vnumber +p1080 +sVle +p1081 +V16 +p1082 +sVgrp +p1083 +V600 +p1084 +sVla +p1085 +g27 +sVchn +p1086 +Vcurrent_unbalance +p1087 +sVun +p1088 +g233 +sVdn +p1089 +Vsubmonitor +p1090 +sVvm +p1091 +NsVlrt +p1092 +F1525815090.4537922 +sVda +p1093 +V247 +p1094 +sg240 +V316 +p1095 +sg242 +V0.5 +p1096 +sVmisc_u +p1097 +g320 +sg245 +g246 +sVmrt +p1098 +V10 +p1099 +sg249 +Vdivide +p1100 +sg251 +g1072 +sVmv +p1101 +V10 +p1102 +sg254 +VOn +p1103 +sg256 +V0-150 +p1104 +sg258 +Vint +p1105 +ssV2-10 +p1106 +(dp1107 +Vah +p1108 +g14 +sVbytary +p1109 +NsVal +p1110 +g14 +sVvn +p1111 +VVoltage Min: A-B +p1112 +sVct +p1113 +Vnumber +p1114 +sVle +p1115 +V16 +p1116 +sVgrp +p1117 +V600 +p1118 +sVla +p1119 +g27 +sVchn +p1120 +Vvoltage_ab_min +p1121 +sVun +p1122 +g233 +sVdn +p1123 +Vsubmonitor +p1124 +sVvm +p1125 +NsVlrt +p1126 +F1525815068.0539379 +sVda +p1127 +V247 +p1128 +sg240 +V308 +p1129 +sg242 +g698 +sVmisc_u +p1130 +g664 +sg245 +g246 +sVmrt +p1131 +V10 +p1132 +sg249 +Vdivide +p1133 +sg251 +g1106 +sVmv +p1134 +V10 +p1135 +sg254 +VOn +p1136 +sg256 +V0-600 +p1137 +sg258 +Vint +p1138 +ssV2-11 +p1139 +(dp1140 +Vah +p1141 +g14 +sVbytary +p1142 +NsVal +p1143 +g14 +sVvn +p1144 +VVoltage Min: B-C +p1145 +sVct +p1146 +Vnumber +p1147 +sVle +p1148 +V16 +p1149 +sVgrp +p1150 +V600 +p1151 +sVla +p1152 +g27 +sVchn +p1153 +Vvoltage_bc_min +p1154 +sVun +p1155 +g233 +sVdn +p1156 +Vsubmonitor +p1157 +sVvm +p1158 +NsVlrt +p1159 +F1525815091.4213139 +sVda +p1160 +V247 +p1161 +sg240 +V309 +p1162 +sg242 +g698 +sVmisc_u +p1163 +g664 +sg245 +g246 +sVmrt +p1164 +V10 +p1165 +sg249 +Vdivide +p1166 +sg251 +g1139 +sVmv +p1167 +V10 +p1168 +sg254 +VOn +p1169 +sg256 +V0-600 +p1170 +sg258 +Vint +p1171 +ssV2-12 +p1172 +(dp1173 +Vah +p1174 +g14 +sVbytary +p1175 +NsVal +p1176 +g14 +sVvn +p1177 +VVoltage Min: C-A +p1178 +sVct +p1179 +Vnumber +p1180 +sVle +p1181 +V16 +p1182 +sVgrp +p1183 +V600 +p1184 +sVla +p1185 +g27 +sVchn +p1186 +Vvoltage_ca_min +p1187 +sVun +p1188 +g233 +sVdn +p1189 +Vsubmonitor +p1190 +sVvm +p1191 +NsVlrt +p1192 +F1525815091.9510889 +sVda +p1193 +V247 +p1194 +sg240 +V310 +p1195 +sg242 +g698 +sVmisc_u +p1196 +g664 +sg245 +g246 +sVmrt +p1197 +V10 +p1198 +sg249 +Vdivide +p1199 +sg251 +g1172 +sVmv +p1200 +V10 +p1201 +sg254 +VOn +p1202 +sg256 +V0-600 +p1203 +sg258 +Vint +p1204 +ssV2-13 +p1205 +(dp1206 +Vah +p1207 +g14 +sVbytary +p1208 +NsVal +p1209 +g14 +sVvn +p1210 +VCurrent: A Phase +p1211 +sVct +p1212 +Vnumber +p1213 +sVle +p1214 +V16 +p1215 +sVgrp +p1216 +V600 +p1217 +sVla +p1218 +g27 +sVchn +p1219 +Vcurrent_a +p1220 +sVun +p1221 +g233 +sVdn +p1222 +Vsubmonitor +p1223 +sVvm +p1224 +NsVlrt +p1225 +F1525815092.4871048 +sVda +p1226 +V247 +p1227 +sg240 +V312 +p1228 +sg242 +V0.5 +p1229 +sVmisc_u +p1230 +g592 +sg245 +g246 +sVmrt +p1231 +V10 +p1232 +sg249 +Vdivide +p1233 +sg251 +g1205 +sVmv +p1234 +V10 +p1235 +sg254 +VOn +p1236 +sg256 +V0-100 +p1237 +sg258 +Vint +p1238 +ssV2-38 +p1239 +(dp1240 +Val +p1241 +g14 +sVah +p1242 +g14 +sVbytary +p1243 +NsVvm +p1244 +NsVvn +p1245 +VAlarm 5 +p1246 +sVct +p1247 +Vnumber +p1248 +sVle +p1249 +V16 +p1250 +sVgrp +p1251 +V600 +p1252 +sVla +p1253 +g27 +sVchn +p1254 +Valarm_5 +p1255 +sVun +p1256 +g31 +sVdn +p1257 +Vsubmonitor +p1258 +sVda +p1259 +V247 +p1260 +sVlrt +p1261 +g37 +sg38 +V0-65535 +p1262 +sg40 +V208 +p1263 +sg42 +g31 +sVmisc_u +p1264 +g14 +sg44 +g45 +sVmrt +p1265 +V10 +p1266 +sg48 +Vnone +p1267 +sg50 +g1239 +sg51 +VOn +p1268 +sVmv +p1269 +g37 +sg54 +Vint +p1270 +ssV2-39 +p1271 +(dp1272 +Val +p1273 +g14 +sVah +p1274 +g14 +sVbytary +p1275 +NsVvm +p1276 +NsVvn +p1277 +VV1/V2 Status +p1278 +sVct +p1279 +Vnumber +p1280 +sVle +p1281 +V16 +p1282 +sVgrp +p1283 +V600 +p1284 +sVla +p1285 +g27 +sVchn +p1286 +Vterminal_v1_v2 +p1287 +sVun +p1288 +g31 +sVdn +p1289 +Vsubmonitor +p1290 +sVda +p1291 +V247 +p1292 +sVlrt +p1293 +g37 +sg38 +V0-65535 +p1294 +sg40 +V214 +p1295 +sg42 +g31 +sVmisc_u +p1296 +g14 +sg44 +g45 +sVmrt +p1297 +V10 +p1298 +sg48 +Vnone +p1299 +sg50 +g1271 +sg51 +VOn +p1300 +sVmv +p1301 +g37 +sg54 +Vint +p1302 +ssV2-18 +p1303 +(dp1304 +Vah +p1305 +g14 +sVbytary +p1306 +NsVal +p1307 +g14 +sVvn +p1308 +VCurrent Peak +p1309 +sVct +p1310 +Vnumber +p1311 +sVle +p1312 +V16 +p1313 +sVgrp +p1314 +V600 +p1315 +sVla +p1316 +g27 +sVchn +p1317 +Vcurrent_peak +p1318 +sVun +p1319 +g233 +sVdn +p1320 +Vsubmonitor +p1321 +sVvm +p1322 +NsVlrt +p1323 +F1525815093.2170552 +sVda +p1324 +V247 +p1325 +sg240 +V317 +p1326 +sg242 +g233 +sVmisc_u +p1327 +g592 +sg245 +g246 +sVmrt +p1328 +V10 +p1329 +sg249 +Vdivide +p1330 +sg251 +g1303 +sVmv +p1331 +V10 +p1332 +sg254 +VOn +p1333 +sg256 +V0-150 +p1334 +sg258 +Vint +p1335 +ssV2-19 +p1336 +(dp1337 +Vah +p1338 +g14 +sVbytary +p1339 +NsVal +p1340 +g14 +sVvn +p1341 +VPower: kW +p1342 +sVct +p1343 +Vnumber +p1344 +sVle +p1345 +V16 +p1346 +sVgrp +p1347 +V600 +p1348 +sVla +p1349 +g27 +sVchn +p1350 +Vpower_kw +p1351 +sVun +p1352 +g233 +sVdn +p1353 +Vsubmonitor +p1354 +sVvm +p1355 +NsVlrt +p1356 +F1525815093.7597689 +sVda +p1357 +V247 +p1358 +sg240 +V318 +p1359 +sg242 +g456 +sVmisc_u +p1360 +VkW +p1361 +sg245 +g246 +sVmrt +p1362 +V10 +p1363 +sg249 +Vdivide +p1364 +sg251 +g1336 +sVmv +p1365 +V10 +p1366 +sg254 +VOn +p1367 +sg256 +V0-65535 +p1368 +sg258 +Vint +p1369 +ssssS'f' +p1370 +VOff +p1371 +sS'p' +p1372 +g14 +sS's' +p1373 +V2 +p1374 +ssS'2' +p1375 +(dp1376 +g3 +VM1-485 +p1377 +sg5 +V9600 +p1378 +sg7 +(dp1379 +sg1370 +VOff +p1380 +sg1372 +VNone +p1381 +sg1373 +g31 +ss. \ No newline at end of file diff --git a/submonitor/python-driver/persistence.py b/submonitor/python-driver/persistence.py new file mode 100644 index 0000000..8c8703f --- /dev/null +++ b/submonitor/python-driver/persistence.py @@ -0,0 +1,21 @@ +"""Data persistance functions.""" +# if more advanced persistence is needed, use a sqlite database +import json + + +def load(filename="persist.json"): + """Load persisted settings from the specified file.""" + try: + with open(filename, 'r') as persist_file: + return json.load(persist_file) + except Exception: + return False + + +def store(persist_obj, filename="persist.json"): + """Store the persisting settings into the specified file.""" + try: + with open(filename, 'w') as persist_file: + return json.dump(persist_obj, persist_file, indent=4) + except Exception: + return False diff --git a/submonitor/python-driver/submonitor.py b/submonitor/python-driver/submonitor.py new file mode 100644 index 0000000..4d891a5 --- /dev/null +++ b/submonitor/python-driver/submonitor.py @@ -0,0 +1,62 @@ +"""Driver for submonitor""" + +import threading +import sys +from device_base import deviceBase +import time +import logging + +_ = None + +# LOGGING SETUP +from logging.handlers import RotatingFileHandler + +log_formatter = logging.Formatter('%(asctime)s %(levelname)s %(funcName)s(%(lineno)d) %(message)s') +logFile = './submonitor.log' +my_handler = RotatingFileHandler(logFile, mode='a', maxBytes=500*1024, backupCount=2, encoding=None, delay=0) +my_handler.setFormatter(log_formatter) +my_handler.setLevel(logging.INFO) +logger = logging.getLogger('submonitor') +logger.setLevel(logging.INFO) +logger.addHandler(my_handler) + +console_out = logging.StreamHandler(sys.stdout) +console_out.setFormatter(log_formatter) +logger.addHandler(console_out) + +logger.info("submonitor startup") + + +class start(threading.Thread, deviceBase): + """Start class required by Meshify.""" + + def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None): + """Initialize the driver.""" + threading.Thread.__init__(self) + deviceBase.__init__(self, name=name, number=number, mac=mac, Q=Q, mcu=mcu, companyId=companyId, offset=offset, mqtt=mqtt, Nodes=Nodes) + + self.daemon = True + self.version = "2" + self.finished = threading.Event() + self.forceSend = False + threading.Thread.start(self) + + # this is a required function for all drivers, its goal is to upload some piece of data + # about your device so it can be seen on the web + def register(self): + """Register the driver.""" + # self.sendtodb("log", "BOOM! Booted.", 0) + pass + + def run(self): + """Actually run the driver.""" + wait_sec = 60 + for i in range(0, wait_sec): + print("submonitor driver will start in {} seconds".format(wait_sec - i)) + time.sleep(1) + logger.info("BOOM! Starting submonitor driver...") + + while True: + time.sleep(15) + print("submonitor driver still alive...") + diff --git a/submonitor/python-driver/utilities.py b/submonitor/python-driver/utilities.py new file mode 100644 index 0000000..58c7ab0 --- /dev/null +++ b/submonitor/python-driver/utilities.py @@ -0,0 +1,51 @@ +"""Utility functions for the driver.""" +import socket +import struct + + +def get_public_ip_address(): + """Find the public IP Address of the host device.""" + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.connect(("8.8.8.8", 80)) + ip = s.getsockname()[0] + s.close() + return ip + + +def int_to_float16(int_to_convert): + """Convert integer into float16 representation.""" + bin_rep = ('0' * 16 + '{0:b}'.format(int_to_convert))[-16:] + sign = 1.0 + if int(bin_rep[0]) == 1: + sign = -1.0 + exponent = float(int(bin_rep[1:6], 2)) + fraction = float(int(bin_rep[6:17], 2)) + + if exponent == float(0b00000): + return sign * 2 ** -14 * fraction / (2.0 ** 10.0) + elif exponent == float(0b11111): + if fraction == 0: + return sign * float("inf") + else: + return float("NaN") + else: + frac_part = 1.0 + fraction / (2.0 ** 10.0) + return sign * (2 ** (exponent - 15)) * frac_part + + +def ints_to_float(int1, int2): + """Convert 2 registers into a floating point number.""" + mypack = struct.pack('>HH', int1, int2) + f = struct.unpack('>f', mypack) + print("[{}, {}] >> {}".format(int1, int2, f[0])) + return f[0] + + +def degf_to_degc(temp_f): + """Convert deg F to deg C.""" + return (temp_f - 32.0) * (5.0/9.0) + + +def degc_to_degf(temp_c): + """Convert deg C to deg F.""" + return temp_c * 1.8 + 32.0