From 94f3190bcf93ccee4ef9e6dc702d9777559e65c0 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Tue, 13 Dec 2016 18:27:12 -0600 Subject: [PATCH] Initial Commit. Version 1 of POCloud driver --- History.html | 16 + NodeDetailHeader.html | 6 + NodeList.html | 41 +++ Overview.html | 322 +++++++++++++++++ abbflow.py | 24 ++ config.txt | 11 + modbusMap.p | 805 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1225 insertions(+) create mode 100644 History.html create mode 100644 NodeDetailHeader.html create mode 100644 NodeList.html create mode 100644 Overview.html create mode 100644 abbflow.py create mode 100644 config.txt create mode 100644 modbusMap.p diff --git a/History.html b/History.html new file mode 100644 index 0000000..0f9bf4d --- /dev/null +++ b/History.html @@ -0,0 +1,16 @@ +
+ diff --git a/NodeDetailHeader.html b/NodeDetailHeader.html new file mode 100644 index 0000000..28262a3 --- /dev/null +++ b/NodeDetailHeader.html @@ -0,0 +1,6 @@ +
+
+
+
+

<%= node.vanityname %>

+
diff --git a/NodeList.html b/NodeList.html new file mode 100644 index 0000000..5ec2a87 --- /dev/null +++ b/NodeList.html @@ -0,0 +1,41 @@ + + +
+
+
+
+ +
+ +
+ +
+

<%= node.vanityname %>

+
+ +
+

Volume Flow

+

<%= channels["abbflow.volume_flow"].value %> MCF/Day

+
+ +
+

Today Volume

+

<%= channels["abbflow.today_volume"].value %> MCF

+
+
diff --git a/Overview.html b/Overview.html new file mode 100644 index 0000000..a6bb31c --- /dev/null +++ b/Overview.html @@ -0,0 +1,322 @@ +
+
+

Volume Flow

+
+
+
+
+ + + +
+ + <%= channels["abbflow.volume_flow"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Today Volume

+
+
+
+
+ + + +
+ + <%= channels["abbflow.today_volume"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Accumulated Volume

+
+
+
+
+ + + +
+ + <%= channels["abbflow.accumulated_volume"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Differential Pressure

+
+
+
+
+ + + +
+ + <%= channels["abbflow.differential_pressure"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Static Pressure

+
+
+
+
+ + + +
+ + <%= channels["abbflow.static_pressure"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Temperature

+
+
+
+
+ + + +
+ + <%= channels["abbflow.temperature"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Battery Voltage

+
+
+
+
+ + + +
+ + <%= channels["abbflow.battery_voltage"].timestamp %> + +
+
+
+
+
+
+ +
+
+

Yesterday Volume

+
+
+
+
+ + + +
+ + <%= channels["abbflow.yesterday_volume"].timestamp %> + +
+
+ +
+

Last Calc. Period Volume

+
+
+
+
+ + + +
+ + <%= channels["abbflow.last_calculation_period_volume"].timestamp %> + +
+
+
+ + diff --git a/abbflow.py b/abbflow.py new file mode 100644 index 0000000..b797358 --- /dev/null +++ b/abbflow.py @@ -0,0 +1,24 @@ + +import threading +import time +from device_base import deviceBase + + + +class start(threading.Thread, deviceBase): + def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None): + 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 = "1" + self.finished = threading.Event() + 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): + self.channels["status"]["last_value"] = "" + + def run(self): + pass diff --git a/config.txt b/config.txt new file mode 100644 index 0000000..e7d0fff --- /dev/null +++ b/config.txt @@ -0,0 +1,11 @@ +{ + +"driverFileName":"abbflow.py", +"deviceName":"abbflow", +"driverId":"0110", +"releaseVersion":"1", +"files": { + "file1":"abbflow.py", + "file2":"modbusMap.p" } + +} diff --git a/modbusMap.p b/modbusMap.p new file mode 100644 index 0000000..6f2433e --- /dev/null +++ b/modbusMap.p @@ -0,0 +1,805 @@ +(dp0 +S'1' +p1 +(dp2 +S'c' +p3 +VM1-232 +p4 +sS'b' +p5 +V9600 +p6 +sS'addresses' +p7 +(dp8 +V1 +p9 +(dp10 +V2-2 +p11 +(dp12 +Vah +p13 +V +p14 +sVbytary +p15 +NsVal +p16 +g14 +sVvn +p17 +VVolume Flow +p18 +sVct +p19 +Vnumber +p20 +sVle +p21 +V32 +p22 +sVgrp +p23 +V3600 +p24 +sVla +p25 +F0.0 +sVchn +p26 +Vvolume_flow +p27 +sVr +p28 +V0-5000 +p29 +sVun +p30 +V1 +p31 +sVdn +p32 +Vabbflow +p33 +sVda +p34 +g31 +sVlrt +p35 +F1481665506.409151 +sVa +p36 +V4003 +p37 +sVc +p38 +V5 +p39 +sVmisc_u +p40 +VMCF/Day +p41 +sVf +p42 +V4 +p43 +sVmrt +p44 +V60 +p45 +sVm +p46 +Vnone +p47 +sVm1ch +p48 +g11 +sVs +p49 +VOn +p50 +sVmv +p51 +V0 +p52 +sVt +p53 +Vfloat +p54 +sVvm +p55 +NssV2-3 +p56 +(dp57 +Vah +p58 +g14 +sVbytary +p59 +NsVal +p60 +g14 +sVvn +p61 +VToday Volume +p62 +sVct +p63 +Vnumber +p64 +sVle +p65 +V32 +p66 +sVgrp +p67 +V3600 +p68 +sVla +p69 +g14 +sVchn +p70 +Vtoday_volume +p71 +sg28 +V1-1000000 +p72 +sVun +p73 +g31 +sVdn +p74 +Vabbflow +p75 +sVda +p76 +g31 +sVlrt +p77 +F1481590490.5919009 +sg36 +V4005 +p78 +sg38 +V10 +p79 +sVmisc_u +p80 +VMCF +p81 +sg42 +g43 +sVmrt +p82 +V60 +p83 +sg46 +Vnone +p84 +sVm1ch +p85 +g56 +sg49 +VOn +p86 +sVmv +p87 +g52 +sg53 +Vfloat +p88 +sVvm +p89 +NssV2-1 +p90 +(dp91 +Vah +p92 +g14 +sVbytary +p93 +NsVal +p94 +g14 +sVvn +p95 +VBattery Voltage +p96 +sVct +p97 +Vnumber +p98 +sVle +p99 +V32 +p100 +sVgrp +p101 +V3600 +p102 +sVla +p103 +F12.687 +sVchn +p104 +Vbattery_voltage +p105 +sVun +p106 +g31 +sVdn +p107 +Vabbflow +p108 +sVda +p109 +g31 +sVlrt +p110 +F1481664978.7650189 +sg36 +V4001 +p111 +sg38 +V0.1 +p112 +sVmisc_u +p113 +VV +p114 +sg42 +g43 +sVmrt +p115 +V60 +p116 +sg46 +Vnone +p117 +sVm1ch +p118 +g90 +sVmv +p119 +g52 +sg49 +VOn +p120 +sg28 +V0-50 +p121 +sg53 +Vfloat +p122 +sVvm +p123 +NssV2-6 +p124 +(dp125 +Vah +p126 +g14 +sVbytary +p127 +NsVal +p128 +g14 +sVvn +p129 +VLast Calc. Period Volume +p130 +sVct +p131 +Vnumber +p132 +sVle +p133 +V32 +p134 +sVgrp +p135 +V86400 +p136 +sVla +p137 +I0 +sVchn +p138 +Vlast_calculation_period_volume +p139 +sg28 +V0-1000000 +p140 +sVun +p141 +g31 +sVdn +p142 +Vabbflow +p143 +sVda +p144 +g31 +sVlrt +p145 +F1481664271.338836 +sg36 +V4011 +p146 +sg38 +V10 +p147 +sVmisc_u +p148 +VSCF +p149 +sg42 +g43 +sVmrt +p150 +V60 +p151 +sg46 +Vnone +p152 +sVm1ch +p153 +g124 +sg49 +VOn +p154 +sVmv +p155 +g52 +sg53 +Vfloat +p156 +sVvm +p157 +NssV2-7 +p158 +(dp159 +Vah +p160 +g14 +sVbytary +p161 +NsVal +p162 +g14 +sVvn +p163 +VDifferential Pressure +p164 +sVct +p165 +Vnumber +p166 +sVle +p167 +V32 +p168 +sVgrp +p169 +V3600 +p170 +sVla +p171 +I0 +sVchn +p172 +Vdifferential_pressure +p173 +sg28 +V0-500 +p174 +sVun +p175 +g31 +sVdn +p176 +Vabbflow +p177 +sVda +p178 +g31 +sVlrt +p179 +F1481664272.8823945 +sg36 +V4013 +p180 +sg38 +V0.5 +p181 +sVmisc_u +p182 +VInH20 +p183 +sg42 +g43 +sVmrt +p184 +V60 +p185 +sg46 +Vnone +p186 +sVm1ch +p187 +g158 +sg49 +VOn +p188 +sVmv +p189 +g52 +sg53 +Vfloat +p190 +sVvm +p191 +NssV2-4 +p192 +(dp193 +Vah +p194 +g14 +sVbytary +p195 +NsVal +p196 +g14 +sVvn +p197 +VYesterday Volume +p198 +sVct +p199 +Vnumber +p200 +sVle +p201 +V32 +p202 +sVgrp +p203 +V86400 +p204 +sVla +p205 +I0 +sVchn +p206 +Vyesterday_volume +p207 +sg28 +V0-1000000 +p208 +sVun +p209 +g31 +sVdn +p210 +Vabbflow +p211 +sVda +p212 +g31 +sVlrt +p213 +F1481664274.457978 +sg36 +V4007 +p214 +sg38 +V10 +p215 +sVmisc_u +p216 +VMCF +p217 +sg42 +g43 +sVmrt +p218 +V60 +p219 +sg46 +Vnone +p220 +sVm1ch +p221 +g192 +sg49 +VOn +p222 +sVmv +p223 +g52 +sg53 +Vfloat +p224 +sVvm +p225 +NssV2-5 +p226 +(dp227 +Vah +p228 +g14 +sVbytary +p229 +NsVal +p230 +g14 +sVvn +p231 +VAccumulated Volume +p232 +sVct +p233 +Vnumber +p234 +sVle +p235 +V32 +p236 +sVgrp +p237 +V3600 +p238 +sVla +p239 +I0 +sVchn +p240 +Vaccumulated_volume +p241 +sg28 +V0-1000000 +p242 +sVun +p243 +g31 +sVdn +p244 +Vabbflow +p245 +sVda +p246 +g31 +sVlrt +p247 +F1481664275.9187859 +sg36 +V4009 +p248 +sg38 +V10 +p249 +sVmisc_u +p250 +VMCF +p251 +sg42 +g43 +sVmrt +p252 +V60 +p253 +sg46 +Vnone +p254 +sVm1ch +p255 +g226 +sg49 +VOn +p256 +sVmv +p257 +g52 +sg53 +Vfloat +p258 +sVvm +p259 +NssV2-8 +p260 +(dp261 +Vah +p262 +g14 +sVbytary +p263 +NsVal +p264 +g14 +sVvn +p265 +VStatic Pressure +p266 +sVct +p267 +Vnumber +p268 +sVle +p269 +V32 +p270 +sVgrp +p271 +V3600 +p272 +sVla +p273 +F13.342 +sVchn +p274 +Vstatic_pressure +p275 +sg28 +V0-250 +p276 +sVdn +p277 +Vabbflow +p278 +sVda +p279 +g31 +sVlrt +p280 +F1481664930.7485411 +sg36 +V4015 +p281 +sg38 +V0.5 +p282 +sVmisc_u +p283 +VPSIA +p284 +sg42 +g43 +sVmrt +p285 +V60 +p286 +sg46 +Vnone +p287 +sVm1ch +p288 +g260 +sVmv +p289 +g52 +sg49 +VOn +p290 +sVun +p291 +g31 +sg53 +Vfloat +p292 +sVvm +p293 +NssV2-9 +p294 +(dp295 +Vah +p296 +g14 +sVbytary +p297 +NsVal +p298 +g14 +sVvn +p299 +VTemperature +p300 +sVct +p301 +Vnumber +p302 +sVle +p303 +V32 +p304 +sVgrp +p305 +V3600 +p306 +sVla +p307 +F67.355 +sVchn +p308 +Vtemperature +p309 +sg28 +V0-300 +p310 +sVdn +p311 +Vabbflow +p312 +sVda +p313 +g31 +sVlrt +p314 +F1481664950.9089381 +sg36 +V4017 +p315 +sg38 +V0.5 +p316 +sVmisc_u +p317 +Vdeg F +p318 +sg42 +g43 +sVmrt +p319 +V60 +p320 +sg46 +Vnone +p321 +sVm1ch +p322 +g294 +sVmv +p323 +g52 +sg49 +VOn +p324 +sVun +p325 +g31 +sg53 +Vfloat +p326 +sVvm +p327 +NssssS'f' +p328 +VOff +p329 +sS'p' +p330 +g14 +sS's' +p331 +g31 +ssS'2' +p332 +(dp333 +g3 +VM1-232 +p334 +sg5 +V9600 +p335 +sg7 +(dp336 +sg328 +VOff +p337 +sg330 +g14 +sg331 +g31 +ss. \ No newline at end of file