├── .gitattributes
├── .gitignore
├── Changelog.md
├── LICENSE
├── Nextion
├── AN16.zi
├── AN24.zi
├── AN24_e.zi
├── AN32.zi
├── AN72.zi
├── Background_1_Template.pxf
├── Button0.png
├── Button1.png
├── Button2.png
├── Button3.png
├── Err_Red.png
├── HMI2_Calibs.png
├── HMI2_Home.png
├── HMI2_Settings.png
├── HMI2_Settings_Err.png
├── HMI2_Settings_Errp2.png
├── HMI2_Settings_Errp3.png
├── HMI2_Switches.png
├── HMI_Errors.png
├── KeyPadButton1.png
├── KeyPadButton2.png
├── NetW.png
├── NoNetW.png
├── OFFs.png
├── OK.png
├── OK2.png
├── OK_L1.png
├── OK_L2.png
├── OK_L3.png
├── ONs.png
├── PoolMaster.HMI
└── PoolMaster.tft
├── NodeRed
├── Grafana_Dashboard.json
├── Node-Red Dashboard Poolmaster v5.0.2.json
├── Node-Red to Influxdb Poolmaster v5.0.json
├── NodeRed-to-Blynk.jpg
└── NodeRedFlow.txt
├── README.md
├── docs
├── Blynk.jpg
├── Blynk2.jpg
├── CONTROLLINO_MAXI_Pinout_Table.pdf
├── Grafana.png
├── JeedomInterface.jpg
├── JeedomInterface.png
├── MeasuringChamberPickup.JPG
├── Nextion.png
├── NodeRedDashboard.png
├── OneWayInjectionNozzles.JPG
├── Plumbing.png
├── PoolMaster.jpg
├── PoolMasterBox_pf.jpg
├── PoolMasterIntegration.png
├── PoolMaster_2.jpg
├── PoolMaster_3.jpg
├── Probes cross-talk test.jpg
├── Reaction_to_pH_plus.png
├── TemperatureProbe.JPG
├── TuileJeedom.jpg
├── VirtuelJeedom.jpg
├── VirtuelJeedom_pf.jpg
└── Wiring.jpg
├── libraries
└── Dependencies.txt
└── source
└── PoolMaster
├── Config.h
├── DebugUtils.h
├── EthernetSetup.ino
├── Nextion.ino
├── PoolMaster.ino
├── Pump.cpp
├── Pump.h
└── RTC_Sync.ino
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Explicitly declare text files you want to always be normalized and converted
2 | # to native line endings on checkout.
3 | *.c text
4 | *.cpp text
5 | *.h text
6 | *.ino text
7 |
8 | *.png binary
9 | *.jpg binary
10 | *.HMI binary
11 | *.tft binary
12 | *.pxf binary
13 | *.zi binary
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | source/PoolMaster/Config.h
3 | source/PoolMaster/Config.h
4 | source/PoolMaster/Config.h
5 | source/PoolMaster/Config.h
6 | source/PoolMaster/Config.h
7 | source/PoolMaster/Config.h
8 | source/PoolMaster/Config.h
9 | source/PoolMaster/Config.h
10 | TODO.txt
11 | source/PoolMaster/Config.h
12 |
--------------------------------------------------------------------------------
/Changelog.md:
--------------------------------------------------------------------------------
1 | PoolMaster: change log
2 | =======================
3 | v6.0.0
4 | -------
5 |
6 | * replaced the commercial and analog Phidget and Gravity boards by the pH_Orp_Board (https://github.com/Loic74650/pH_Orp_Board) to interface the pH and Orp probes
7 | * removed the Liquid crystal display from the code
8 | * clock on Nextion screen now makes use of Nextion onboard RTC. Nextion screen firmware must also be updated
9 |
10 | v5.0.1
11 | -------
12 |
13 | * bug fix: filtration start/stop hours now displayed properly on Nextion screen
14 | * added {"URTC":1} API function. This function launches an automatic update of Date/Time of RTC by sending an NTP request to a time server (requires an internet connection)
15 | * Updated font color of Nextion screen. Measurement values now displayed in white
16 |
17 | v5.0.0
18 | -------
19 |
20 | * /!\ API change: Measurements are now published on 2 different topics: PoolTopicMeasurement1 and PoolTopicMeasurement2
21 | This is necessary because the MQTT library is limited to sending messages with payloads shorter than 100 bytes or so, so all the measurements must be split over 2 MQTT messages. Moreover, in order to have them retained, they must be sent to 2 different topics.
22 | * /!\ API change: PublishSettings() is a new function which publishes the program settings on 5 different topics: PoolTopicSettings1 to PoolTopicSettings5 for the same reasons as above. This function is called at startup and when a setting is changed via the API or the touch screen (in the future). Example published settings are:
23 |
24 | {"Fw":"4.0.7","FSta":8,"FDu":12,"FStoM":20,"FSto":20,"Dpid":59,"pHUTL":30,"ChlUTL":30}
25 | {"pHWS":50,"ChlWS":120,"pHSP":740,"OrpSP":600,"WSP":2750,"WLT":1000,"PSIHT":50,"PSIMT":25}
26 | {"TE":2262,"pHC0":4.3,"pHC1":-2.63,"OrpC0":-1189,"OrpC1":2564,"PSIC0":1.11,"PSIC1":0}
27 | {"pHKp":2000000,"pHKi":0,"pHKd":0,"OrpKp":2500,"OrpKi":0,"OrpKd":0}
28 | {"pHTV":20,"ChlTV":20,"pHFR":1.5,"OrpFR":3}
29 |
30 | See code of function PublishSettings() for details
31 |
32 | * All MQTT publishes are now in retain mode in order to sync more efficiently MQTT clients with the controller
33 | * Added a new command to reboot the controller: {"Reboot":1}
34 | * Added new commands to set the Chl and Acid pumps Flow Rates: {"pHPumpFR":1.5} & {"ChlPumpFR":3.0}
35 | * Added new commands to reset the probes and sensor calibration coefficients: {"RstpHCal":1} & {"RstOrpCal":1} & {"RstPSICal":1}
36 | * DelayPIDs now re-applied when filtration stopped and restarted by double-tap on panel button
37 | * Daily synchronization of RTC with a time server if ethernet connection available
38 | * First version of NEXTION 3.5" TFT display support
39 | * pH, Orp and Water temperature setpoints can be adjusted via TFT by pressing on the setpoints (for pH and Orp) or the water temp displays
40 | * Changed "queue" library to fix non-released memory issue
41 | * added ethernet connectivity setup webpage accessible at http://PoolMaster.local (in an MDNS / Bonjour! enabled environment/browser)
42 |
43 | v4.0.6
44 | -------
45 |
46 | * Added profiling utility to measure duration of PublishCallback. In the Config.h file, uncomment the line #define DEBUG and place DEBUG_PRINT("something") functions in the code. It will output profiling info (timestamp, function name, message) to the serial monitor
47 |
48 | v4.0.5
49 | -------
50 |
51 | * Moved all config parameters (login/password, IP address, MAC address, temp probes addresses, pin numbers, etc) which are specific to each hardware setup to a "Config.h" file, separate from the main sketch.
52 | * Reduced timeout of MQTT connect function to 2secs in order to avoid Watchdog Timer from rebooting the controller in case Ethernet connection is lost. Controller still won't boot properly in case Ethernet conenction is not present at boot time (due to long DHCP timeout), this will be handled in a future revision
53 |
54 | v4.0.4
55 | -------
56 |
57 | * Added double-tap functionality to front-panel button in order to manually start/stop filtration in case you want to do a backwash or need to do some maintenance on your system (and you don't have a mobile or computer at hand to use the API).
58 | * When rebooting controller during filtration hours, filtration starts (bug fix)
59 | * This code requires two new libraries to compile, see dependencies.txt file
60 |
61 | v4.0.3
62 | -------
63 |
64 | * Added calibration function for the water pressure sensor {"PSICalib":[0,0,0.71,0.6]}
65 | * Added generic function {"Relay":[1,1]} to actuate spare relays. Useful to add custom control features to the project such as lighting, etc
66 |
67 | v4.0.0
68 | -------
69 |
70 | * Starting and stopping PIDs when filtration is manually started/stopped. This is useful in spring when the water is cold, filtrations tops early, however one might wish to manually start it in the afternoon and have the PIDs regulating the water quality
71 |
72 | v4.0.0
73 | -------
74 |
75 | * Acid and Chlorine tank levels are now estimated and reported in % fill (estimation based on the running-time of each pump)
76 | * /!\ API change. MQTT published payloads now also include stored Orp, pH and Water temp setpoints as well as tank-level estimates. Two separate publishes are used in order to reduce the payload size of each publish
77 | * A daily 2 minutes cycling of the water heating circulator has been added in order to maintain it in good condition when not being used for long period of times (eg. in winter)
78 | * Pump class now support setups in which PoolMaster does not manage the filtration pump (eg. in cases where an already-installed automate handles it). See Pump class for more info
79 | * Node Red code example now includes feeding the MQTT data into an InfluxBD database in order to generate a Grafana Dashboard (code for the node red flow and the Grafana dashboard is provided)
80 |
81 | v3.1.2
82 | -------
83 |
84 | * fixed bug preventing from operating the pH and Orp pumps manually when MODE was in MANUAL mode
85 |
86 | v3.1.0
87 | -------
88 |
89 | * new regulation loop to regulate the water temperature. It starts/stops the house-heating system circulator which brings heat to a heat exchanger mounted on the pool water pipes
90 | * new API function to switch on/off the water heating regulation loop
91 |
92 | v3.0.3
93 | -------
94 |
95 | * Added support for a front panel push-button with a red LED-ring. It enables toggling between LCD screens (short press) and clearing errors (long-press). When a system-error occurs (eg. empty chemical tank, low-water pressure or chemical-pump overtime) the front-panel push-button red LED-ring starts blinking, calling for attention.
96 | * Adjusted default PID constants
97 |
98 | v3.0.1
99 | -------
100 |
101 | * improved security at Pumps level so that Orp and pH pumps cannot run and/or stop if Filtration is not running/stopped
102 | * fixed bug. Now when filtration pump is running but water pressure remains low, filtration pump is really stopped
103 |
104 | v3.0.0
105 | -------
106 |
107 | * modified anti-freeze filtration behaviour. It now starts filtration when outside air temperature goes below -2.0deg and stops it when it rises back above +2.0deg
108 | * added support for a water pressure sensor. A water pressure which increases above a certain threshold can be an indication that the sand filter requires cleaning). When filtration is running but water pressure is below a certain threshold (ie. something is wrong), filtration is automatically stopped as a safety precaution
109 | * Added better support for the Arduino Mega2560 platform. Should now compile without any code modification
110 | * Added the "Pump" class to improve quality of code and easier integration of additional pumps in the future if required (eg. pH+ pump)
111 | * Added integration example into cloud-based BLYNK smart phone application via NodeRed
112 | * /!\ API change. The measured data and the IO and IO2 bitmaps which are published to the MQTT broker have been modified in order to accomodate the water pressure readings
113 |
114 | v2.1.2
115 | -------
116 |
117 | * changed Eeprom config storage handling
118 | * added incoming MQTT message queue to reduce load on MQTT callback function (causing spurious socket errors and subsequent disconnections from broker)
119 | * Ethernet deconnection now non-blocking
120 | * Some minor changes
121 |
122 | v2.1.1
123 | -------
124 |
125 | * fixed bug in AntiFreeze filtration function
126 | * updated documentation
127 |
128 | v2.1.0
129 | -------
130 |
131 | * LCD display now toggles between two screens every 6 seconds, shows more info
132 | * modified PhPump() and ChlPump() functions to prevent the pumps from starting if Tank Levels are low
133 | * Tanks Level errors now display error code on the LCD display but do not disable the PID loops or the filtering pûmp anymore, only the peristaltic pumps
134 | * PID regulation loops start are now delayed for 30mins (by default) after the filtration start in order to let the readings stabilize first
135 | * New API function to tell the system what the external temperature is. This is used to start regular short filtering periods of 10mins every hour when external temperature is below 2deg.
136 | * Improved PID loops tuning
137 |
138 | v2.0.1
139 | -------
140 |
141 | * /!\ changed CONTROLLINO pin number for the PH_PUMP
142 | * Tuned PID parameters
143 | * fixed bug in Mode API function
144 |
145 | v2.0.0
146 | -------
147 |
148 | * New API function for multi-point linear regression calibration of pH and Orp sensors
149 | * Former API function for the Offset Calibration of the pH and Orp sensors are no longer available
150 | * getMeasures() function now based on calibrated linear function to compute pH and Orp values
151 | * PublishDataCallback() function now using ArduinoJSON library to generate payload
152 | * Eeprom, Webserver and XML file now store/display the calibration coefficients for the pH and Orp sensors
153 |
154 | v1.0.0
155 | -------
156 |
157 | * First release
158 | * LCD display support
159 | * MQTT API
160 | * Updated hardware list
161 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/Nextion/AN16.zi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/AN16.zi
--------------------------------------------------------------------------------
/Nextion/AN24.zi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/AN24.zi
--------------------------------------------------------------------------------
/Nextion/AN24_e.zi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/AN24_e.zi
--------------------------------------------------------------------------------
/Nextion/AN32.zi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/AN32.zi
--------------------------------------------------------------------------------
/Nextion/AN72.zi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/AN72.zi
--------------------------------------------------------------------------------
/Nextion/Background_1_Template.pxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Background_1_Template.pxf
--------------------------------------------------------------------------------
/Nextion/Button0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Button0.png
--------------------------------------------------------------------------------
/Nextion/Button1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Button1.png
--------------------------------------------------------------------------------
/Nextion/Button2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Button2.png
--------------------------------------------------------------------------------
/Nextion/Button3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Button3.png
--------------------------------------------------------------------------------
/Nextion/Err_Red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/Err_Red.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Calibs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Calibs.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Home.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Settings.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Settings_Err.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Settings_Err.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Settings_Errp2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Settings_Errp2.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Settings_Errp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Settings_Errp3.png
--------------------------------------------------------------------------------
/Nextion/HMI2_Switches.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI2_Switches.png
--------------------------------------------------------------------------------
/Nextion/HMI_Errors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/HMI_Errors.png
--------------------------------------------------------------------------------
/Nextion/KeyPadButton1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/KeyPadButton1.png
--------------------------------------------------------------------------------
/Nextion/KeyPadButton2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/KeyPadButton2.png
--------------------------------------------------------------------------------
/Nextion/NetW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/NetW.png
--------------------------------------------------------------------------------
/Nextion/NoNetW.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/NoNetW.png
--------------------------------------------------------------------------------
/Nextion/OFFs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OFFs.png
--------------------------------------------------------------------------------
/Nextion/OK.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OK.png
--------------------------------------------------------------------------------
/Nextion/OK2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OK2.png
--------------------------------------------------------------------------------
/Nextion/OK_L1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OK_L1.png
--------------------------------------------------------------------------------
/Nextion/OK_L2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OK_L2.png
--------------------------------------------------------------------------------
/Nextion/OK_L3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/OK_L3.png
--------------------------------------------------------------------------------
/Nextion/ONs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/ONs.png
--------------------------------------------------------------------------------
/Nextion/PoolMaster.HMI:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/PoolMaster.HMI
--------------------------------------------------------------------------------
/Nextion/PoolMaster.tft:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/Nextion/PoolMaster.tft
--------------------------------------------------------------------------------
/NodeRed/Grafana_Dashboard.json:
--------------------------------------------------------------------------------
1 | {
2 | "__inputs": [
3 | {
4 | "name": "DS_INFLUXDB",
5 | "label": "InfluxDB",
6 | "description": "",
7 | "type": "datasource",
8 | "pluginId": "influxdb",
9 | "pluginName": "InfluxDB"
10 | }
11 | ],
12 | "__requires": [
13 | {
14 | "type": "panel",
15 | "id": "bargauge",
16 | "name": "Bar Gauge",
17 | "version": ""
18 | },
19 | {
20 | "type": "panel",
21 | "id": "gauge",
22 | "name": "Gauge",
23 | "version": ""
24 | },
25 | {
26 | "type": "grafana",
27 | "id": "grafana",
28 | "name": "Grafana",
29 | "version": "6.7.1"
30 | },
31 | {
32 | "type": "panel",
33 | "id": "graph",
34 | "name": "Graph",
35 | "version": ""
36 | },
37 | {
38 | "type": "datasource",
39 | "id": "influxdb",
40 | "name": "InfluxDB",
41 | "version": "1.0.0"
42 | },
43 | {
44 | "type": "panel",
45 | "id": "singlestat",
46 | "name": "Singlestat",
47 | "version": ""
48 | }
49 | ],
50 | "annotations": {
51 | "list": [
52 | {
53 | "$$hashKey": "object:7",
54 | "builtIn": 1,
55 | "datasource": "-- Grafana --",
56 | "enable": true,
57 | "hide": true,
58 | "iconColor": "rgba(0, 211, 255, 1)",
59 | "name": "Annotations & Alerts",
60 | "type": "dashboard"
61 | }
62 | ]
63 | },
64 | "editable": true,
65 | "gnetId": null,
66 | "graphTooltip": 0,
67 | "id": null,
68 | "links": [],
69 | "panels": [
70 | {
71 | "aliasColors": {
72 | "Chl Pump": "light-yellow",
73 | "Orp": "light-blue",
74 | "Orp setpoint": "dark-blue",
75 | "pH Pump": "dark-red",
76 | "pH setpoint": "dark-green"
77 | },
78 | "bars": false,
79 | "cacheTimeout": null,
80 | "dashLength": 10,
81 | "dashes": false,
82 | "datasource": "${DS_INFLUXDB}",
83 | "decimals": 2,
84 | "fill": 3,
85 | "fillGradient": 5,
86 | "gridPos": {
87 | "h": 9,
88 | "w": 19,
89 | "x": 0,
90 | "y": 0
91 | },
92 | "hiddenSeries": false,
93 | "id": 2,
94 | "legend": {
95 | "alignAsTable": false,
96 | "avg": false,
97 | "current": true,
98 | "max": false,
99 | "min": false,
100 | "rightSide": false,
101 | "show": true,
102 | "total": false,
103 | "values": true
104 | },
105 | "lines": true,
106 | "linewidth": 1,
107 | "links": [],
108 | "nullPointMode": "null",
109 | "options": {
110 | "dataLinks": []
111 | },
112 | "percentage": false,
113 | "pluginVersion": "6.7.1",
114 | "pointradius": 2,
115 | "points": false,
116 | "renderer": "flot",
117 | "seriesOverrides": [
118 | {
119 | "alias": "Orp",
120 | "yaxis": 2
121 | },
122 | {
123 | "alias": "Chl Pump",
124 | "fill": 1,
125 | "fillGradient": 3,
126 | "lines": true,
127 | "linewidth": 1,
128 | "nullPointMode": "connected",
129 | "steppedLine": true
130 | },
131 | {
132 | "alias": "pH Pump",
133 | "fill": 1,
134 | "fillGradient": 3,
135 | "lines": true,
136 | "linewidth": 1,
137 | "nullPointMode": "connected",
138 | "steppedLine": true
139 | },
140 | {
141 | "alias": "Orp setpoint",
142 | "fill": 0,
143 | "fillGradient": 0,
144 | "lines": true,
145 | "linewidth": 2,
146 | "yaxis": 2
147 | },
148 | {
149 | "alias": "pH setpoint",
150 | "fill": 0,
151 | "fillGradient": 0,
152 | "lines": true,
153 | "linewidth": 2,
154 | "yaxis": 1
155 | }
156 | ],
157 | "spaceLength": 10,
158 | "stack": false,
159 | "steppedLine": false,
160 | "targets": [
161 | {
162 | "alias": "pH",
163 | "groupBy": [],
164 | "measurement": "PoolMaster",
165 | "orderByTime": "ASC",
166 | "policy": "default",
167 | "query": "SELECT mean(\"pH\") / 100 FROM \"PoolMaster\" WHERE $timeFilter GROUP BY time($__interval) fill(linear)",
168 | "rawQuery": false,
169 | "refId": "A",
170 | "resultFormat": "time_series",
171 | "select": [
172 | [
173 | {
174 | "params": [
175 | "pH"
176 | ],
177 | "type": "field"
178 | },
179 | {
180 | "params": [
181 | " / 100"
182 | ],
183 | "type": "math"
184 | }
185 | ]
186 | ],
187 | "tags": []
188 | },
189 | {
190 | "alias": "Orp",
191 | "groupBy": [],
192 | "measurement": "PoolMaster",
193 | "orderByTime": "ASC",
194 | "policy": "default",
195 | "refId": "B",
196 | "resultFormat": "time_series",
197 | "select": [
198 | [
199 | {
200 | "params": [
201 | "Orp"
202 | ],
203 | "type": "field"
204 | }
205 | ]
206 | ],
207 | "tags": []
208 | },
209 | {
210 | "alias": "Chl Pump",
211 | "groupBy": [],
212 | "measurement": "PoolMaster",
213 | "orderByTime": "ASC",
214 | "policy": "default",
215 | "query": "SELECT \"FiltState\" *7.5 FROM \"PoolMaster\" WHERE $timeFilter",
216 | "rawQuery": false,
217 | "refId": "C",
218 | "resultFormat": "time_series",
219 | "select": [
220 | [
221 | {
222 | "params": [
223 | "ChlPumpState"
224 | ],
225 | "type": "field"
226 | },
227 | {
228 | "params": [
229 | "*7.5"
230 | ],
231 | "type": "math"
232 | }
233 | ]
234 | ],
235 | "tags": []
236 | },
237 | {
238 | "alias": "pH Pump",
239 | "groupBy": [],
240 | "measurement": "PoolMaster",
241 | "orderByTime": "ASC",
242 | "policy": "default",
243 | "query": "SELECT \"FiltState\" *7.5 FROM \"PoolMaster\" WHERE $timeFilter",
244 | "rawQuery": false,
245 | "refId": "D",
246 | "resultFormat": "time_series",
247 | "select": [
248 | [
249 | {
250 | "params": [
251 | "pHPumpState"
252 | ],
253 | "type": "field"
254 | },
255 | {
256 | "params": [
257 | "*7.5"
258 | ],
259 | "type": "math"
260 | }
261 | ]
262 | ],
263 | "tags": []
264 | },
265 | {
266 | "alias": "Orp setpoint",
267 | "groupBy": [],
268 | "measurement": "PoolMaster",
269 | "orderByTime": "ASC",
270 | "policy": "default",
271 | "refId": "E",
272 | "resultFormat": "time_series",
273 | "select": [
274 | [
275 | {
276 | "params": [
277 | "OrpSP"
278 | ],
279 | "type": "field"
280 | }
281 | ]
282 | ],
283 | "tags": []
284 | },
285 | {
286 | "alias": "pH setpoint",
287 | "groupBy": [],
288 | "measurement": "PoolMaster",
289 | "orderByTime": "ASC",
290 | "policy": "default",
291 | "refId": "F",
292 | "resultFormat": "time_series",
293 | "select": [
294 | [
295 | {
296 | "params": [
297 | "pHSP"
298 | ],
299 | "type": "field"
300 | },
301 | {
302 | "params": [
303 | " / 100"
304 | ],
305 | "type": "math"
306 | }
307 | ]
308 | ],
309 | "tags": []
310 | }
311 | ],
312 | "thresholds": [],
313 | "timeFrom": null,
314 | "timeRegions": [],
315 | "timeShift": null,
316 | "title": "pH & Orp",
317 | "tooltip": {
318 | "shared": true,
319 | "sort": 0,
320 | "value_type": "individual"
321 | },
322 | "type": "graph",
323 | "xaxis": {
324 | "buckets": null,
325 | "mode": "time",
326 | "name": null,
327 | "show": true,
328 | "values": []
329 | },
330 | "yaxes": [
331 | {
332 | "decimals": 1,
333 | "format": "short",
334 | "label": "pH",
335 | "logBase": 1,
336 | "max": "7.6",
337 | "min": "7.1",
338 | "show": true
339 | },
340 | {
341 | "decimals": null,
342 | "format": "short",
343 | "label": "Orp (mV)",
344 | "logBase": 1,
345 | "max": null,
346 | "min": null,
347 | "show": true
348 | }
349 | ],
350 | "yaxis": {
351 | "align": false,
352 | "alignLevel": null
353 | }
354 | },
355 | {
356 | "datasource": "${DS_INFLUXDB}",
357 | "gridPos": {
358 | "h": 4,
359 | "w": 3,
360 | "x": 19,
361 | "y": 0
362 | },
363 | "id": 6,
364 | "options": {
365 | "fieldOptions": {
366 | "calcs": [
367 | "mean"
368 | ],
369 | "defaults": {
370 | "mappings": [],
371 | "max": 30,
372 | "min": 10,
373 | "thresholds": {
374 | "mode": "absolute",
375 | "steps": [
376 | {
377 | "color": "blue",
378 | "value": null
379 | },
380 | {
381 | "color": "green",
382 | "value": 27
383 | },
384 | {
385 | "color": "red",
386 | "value": 29
387 | }
388 | ]
389 | },
390 | "title": "Water temp.",
391 | "unit": "celsius"
392 | },
393 | "overrides": [],
394 | "values": false
395 | },
396 | "orientation": "auto",
397 | "showThresholdLabels": false,
398 | "showThresholdMarkers": true
399 | },
400 | "pluginVersion": "6.7.1",
401 | "targets": [
402 | {
403 | "alias": "Water temp.",
404 | "groupBy": [],
405 | "measurement": "PoolMaster",
406 | "orderByTime": "ASC",
407 | "policy": "default",
408 | "refId": "A",
409 | "resultFormat": "time_series",
410 | "select": [
411 | [
412 | {
413 | "params": [
414 | "Tmp"
415 | ],
416 | "type": "field"
417 | },
418 | {
419 | "params": [
420 | " / 100"
421 | ],
422 | "type": "math"
423 | }
424 | ]
425 | ],
426 | "tags": [],
427 | "tz": ""
428 | }
429 | ],
430 | "timeFrom": null,
431 | "timeShift": null,
432 | "title": "",
433 | "transparent": true,
434 | "type": "gauge"
435 | },
436 | {
437 | "datasource": "${DS_INFLUXDB}",
438 | "gridPos": {
439 | "h": 4,
440 | "w": 3,
441 | "x": 19,
442 | "y": 4
443 | },
444 | "id": 9,
445 | "options": {
446 | "fieldOptions": {
447 | "calcs": [
448 | "mean"
449 | ],
450 | "defaults": {
451 | "mappings": [],
452 | "max": 850,
453 | "min": 600,
454 | "thresholds": {
455 | "mode": "absolute",
456 | "steps": [
457 | {
458 | "color": "dark-red",
459 | "value": null
460 | },
461 | {
462 | "color": "dark-green",
463 | "value": 700
464 | },
465 | {
466 | "color": "dark-red",
467 | "value": 800
468 | }
469 | ]
470 | },
471 | "title": "Orp (mV)",
472 | "unit": "none"
473 | },
474 | "overrides": [],
475 | "values": false
476 | },
477 | "orientation": "auto",
478 | "showThresholdLabels": false,
479 | "showThresholdMarkers": true
480 | },
481 | "pluginVersion": "6.7.1",
482 | "targets": [
483 | {
484 | "alias": "Orp",
485 | "groupBy": [],
486 | "measurement": "PoolMaster",
487 | "orderByTime": "ASC",
488 | "policy": "default",
489 | "refId": "A",
490 | "resultFormat": "time_series",
491 | "select": [
492 | [
493 | {
494 | "params": [
495 | "Orp"
496 | ],
497 | "type": "field"
498 | }
499 | ]
500 | ],
501 | "tags": []
502 | }
503 | ],
504 | "timeFrom": null,
505 | "timeShift": null,
506 | "title": "",
507 | "transparent": true,
508 | "type": "gauge"
509 | },
510 | {
511 | "datasource": "${DS_INFLUXDB}",
512 | "gridPos": {
513 | "h": 4,
514 | "w": 3,
515 | "x": 19,
516 | "y": 8
517 | },
518 | "id": 10,
519 | "options": {
520 | "fieldOptions": {
521 | "calcs": [
522 | "mean"
523 | ],
524 | "defaults": {
525 | "mappings": [],
526 | "max": 7.8,
527 | "min": 7,
528 | "thresholds": {
529 | "mode": "absolute",
530 | "steps": [
531 | {
532 | "color": "dark-red",
533 | "value": null
534 | },
535 | {
536 | "color": "dark-green",
537 | "value": 7.2
538 | },
539 | {
540 | "color": "dark-red",
541 | "value": 7.6
542 | }
543 | ]
544 | },
545 | "title": "pH",
546 | "unit": "none"
547 | },
548 | "overrides": [],
549 | "values": false
550 | },
551 | "orientation": "auto",
552 | "showThresholdLabels": false,
553 | "showThresholdMarkers": true
554 | },
555 | "pluginVersion": "6.7.1",
556 | "targets": [
557 | {
558 | "alias": "pH",
559 | "groupBy": [],
560 | "measurement": "PoolMaster",
561 | "orderByTime": "ASC",
562 | "policy": "default",
563 | "refId": "A",
564 | "resultFormat": "time_series",
565 | "select": [
566 | [
567 | {
568 | "params": [
569 | "pH"
570 | ],
571 | "type": "field"
572 | },
573 | {
574 | "params": [
575 | " / 100"
576 | ],
577 | "type": "math"
578 | }
579 | ]
580 | ],
581 | "tags": []
582 | }
583 | ],
584 | "timeFrom": null,
585 | "timeShift": null,
586 | "title": "",
587 | "transparent": true,
588 | "type": "gauge"
589 | },
590 | {
591 | "aliasColors": {
592 | "Filtration": "light-yellow",
593 | "Pressure": "semi-dark-orange",
594 | "Temperature": "light-blue",
595 | "Water setpoint": "dark-blue"
596 | },
597 | "bars": false,
598 | "dashLength": 10,
599 | "dashes": false,
600 | "datasource": "${DS_INFLUXDB}",
601 | "fill": 3,
602 | "fillGradient": 3,
603 | "gridPos": {
604 | "h": 8,
605 | "w": 19,
606 | "x": 0,
607 | "y": 9
608 | },
609 | "hiddenSeries": false,
610 | "id": 12,
611 | "legend": {
612 | "avg": false,
613 | "current": true,
614 | "max": false,
615 | "min": false,
616 | "show": true,
617 | "total": false,
618 | "values": true
619 | },
620 | "lines": true,
621 | "linewidth": 1,
622 | "nullPointMode": "connected",
623 | "options": {
624 | "dataLinks": []
625 | },
626 | "percentage": false,
627 | "pointradius": 2,
628 | "points": false,
629 | "renderer": "flot",
630 | "seriesOverrides": [
631 | {
632 | "alias": "Temperature",
633 | "yaxis": 2
634 | },
635 | {
636 | "alias": "Filtration",
637 | "fill": 1,
638 | "fillGradient": 3,
639 | "lines": true,
640 | "linewidth": 1,
641 | "nullPointMode": "connected",
642 | "steppedLine": true
643 | },
644 | {
645 | "alias": "Water setpoint",
646 | "fill": 0,
647 | "fillGradient": 0,
648 | "lines": true,
649 | "linewidth": 2,
650 | "yaxis": 2
651 | }
652 | ],
653 | "spaceLength": 10,
654 | "stack": false,
655 | "steppedLine": false,
656 | "targets": [
657 | {
658 | "alias": "Pressure",
659 | "groupBy": [],
660 | "measurement": "PoolMaster",
661 | "orderByTime": "ASC",
662 | "policy": "default",
663 | "query": "SELECT mean(\"PSI\") / 100 FROM \"PoolMaster\" WHERE $timeFilter GROUP BY time(1m) fill(linear)",
664 | "rawQuery": false,
665 | "refId": "A",
666 | "resultFormat": "time_series",
667 | "select": [
668 | [
669 | {
670 | "params": [
671 | "PSI"
672 | ],
673 | "type": "field"
674 | },
675 | {
676 | "params": [
677 | " / 100"
678 | ],
679 | "type": "math"
680 | }
681 | ]
682 | ],
683 | "tags": []
684 | },
685 | {
686 | "alias": "Temperature",
687 | "groupBy": [],
688 | "measurement": "PoolMaster",
689 | "orderByTime": "ASC",
690 | "policy": "default",
691 | "refId": "B",
692 | "resultFormat": "time_series",
693 | "select": [
694 | [
695 | {
696 | "params": [
697 | "Tmp"
698 | ],
699 | "type": "field"
700 | },
701 | {
702 | "params": [
703 | " / 100"
704 | ],
705 | "type": "math"
706 | }
707 | ]
708 | ],
709 | "tags": []
710 | },
711 | {
712 | "alias": "Filtration",
713 | "groupBy": [],
714 | "measurement": "PoolMaster",
715 | "orderByTime": "ASC",
716 | "policy": "default",
717 | "query": "SELECT \"FiltState\" FROM \"PoolMaster\" WHERE $timeFilter",
718 | "rawQuery": false,
719 | "refId": "C",
720 | "resultFormat": "time_series",
721 | "select": [
722 | [
723 | {
724 | "params": [
725 | "FiltState"
726 | ],
727 | "type": "field"
728 | }
729 | ]
730 | ],
731 | "tags": []
732 | },
733 | {
734 | "alias": "Water setpoint",
735 | "groupBy": [],
736 | "measurement": "PoolMaster",
737 | "orderByTime": "ASC",
738 | "policy": "default",
739 | "refId": "D",
740 | "resultFormat": "time_series",
741 | "select": [
742 | [
743 | {
744 | "params": [
745 | "WSP"
746 | ],
747 | "type": "field"
748 | },
749 | {
750 | "params": [
751 | " / 100"
752 | ],
753 | "type": "math"
754 | }
755 | ]
756 | ],
757 | "tags": []
758 | }
759 | ],
760 | "thresholds": [],
761 | "timeFrom": null,
762 | "timeRegions": [],
763 | "timeShift": null,
764 | "title": "Water pressure & temperature",
765 | "tooltip": {
766 | "shared": true,
767 | "sort": 0,
768 | "value_type": "individual"
769 | },
770 | "type": "graph",
771 | "xaxis": {
772 | "buckets": null,
773 | "mode": "time",
774 | "name": null,
775 | "show": true,
776 | "values": []
777 | },
778 | "yaxes": [
779 | {
780 | "format": "short",
781 | "label": "Pressure (bar)",
782 | "logBase": 1,
783 | "max": null,
784 | "min": null,
785 | "show": true
786 | },
787 | {
788 | "format": "none",
789 | "label": "Temperature (°C)",
790 | "logBase": 1,
791 | "max": null,
792 | "min": null,
793 | "show": true
794 | }
795 | ],
796 | "yaxis": {
797 | "align": false,
798 | "alignLevel": null
799 | }
800 | },
801 | {
802 | "cacheTimeout": null,
803 | "colorBackground": true,
804 | "colorValue": false,
805 | "colors": [
806 | "#d44a3a",
807 | "rgba(237, 129, 40, 0.89)",
808 | "#299c46"
809 | ],
810 | "datasource": "${DS_INFLUXDB}",
811 | "format": "none",
812 | "gauge": {
813 | "maxValue": 100,
814 | "minValue": 0,
815 | "show": false,
816 | "thresholdLabels": false,
817 | "thresholdMarkers": true
818 | },
819 | "gridPos": {
820 | "h": 2,
821 | "w": 2,
822 | "x": 0,
823 | "y": 17
824 | },
825 | "id": 18,
826 | "interval": null,
827 | "links": [],
828 | "mappingType": 1,
829 | "mappingTypes": [
830 | {
831 | "name": "value to text",
832 | "value": 1
833 | },
834 | {
835 | "name": "range to text",
836 | "value": 2
837 | }
838 | ],
839 | "maxDataPoints": 100,
840 | "nullPointMode": "connected",
841 | "nullText": null,
842 | "postfix": "",
843 | "postfixFontSize": "50%",
844 | "prefix": "",
845 | "prefixFontSize": "50%",
846 | "rangeMaps": [
847 | {
848 | "from": "null",
849 | "text": "N/A",
850 | "to": "null"
851 | }
852 | ],
853 | "sparkline": {
854 | "fillColor": "rgba(31, 118, 189, 0.18)",
855 | "full": false,
856 | "lineColor": "rgb(31, 120, 193)",
857 | "show": false,
858 | "ymax": null,
859 | "ymin": null
860 | },
861 | "tableColumn": "",
862 | "targets": [
863 | {
864 | "groupBy": [],
865 | "measurement": "PoolMaster",
866 | "orderByTime": "ASC",
867 | "policy": "default",
868 | "refId": "A",
869 | "resultFormat": "table",
870 | "select": [
871 | [
872 | {
873 | "params": [
874 | "AutoMode"
875 | ],
876 | "type": "field"
877 | }
878 | ]
879 | ],
880 | "tags": []
881 | }
882 | ],
883 | "thresholds": "0.2,0.3",
884 | "timeFrom": null,
885 | "timeShift": null,
886 | "title": "Mode",
887 | "type": "singlestat",
888 | "valueFontSize": "50%",
889 | "valueMaps": [
890 | {
891 | "op": "=",
892 | "text": "Manual",
893 | "value": "0"
894 | },
895 | {
896 | "op": "=",
897 | "text": "Auto",
898 | "value": "1"
899 | }
900 | ],
901 | "valueName": "current"
902 | },
903 | {
904 | "cacheTimeout": null,
905 | "colorBackground": true,
906 | "colorValue": false,
907 | "colors": [
908 | "#d44a3a",
909 | "rgba(237, 129, 40, 0.89)",
910 | "#299c46"
911 | ],
912 | "datasource": "${DS_INFLUXDB}",
913 | "format": "none",
914 | "gauge": {
915 | "maxValue": 100,
916 | "minValue": 0,
917 | "show": false,
918 | "thresholdLabels": false,
919 | "thresholdMarkers": true
920 | },
921 | "gridPos": {
922 | "h": 2,
923 | "w": 2,
924 | "x": 2,
925 | "y": 17
926 | },
927 | "id": 19,
928 | "interval": null,
929 | "links": [],
930 | "mappingType": 1,
931 | "mappingTypes": [
932 | {
933 | "name": "value to text",
934 | "value": 1
935 | },
936 | {
937 | "name": "range to text",
938 | "value": 2
939 | }
940 | ],
941 | "maxDataPoints": 100,
942 | "nullPointMode": "connected",
943 | "nullText": null,
944 | "postfix": "",
945 | "postfixFontSize": "50%",
946 | "prefix": "",
947 | "prefixFontSize": "50%",
948 | "rangeMaps": [
949 | {
950 | "from": "null",
951 | "text": "N/A",
952 | "to": "null"
953 | }
954 | ],
955 | "sparkline": {
956 | "fillColor": "rgba(31, 118, 189, 0.18)",
957 | "full": false,
958 | "lineColor": "rgb(31, 120, 193)",
959 | "show": false,
960 | "ymax": null,
961 | "ymin": null
962 | },
963 | "tableColumn": "",
964 | "targets": [
965 | {
966 | "groupBy": [],
967 | "measurement": "PoolMaster",
968 | "orderByTime": "ASC",
969 | "policy": "default",
970 | "refId": "A",
971 | "resultFormat": "table",
972 | "select": [
973 | [
974 | {
975 | "params": [
976 | "FiltState"
977 | ],
978 | "type": "field"
979 | }
980 | ]
981 | ],
982 | "tags": []
983 | }
984 | ],
985 | "thresholds": "0.2,0.3",
986 | "timeFrom": null,
987 | "timeShift": null,
988 | "title": "Filtration",
989 | "type": "singlestat",
990 | "valueFontSize": "50%",
991 | "valueMaps": [
992 | {
993 | "op": "=",
994 | "text": "OFF",
995 | "value": "0"
996 | },
997 | {
998 | "op": "=",
999 | "text": "ON",
1000 | "value": "1"
1001 | }
1002 | ],
1003 | "valueName": "current"
1004 | },
1005 | {
1006 | "cacheTimeout": null,
1007 | "colorBackground": true,
1008 | "colorValue": false,
1009 | "colors": [
1010 | "#d44a3a",
1011 | "rgba(237, 129, 40, 0.89)",
1012 | "#299c46"
1013 | ],
1014 | "datasource": "${DS_INFLUXDB}",
1015 | "format": "none",
1016 | "gauge": {
1017 | "maxValue": 100,
1018 | "minValue": 0,
1019 | "show": false,
1020 | "thresholdLabels": false,
1021 | "thresholdMarkers": true
1022 | },
1023 | "gridPos": {
1024 | "h": 2,
1025 | "w": 2,
1026 | "x": 4,
1027 | "y": 17
1028 | },
1029 | "id": 20,
1030 | "interval": null,
1031 | "links": [],
1032 | "mappingType": 1,
1033 | "mappingTypes": [
1034 | {
1035 | "name": "value to text",
1036 | "value": 1
1037 | },
1038 | {
1039 | "name": "range to text",
1040 | "value": 2
1041 | }
1042 | ],
1043 | "maxDataPoints": 100,
1044 | "nullPointMode": "connected",
1045 | "nullText": null,
1046 | "postfix": "",
1047 | "postfixFontSize": "50%",
1048 | "prefix": "",
1049 | "prefixFontSize": "50%",
1050 | "rangeMaps": [
1051 | {
1052 | "from": "null",
1053 | "text": "N/A",
1054 | "to": "null"
1055 | }
1056 | ],
1057 | "sparkline": {
1058 | "fillColor": "rgba(31, 118, 189, 0.18)",
1059 | "full": false,
1060 | "lineColor": "rgb(31, 120, 193)",
1061 | "show": false,
1062 | "ymax": null,
1063 | "ymin": null
1064 | },
1065 | "tableColumn": "",
1066 | "targets": [
1067 | {
1068 | "groupBy": [],
1069 | "measurement": "PoolMaster",
1070 | "orderByTime": "ASC",
1071 | "policy": "default",
1072 | "refId": "A",
1073 | "resultFormat": "table",
1074 | "select": [
1075 | [
1076 | {
1077 | "params": [
1078 | "WaterHeat"
1079 | ],
1080 | "type": "field"
1081 | }
1082 | ]
1083 | ],
1084 | "tags": []
1085 | }
1086 | ],
1087 | "thresholds": "0.2,0.3",
1088 | "timeFrom": null,
1089 | "timeShift": null,
1090 | "title": "Heating",
1091 | "type": "singlestat",
1092 | "valueFontSize": "50%",
1093 | "valueMaps": [
1094 | {
1095 | "op": "=",
1096 | "text": "OFF",
1097 | "value": "0"
1098 | },
1099 | {
1100 | "op": "=",
1101 | "text": "ON",
1102 | "value": "1"
1103 | }
1104 | ],
1105 | "valueName": "current"
1106 | },
1107 | {
1108 | "cacheTimeout": null,
1109 | "colorBackground": true,
1110 | "colorValue": false,
1111 | "colors": [
1112 | "#299c46",
1113 | "rgba(237, 129, 40, 0.89)",
1114 | "#d44a3a"
1115 | ],
1116 | "datasource": "${DS_INFLUXDB}",
1117 | "format": "m",
1118 | "gauge": {
1119 | "maxValue": 100,
1120 | "minValue": 0,
1121 | "show": false,
1122 | "thresholdLabels": false,
1123 | "thresholdMarkers": true
1124 | },
1125 | "gridPos": {
1126 | "h": 2,
1127 | "w": 3,
1128 | "x": 8,
1129 | "y": 17
1130 | },
1131 | "id": 21,
1132 | "interval": null,
1133 | "links": [],
1134 | "mappingType": 1,
1135 | "mappingTypes": [
1136 | {
1137 | "name": "value to text",
1138 | "value": 1
1139 | },
1140 | {
1141 | "name": "range to text",
1142 | "value": 2
1143 | }
1144 | ],
1145 | "maxDataPoints": 100,
1146 | "nullPointMode": "connected",
1147 | "nullText": null,
1148 | "postfix": "",
1149 | "postfixFontSize": "50%",
1150 | "prefix": "",
1151 | "prefixFontSize": "30%",
1152 | "rangeMaps": [
1153 | {
1154 | "from": "null",
1155 | "text": "N/A",
1156 | "to": "null"
1157 | }
1158 | ],
1159 | "sparkline": {
1160 | "fillColor": "rgba(31, 118, 189, 0.18)",
1161 | "full": false,
1162 | "lineColor": "rgb(31, 120, 193)",
1163 | "show": false,
1164 | "ymax": null,
1165 | "ymin": null
1166 | },
1167 | "tableColumn": "",
1168 | "targets": [
1169 | {
1170 | "groupBy": [],
1171 | "measurement": "PoolMaster",
1172 | "orderByTime": "ASC",
1173 | "policy": "default",
1174 | "refId": "A",
1175 | "resultFormat": "table",
1176 | "select": [
1177 | [
1178 | {
1179 | "params": [
1180 | "ChlUpT"
1181 | ],
1182 | "type": "field"
1183 | },
1184 | {
1185 | "params": [
1186 | "/60"
1187 | ],
1188 | "type": "math"
1189 | }
1190 | ]
1191 | ],
1192 | "tags": []
1193 | }
1194 | ],
1195 | "thresholds": "10,20",
1196 | "timeFrom": null,
1197 | "timeShift": null,
1198 | "title": "Chl pump uptime",
1199 | "type": "singlestat",
1200 | "valueFontSize": "50%",
1201 | "valueMaps": [
1202 | {
1203 | "op": "=",
1204 | "text": "N/A",
1205 | "value": "null"
1206 | }
1207 | ],
1208 | "valueName": "current"
1209 | },
1210 | {
1211 | "cacheTimeout": null,
1212 | "colorBackground": true,
1213 | "colorValue": false,
1214 | "colors": [
1215 | "#299c46",
1216 | "rgba(237, 129, 40, 0.89)",
1217 | "#d44a3a"
1218 | ],
1219 | "datasource": "${DS_INFLUXDB}",
1220 | "format": "m",
1221 | "gauge": {
1222 | "maxValue": 100,
1223 | "minValue": 0,
1224 | "show": false,
1225 | "thresholdLabels": false,
1226 | "thresholdMarkers": true
1227 | },
1228 | "gridPos": {
1229 | "h": 2,
1230 | "w": 3,
1231 | "x": 11,
1232 | "y": 17
1233 | },
1234 | "id": 22,
1235 | "interval": null,
1236 | "links": [],
1237 | "mappingType": 1,
1238 | "mappingTypes": [
1239 | {
1240 | "name": "value to text",
1241 | "value": 1
1242 | },
1243 | {
1244 | "name": "range to text",
1245 | "value": 2
1246 | }
1247 | ],
1248 | "maxDataPoints": 100,
1249 | "nullPointMode": "connected",
1250 | "nullText": null,
1251 | "postfix": "",
1252 | "postfixFontSize": "50%",
1253 | "prefix": "",
1254 | "prefixFontSize": "30%",
1255 | "rangeMaps": [
1256 | {
1257 | "from": "null",
1258 | "text": "N/A",
1259 | "to": "null"
1260 | }
1261 | ],
1262 | "sparkline": {
1263 | "fillColor": "rgba(31, 118, 189, 0.18)",
1264 | "full": false,
1265 | "lineColor": "rgb(31, 120, 193)",
1266 | "show": false,
1267 | "ymax": null,
1268 | "ymin": null
1269 | },
1270 | "tableColumn": "",
1271 | "targets": [
1272 | {
1273 | "groupBy": [],
1274 | "measurement": "PoolMaster",
1275 | "orderByTime": "ASC",
1276 | "policy": "default",
1277 | "refId": "A",
1278 | "resultFormat": "table",
1279 | "select": [
1280 | [
1281 | {
1282 | "params": [
1283 | "PhUpT"
1284 | ],
1285 | "type": "field"
1286 | },
1287 | {
1288 | "params": [
1289 | "/60"
1290 | ],
1291 | "type": "math"
1292 | }
1293 | ]
1294 | ],
1295 | "tags": []
1296 | }
1297 | ],
1298 | "thresholds": "10,20",
1299 | "timeFrom": null,
1300 | "timeShift": null,
1301 | "title": "pH pump uptime",
1302 | "type": "singlestat",
1303 | "valueFontSize": "50%",
1304 | "valueMaps": [
1305 | {
1306 | "op": "=",
1307 | "text": "N/A",
1308 | "value": "null"
1309 | }
1310 | ],
1311 | "valueName": "current"
1312 | },
1313 | {
1314 | "datasource": "${DS_INFLUXDB}",
1315 | "gridPos": {
1316 | "h": 2,
1317 | "w": 5,
1318 | "x": 14,
1319 | "y": 17
1320 | },
1321 | "id": 24,
1322 | "options": {
1323 | "displayMode": "lcd",
1324 | "fieldOptions": {
1325 | "calcs": [
1326 | "last"
1327 | ],
1328 | "defaults": {
1329 | "mappings": [],
1330 | "thresholds": {
1331 | "mode": "absolute",
1332 | "steps": [
1333 | {
1334 | "color": "dark-red",
1335 | "value": null
1336 | },
1337 | {
1338 | "color": "semi-dark-green",
1339 | "value": 20
1340 | }
1341 | ]
1342 | },
1343 | "title": "",
1344 | "unit": "percent"
1345 | },
1346 | "overrides": [],
1347 | "values": false
1348 | },
1349 | "orientation": "horizontal",
1350 | "showUnfilled": true
1351 | },
1352 | "pluginVersion": "6.7.1",
1353 | "targets": [
1354 | {
1355 | "alias": "ChlTank",
1356 | "groupBy": [],
1357 | "measurement": "PoolMaster",
1358 | "orderByTime": "ASC",
1359 | "policy": "default",
1360 | "refId": "A",
1361 | "resultFormat": "time_series",
1362 | "select": [
1363 | [
1364 | {
1365 | "params": [
1366 | "ChlF"
1367 | ],
1368 | "type": "field"
1369 | }
1370 | ]
1371 | ],
1372 | "tags": []
1373 | },
1374 | {
1375 | "alias": "AcidTank",
1376 | "groupBy": [],
1377 | "measurement": "PoolMaster",
1378 | "orderByTime": "ASC",
1379 | "policy": "default",
1380 | "refId": "B",
1381 | "resultFormat": "time_series",
1382 | "select": [
1383 | [
1384 | {
1385 | "params": [
1386 | "AcidF"
1387 | ],
1388 | "type": "field"
1389 | }
1390 | ]
1391 | ],
1392 | "tags": []
1393 | }
1394 | ],
1395 | "timeFrom": null,
1396 | "timeShift": null,
1397 | "title": "Tank levels",
1398 | "type": "bargauge"
1399 | }
1400 | ],
1401 | "refresh": "5s",
1402 | "schemaVersion": 22,
1403 | "style": "dark",
1404 | "tags": [],
1405 | "templating": {
1406 | "list": []
1407 | },
1408 | "time": {
1409 | "from": "now-6h",
1410 | "to": "now"
1411 | },
1412 | "timepicker": {
1413 | "refresh_intervals": [
1414 | "5s",
1415 | "10s",
1416 | "30s",
1417 | "1m",
1418 | "5m",
1419 | "15m",
1420 | "30m",
1421 | "1h",
1422 | "2h",
1423 | "1d"
1424 | ]
1425 | },
1426 | "timezone": "",
1427 | "title": "PoolMaster",
1428 | "uid": "jDrUHorWz",
1429 | "variables": {
1430 | "list": []
1431 | },
1432 | "version": 162
1433 | }
--------------------------------------------------------------------------------
/NodeRed/Node-Red to Influxdb Poolmaster v5.0.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "d91838d0.672e38",
4 | "type": "tab",
5 | "label": "Poolmaster v5.0 Influx Flow",
6 | "disabled": false,
7 | "info": ""
8 | },
9 | {
10 | "id": "81667e0b.b603b",
11 | "type": "mqtt in",
12 | "z": "d91838d0.672e38",
13 | "name": "Meas1 JSON from Poolmaster",
14 | "topic": "Home/Pool/Meas1",
15 | "qos": "1",
16 | "datatype": "json",
17 | "broker": "30654e7b.139f62",
18 | "x": 320,
19 | "y": 160,
20 | "wires": [
21 | [
22 | "11e99708.5a0839"
23 | ]
24 | ]
25 | },
26 | {
27 | "id": "11e99708.5a0839",
28 | "type": "function",
29 | "z": "d91838d0.672e38",
30 | "name": "Decode MySensor Message",
31 | "func": "if(typeof msg.payload.IO !== 'undefined')\n{\n var mask = msg.payload.IO;\n var mask2 = msg.payload.IO2;\n \n msg.payload.FiltState = (mask >> 7) & 1;\n msg.payload.pHPumpState = (mask >> 6) & 1;\n msg.payload.ChlPumpState = (mask >> 5) & 1;\n msg.payload.pHLevel = (mask >> 4) & 1;\n msg.payload.ChlLevel = (mask >> 3) & 1;\n msg.payload.PSIError = (mask >> 2) & 1;\n msg.payload.pHPumpUpTimeErr = (mask >> 1) & 1;\n msg.payload.ChlPumpUpTimeErr = (mask >> 0) & 1;\n \n msg.payload.pHPIDMode = (mask2 >> 7) & 1;\n msg.payload.ChlPIDMode = (mask2 >> 6) & 1;\n msg.payload.AutoMode = (mask2 >> 5) & 1;\n msg.payload.WaterHeat = (mask2 >> 4) & 1;\n}\nreturn msg;",
32 | "outputs": 1,
33 | "noerr": 0,
34 | "x": 860,
35 | "y": 260,
36 | "wires": [
37 | [
38 | "f7ec2835.38ff48"
39 | ]
40 | ]
41 | },
42 | {
43 | "id": "f7ec2835.38ff48",
44 | "type": "influxdb out",
45 | "z": "d91838d0.672e38",
46 | "influxdb": "5682d297.1cc1ec",
47 | "name": "Influx Pool",
48 | "measurement": "PoolMaster",
49 | "precision": "",
50 | "retentionPolicy": "",
51 | "x": 1200,
52 | "y": 260,
53 | "wires": []
54 | },
55 | {
56 | "id": "1732dafd.a26b35",
57 | "type": "mqtt in",
58 | "z": "d91838d0.672e38",
59 | "name": "Meas2 JSON from Pool",
60 | "topic": "Home/Pool/Meas2",
61 | "qos": "1",
62 | "datatype": "json",
63 | "broker": "30654e7b.139f62",
64 | "x": 320,
65 | "y": 220,
66 | "wires": [
67 | [
68 | "11e99708.5a0839"
69 | ]
70 | ]
71 | },
72 | {
73 | "id": "c3b2e2b.34ca12",
74 | "type": "mqtt in",
75 | "z": "d91838d0.672e38",
76 | "name": "Set1 JSON from Pool",
77 | "topic": "Home/Pool/Set1",
78 | "qos": "1",
79 | "datatype": "json",
80 | "broker": "30654e7b.139f62",
81 | "x": 310,
82 | "y": 280,
83 | "wires": [
84 | [
85 | "11e99708.5a0839"
86 | ]
87 | ]
88 | },
89 | {
90 | "id": "83eb7d0d.dc14a",
91 | "type": "mqtt in",
92 | "z": "d91838d0.672e38",
93 | "name": "Set2 JSON from Pool",
94 | "topic": "Home/Pool/Set2",
95 | "qos": "1",
96 | "datatype": "json",
97 | "broker": "30654e7b.139f62",
98 | "x": 310,
99 | "y": 340,
100 | "wires": [
101 | [
102 | "11e99708.5a0839"
103 | ]
104 | ]
105 | },
106 | {
107 | "id": "30654e7b.139f62",
108 | "type": "mqtt-broker",
109 | "z": "",
110 | "name": "Local Broker",
111 | "broker": "192.168.1.35",
112 | "port": "1883",
113 | "clientid": "CharNodeRed",
114 | "usetls": false,
115 | "compatmode": true,
116 | "keepalive": "60",
117 | "cleansession": true,
118 | "birthTopic": "Home/NodeRed",
119 | "birthQos": "1",
120 | "birthRetain": "true",
121 | "birthPayload": "online",
122 | "closeTopic": "",
123 | "closePayload": "",
124 | "willTopic": "Home/NodeRed",
125 | "willQos": "0",
126 | "willRetain": "true",
127 | "willPayload": "offline"
128 | },
129 | {
130 | "id": "5682d297.1cc1ec",
131 | "type": "influxdb",
132 | "z": "",
133 | "hostname": "192.168.1.35",
134 | "port": "8086",
135 | "protocol": "http",
136 | "database": "Pool",
137 | "name": "Pool",
138 | "usetls": false,
139 | "tls": ""
140 | }
141 | ]
--------------------------------------------------------------------------------
/NodeRed/NodeRed-to-Blynk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/NodeRed/NodeRed-to-Blynk.jpg
--------------------------------------------------------------------------------
/NodeRed/NodeRedFlow.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "7e97e945.323d28",
4 | "type": "blynk-ws-in-write",
5 | "z": "f12e8a0a.1aa5c",
6 | "name": "Filtration ON/OFF",
7 | "pin": "3",
8 | "pin_all": false,
9 | "client": "52f071e8.d90a9",
10 | "x": 108.00003051757812,
11 | "y": 72.4285659790039,
12 | "wires": [
13 | [
14 | "30ed05f1.2f6002"
15 | ]
16 | ]
17 | },
18 | {
19 | "id": "256e3395.cfeed4",
20 | "type": "mqtt out",
21 | "z": "f12e8a0a.1aa5c",
22 | "name": "MQTT Broker",
23 | "topic": "Home/Pool/API",
24 | "qos": "1",
25 | "retain": "",
26 | "broker": "99099cd5.b5ffa8",
27 | "x": 815.2833251953125,
28 | "y": 74.28333282470703,
29 | "wires": []
30 | },
31 | {
32 | "id": "30ed05f1.2f6002",
33 | "type": "function",
34 | "z": "f12e8a0a.1aa5c",
35 | "name": "Blynk input to JSON",
36 | "func": "if(msg.payload == \"0\")\n msg.payload = {\"FiltPump\":0};\nelse\n msg.payload = {\"FiltPump\":1};\n\nreturn msg;",
37 | "outputs": 1,
38 | "noerr": 0,
39 | "x": 513.2833251953125,
40 | "y": 77.28333282470703,
41 | "wires": [
42 | [
43 | "256e3395.cfeed4"
44 | ]
45 | ]
46 | },
47 | {
48 | "id": "38290b8d.49f004",
49 | "type": "mqtt in",
50 | "z": "f12e8a0a.1aa5c",
51 | "name": "JSON from PoolMaster",
52 | "topic": "Home/Pool",
53 | "qos": "1",
54 | "datatype": "json",
55 | "broker": "99099cd5.b5ffa8",
56 | "x": 120.28334045410156,
57 | "y": 235,
58 | "wires": [
59 | [
60 | "7573043.a3fc4fc",
61 | "58bd9ea8.646dd",
62 | "6679fce8.af4b5c"
63 | ]
64 | ]
65 | },
66 | {
67 | "id": "7573043.a3fc4fc",
68 | "type": "function",
69 | "z": "f12e8a0a.1aa5c",
70 | "name": "Split JSON",
71 | "func": "if(typeof msg.payload.Tmp !== 'undefined')\n{\n var msg0={};\n var msg1={};\n var msg2={};\n var msg3={};\n var msg4={};\n var msg5={};\n var msg6={};\n var msg7={};\n var msg8={};\n \n msg0.payload = msg.payload.Tmp/100.0;//W temp\n msg1.payload = msg.payload.pH/100.0;//pH\n msg2.payload = msg.payload.PSI/100.0;//PSI\n msg3.payload = msg.payload.Orp;//Orp\n msg4.payload = msg.payload.FilUpT/60.0;//Filtration Uptime\n msg5.payload = msg.payload.pHUpT/60.0;//pH Uptime\n msg6.payload = msg.payload.ChlUpT/60.0;//Chl Uptime\n msg7.payload = msg.payload.IO;//IO\n msg8.payload = msg.payload.IO2;//IO2;\n \n return [msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7,msg8]\n}\n\n",
72 | "outputs": 9,
73 | "noerr": 0,
74 | "x": 336.2833251953125,
75 | "y": 235,
76 | "wires": [
77 | [
78 | "38774502.b0601a"
79 | ],
80 | [
81 | "56bea23a.7c276c"
82 | ],
83 | [],
84 | [
85 | "3db83c40.35dd84"
86 | ],
87 | [
88 | "e2ed4845.8ad09"
89 | ],
90 | [
91 | "4e9e400c.7dde1"
92 | ],
93 | [
94 | "f7c046bf.539c3"
95 | ],
96 | [
97 | "5bd93f79.627f98"
98 | ],
99 | [
100 | "325f9088.8189a"
101 | ]
102 | ]
103 | },
104 | {
105 | "id": "38774502.b0601a",
106 | "type": "blynk-ws-out-write",
107 | "z": "f12e8a0a.1aa5c",
108 | "name": "Water temp",
109 | "pin": "8",
110 | "pinmode": 0,
111 | "client": "52f071e8.d90a9",
112 | "x": 562.2833251953125,
113 | "y": 156.30010986328125,
114 | "wires": []
115 | },
116 | {
117 | "id": "56bea23a.7c276c",
118 | "type": "blynk-ws-out-write",
119 | "z": "f12e8a0a.1aa5c",
120 | "name": "pH",
121 | "pin": "1",
122 | "pinmode": 0,
123 | "client": "52f071e8.d90a9",
124 | "x": 543.2833251953125,
125 | "y": 193.44989013671875,
126 | "wires": []
127 | },
128 | {
129 | "id": "3db83c40.35dd84",
130 | "type": "blynk-ws-out-write",
131 | "z": "f12e8a0a.1aa5c",
132 | "name": "Orp",
133 | "pin": "2",
134 | "pinmode": 0,
135 | "client": "52f071e8.d90a9",
136 | "x": 542.2833251953125,
137 | "y": 231.2333984375,
138 | "wires": []
139 | },
140 | {
141 | "id": "e2ed4845.8ad09",
142 | "type": "blynk-ws-out-write",
143 | "z": "f12e8a0a.1aa5c",
144 | "name": "Filt Uptime",
145 | "pin": "11",
146 | "pinmode": 0,
147 | "client": "52f071e8.d90a9",
148 | "x": 561.2833251953125,
149 | "y": 269.199951171875,
150 | "wires": []
151 | },
152 | {
153 | "id": "4e9e400c.7dde1",
154 | "type": "blynk-ws-out-write",
155 | "z": "f12e8a0a.1aa5c",
156 | "name": "pH Uptime",
157 | "pin": "9",
158 | "pinmode": 0,
159 | "client": "52f071e8.d90a9",
160 | "x": 562.2833251953125,
161 | "y": 307.300048828125,
162 | "wires": []
163 | },
164 | {
165 | "id": "f7c046bf.539c3",
166 | "type": "blynk-ws-out-write",
167 | "z": "f12e8a0a.1aa5c",
168 | "name": "Chl Uptime",
169 | "pin": "10",
170 | "pinmode": 0,
171 | "client": "52f071e8.d90a9",
172 | "x": 562.2833251953125,
173 | "y": 342.933349609375,
174 | "wires": []
175 | },
176 | {
177 | "id": "5bd93f79.627f98",
178 | "type": "function",
179 | "z": "f12e8a0a.1aa5c",
180 | "name": "Split IO mask",
181 | "func": "var mask = msg.payload;\n\nvar msg0={};\nvar msg1={};\nvar msg2={};\nvar msg3={};\nvar msg4={};\nvar msg5={};\nvar msg6={};\nvar msg7={};\n\nmsg0.payload = (mask >> 7) & 1;\nmsg1.payload = (mask >> 6) & 1;\nmsg2.payload = (mask >> 5) & 1;\nmsg3.payload = (mask >> 4) & 1;\nmsg4.payload = (mask >> 3) & 1;\nmsg5.payload = (mask >> 2) & 1;\nmsg6.payload = (mask >> 1) & 1;\nmsg7.payload = (mask >> 0) & 1;\n\nreturn [msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7]",
182 | "outputs": 8,
183 | "noerr": 0,
184 | "x": 560.2833251953125,
185 | "y": 485.916748046875,
186 | "wires": [
187 | [
188 | "939a2d4.6ad5dd"
189 | ],
190 | [
191 | "f95f5bab.57c21"
192 | ],
193 | [
194 | "6d173a5b.236e94"
195 | ],
196 | [
197 | "95a1f5aa.181f8"
198 | ],
199 | [
200 | "48143e3b.27d63"
201 | ],
202 | [],
203 | [],
204 | []
205 | ]
206 | },
207 | {
208 | "id": "939a2d4.6ad5dd",
209 | "type": "function",
210 | "z": "f12e8a0a.1aa5c",
211 | "name": "IO/Filtration state",
212 | "func": "var msg0={};\nvar msg1={};\nmsg0.payload = msg.payload;\nmsg1.payload = msg0.payload * 200;\nreturn [msg0,msg1]",
213 | "outputs": 2,
214 | "noerr": 0,
215 | "x": 772.2833251953125,
216 | "y": 386.4666748046875,
217 | "wires": [
218 | [
219 | "77f37c21.f239dc"
220 | ],
221 | [
222 | "f0cc0d96.0d6f08"
223 | ]
224 | ]
225 | },
226 | {
227 | "id": "f0cc0d96.0d6f08",
228 | "type": "blynk-ws-out-write",
229 | "z": "f12e8a0a.1aa5c",
230 | "name": "Filtration LED",
231 | "pin": "4",
232 | "pinmode": 0,
233 | "client": "52f071e8.d90a9",
234 | "x": 983.2833251953125,
235 | "y": 395.4666748046875,
236 | "wires": []
237 | },
238 | {
239 | "id": "77f37c21.f239dc",
240 | "type": "blynk-ws-out-write",
241 | "z": "f12e8a0a.1aa5c",
242 | "name": "Filtration button",
243 | "pin": "3",
244 | "pinmode": 0,
245 | "client": "52f071e8.d90a9",
246 | "x": 985.140380859375,
247 | "y": 334.40478515625,
248 | "wires": []
249 | },
250 | {
251 | "id": "95a1f5aa.181f8",
252 | "type": "function",
253 | "z": "f12e8a0a.1aa5c",
254 | "name": "IO/pH Level",
255 | "func": "msg.payload *= 200;\nreturn msg",
256 | "outputs": 1,
257 | "noerr": 0,
258 | "x": 757.2833251953125,
259 | "y": 550.2833251953125,
260 | "wires": [
261 | [
262 | "b026393f.e68248"
263 | ]
264 | ]
265 | },
266 | {
267 | "id": "b026393f.e68248",
268 | "type": "blynk-ws-out-write",
269 | "z": "f12e8a0a.1aa5c",
270 | "name": "pH Level",
271 | "pin": "6",
272 | "pinmode": 0,
273 | "client": "52f071e8.d90a9",
274 | "x": 945.42626953125,
275 | "y": 550.2618408203125,
276 | "wires": []
277 | },
278 | {
279 | "id": "48143e3b.27d63",
280 | "type": "function",
281 | "z": "f12e8a0a.1aa5c",
282 | "name": "IO/Chl Level",
283 | "func": "msg.payload *= 200;\nreturn msg",
284 | "outputs": 1,
285 | "noerr": 0,
286 | "x": 758.2833251953125,
287 | "y": 600.2833251953125,
288 | "wires": [
289 | [
290 | "7a6493f8.996ca4"
291 | ]
292 | ]
293 | },
294 | {
295 | "id": "7a6493f8.996ca4",
296 | "type": "blynk-ws-out-write",
297 | "z": "f12e8a0a.1aa5c",
298 | "name": "Chl Level",
299 | "pin": "5",
300 | "pinmode": 0,
301 | "client": "52f071e8.d90a9",
302 | "x": 947.42626953125,
303 | "y": 606.2619018554688,
304 | "wires": []
305 | },
306 | {
307 | "id": "325f9088.8189a",
308 | "type": "function",
309 | "z": "f12e8a0a.1aa5c",
310 | "name": "Split IO2 mask",
311 | "func": "var mask = msg.payload;\n\nvar msg0={};\nvar msg1={};\nvar msg2={};\nvar msg3={};\nvar msg4={};\nvar msg5={};\nvar msg6={};\nvar msg7={};\n\nmsg0.payload = (mask >> 7) & 1;\nmsg1.payload = (mask >> 6) & 1;\nmsg2.payload = (mask >> 5) & 1;\nmsg3.payload = (mask >> 4) & 1;\nmsg4.payload = (mask >> 3) & 1;\nmsg5.payload = (mask >> 2) & 1;\nmsg6.payload = (mask >> 1) & 1;\nmsg7.payload = (mask >> 0) & 1;\n\nreturn [msg0,msg1,msg2,msg3,msg4,msg5,msg6,msg7]",
312 | "outputs": 8,
313 | "noerr": 0,
314 | "x": 559.2833251953125,
315 | "y": 682.2833251953125,
316 | "wires": [
317 | [],
318 | [],
319 | [
320 | "b4abd66a.56e1a8"
321 | ],
322 | [],
323 | [],
324 | [],
325 | [],
326 | []
327 | ]
328 | },
329 | {
330 | "id": "b4abd66a.56e1a8",
331 | "type": "function",
332 | "z": "f12e8a0a.1aa5c",
333 | "name": "IO2/Mode",
334 | "func": "var mode = parseInt(msg.payload, 10);\nmsg.payload = mode == 1 ? \"Auto\":\"Manu\";\nreturn msg",
335 | "outputs": 1,
336 | "noerr": 0,
337 | "x": 752.2833404541016,
338 | "y": 663.283332824707,
339 | "wires": [
340 | [
341 | "9c15d2fb.b2d098"
342 | ]
343 | ]
344 | },
345 | {
346 | "id": "9c15d2fb.b2d098",
347 | "type": "blynk-ws-out-write",
348 | "z": "f12e8a0a.1aa5c",
349 | "name": "Mode Label",
350 | "pin": "7",
351 | "pinmode": 0,
352 | "client": "52f071e8.d90a9",
353 | "x": 935.2833404541016,
354 | "y": 663.283332824707,
355 | "wires": []
356 | },
357 | {
358 | "id": "15aec74d.728d41",
359 | "type": "blynk-ws-out-write",
360 | "z": "f12e8a0a.1aa5c",
361 | "name": "pH-Pump",
362 | "pin": "20",
363 | "pinmode": 0,
364 | "client": "52f071e8.d90a9",
365 | "x": 945.2833251953125,
366 | "y": 448.2833251953125,
367 | "wires": []
368 | },
369 | {
370 | "id": "63aa237f.b2f42c",
371 | "type": "blynk-ws-out-write",
372 | "z": "f12e8a0a.1aa5c",
373 | "name": "Chl-Pump",
374 | "pin": "19",
375 | "pinmode": 0,
376 | "client": "52f071e8.d90a9",
377 | "x": 944.2833251953125,
378 | "y": 502.2833251953125,
379 | "wires": []
380 | },
381 | {
382 | "id": "f95f5bab.57c21",
383 | "type": "function",
384 | "z": "f12e8a0a.1aa5c",
385 | "name": "pH Pump state",
386 | "func": "msg.payload *= 200;\nreturn msg",
387 | "outputs": 1,
388 | "noerr": 0,
389 | "x": 779,
390 | "y": 449.5,
391 | "wires": [
392 | [
393 | "15aec74d.728d41",
394 | "7cb80247.4ddd4c"
395 | ]
396 | ]
397 | },
398 | {
399 | "id": "6d173a5b.236e94",
400 | "type": "function",
401 | "z": "f12e8a0a.1aa5c",
402 | "name": "Chl Pump state",
403 | "func": "msg.payload *= 200;\nreturn msg",
404 | "outputs": 1,
405 | "noerr": 0,
406 | "x": 776,
407 | "y": 493.5,
408 | "wires": [
409 | [
410 | "63aa237f.b2f42c"
411 | ]
412 | ]
413 | },
414 | {
415 | "id": "7cb80247.4ddd4c",
416 | "type": "debug",
417 | "z": "f12e8a0a.1aa5c",
418 | "name": "",
419 | "active": true,
420 | "tosidebar": true,
421 | "console": false,
422 | "tostatus": false,
423 | "complete": "false",
424 | "x": 1132,
425 | "y": 448,
426 | "wires": []
427 | },
428 | {
429 | "id": "ad612c0a.14cbd",
430 | "type": "influxdb out",
431 | "z": "f12e8a0a.1aa5c",
432 | "influxdb": "45a93ed5.79a518",
433 | "name": "PoolMaster",
434 | "measurement": "PoolMaster",
435 | "precision": "",
436 | "retentionPolicy": "",
437 | "x": 626.255615234375,
438 | "y": 824.5166015625,
439 | "wires": []
440 | },
441 | {
442 | "id": "8b8f8000.a3e598",
443 | "type": "debug",
444 | "z": "f12e8a0a.1aa5c",
445 | "name": "",
446 | "active": true,
447 | "tosidebar": true,
448 | "console": false,
449 | "tostatus": false,
450 | "complete": "true",
451 | "x": 618.0333862304688,
452 | "y": 875.1277465820312,
453 | "wires": []
454 | },
455 | {
456 | "id": "58bd9ea8.646dd",
457 | "type": "function",
458 | "z": "f12e8a0a.1aa5c",
459 | "name": "Decode MySensor Message",
460 | "func": "if(typeof msg.payload.IO !== 'undefined')\n{\n var mask = msg.payload.IO;\n var mask2 = msg.payload.IO2;\n \n msg.payload.FiltState = (mask >> 7) & 1;\n msg.payload.pHPumpState = (mask >> 6) & 1;\n msg.payload.ChlPumpState = (mask >> 5) & 1;\n msg.payload.pHLevel = (mask >> 4) & 1;\n msg.payload.ChlLevel = (mask >> 3) & 1;\n msg.payload.PSIError = (mask >> 2) & 1;\n msg.payload.pHPumpUpTimeErr = (mask >> 1) & 1;\n msg.payload.ChlPumpUpTimeErr = (mask >> 0) & 1;\n \n msg.payload.pHPIDMode = (mask2 >> 7) & 1;\n msg.payload.ChlPIDMode = (mask2 >> 6) & 1;\n msg.payload.AutoMode = (mask2 >> 5) & 1;\n msg.payload.WaterHeat = (mask2 >> 4) & 1;\n}\nreturn msg;",
461 | "outputs": 1,
462 | "noerr": 0,
463 | "x": 403.1444091796875,
464 | "y": 824.4054565429688,
465 | "wires": [
466 | [
467 | "8b8f8000.a3e598",
468 | "ad612c0a.14cbd"
469 | ]
470 | ]
471 | },
472 | {
473 | "id": "6679fce8.af4b5c",
474 | "type": "debug",
475 | "z": "f12e8a0a.1aa5c",
476 | "name": "",
477 | "active": true,
478 | "tosidebar": true,
479 | "console": false,
480 | "tostatus": false,
481 | "complete": "true",
482 | "x": 337.5,
483 | "y": 341.875,
484 | "wires": []
485 | },
486 | {
487 | "id": "52f071e8.d90a9",
488 | "type": "blynk-ws-client",
489 | "z": "",
490 | "name": "Blynk Cloud",
491 | "path": "ws://blynk-cloud.com/websockets",
492 | "key": "",
493 | "dbg_all": true,
494 | "dbg_read": false,
495 | "dbg_write": false,
496 | "dbg_notify": false,
497 | "dbg_mail": false,
498 | "dbg_prop": false,
499 | "dbg_sync": false,
500 | "dbg_bridge": false,
501 | "dbg_low": false,
502 | "dbg_pins": "",
503 | "multi_cmd": true,
504 | "proxy_type": "no",
505 | "proxy_url": "",
506 | "enabled": true
507 | },
508 | {
509 | "id": "99099cd5.b5ffa8",
510 | "type": "mqtt-broker",
511 | "z": "",
512 | "name": "Local Broker",
513 | "broker": "192.168.0.38",
514 | "port": "1883",
515 | "clientid": "CharNodeRed",
516 | "usetls": false,
517 | "compatmode": true,
518 | "keepalive": "60",
519 | "cleansession": true,
520 | "birthTopic": "Home/NodeRed",
521 | "birthQos": "1",
522 | "birthRetain": "true",
523 | "birthPayload": "online",
524 | "closeTopic": "",
525 | "closePayload": "",
526 | "willTopic": "Home/NodeRed",
527 | "willQos": "0",
528 | "willRetain": "true",
529 | "willPayload": "offline"
530 | },
531 | {
532 | "id": "45a93ed5.79a518",
533 | "type": "influxdb",
534 | "z": "",
535 | "hostname": "127.0.0.1",
536 | "port": "8086",
537 | "protocol": "http",
538 | "database": "POOL",
539 | "name": "Pool",
540 | "usetls": false,
541 | "tls": ""
542 | }
543 | ]
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | PoolMaster 7.0.0
2 | Ph/Orp (Chlorine) regulation system for home pools
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Supported platforms
14 |
15 | The code supports the Atmega2560 microcontroller (eg. Arduino Mega2560 or CONTROLLINO MAXI boards) and it was ported to the ESP32 platform by @Gixy31
16 |
17 |
Brief description
18 |
19 | Four main metrics are measured and periodically reported over MQTT and a 3.5" Nextion touch screen: water temperature and pressure, pH and ORP values.
20 | Pumps states, tank-levels estimates and other parameters are also periodically reported
21 | Two PID regulation loops are running in parallel: one for PH, one for ORP
22 | An additional simple (on/off) regulation loop is handling the water temperature (it starts/stops the house-heating system circulator which brings heat to a heat exchanger mounted on the pool water pipes)
23 | pH is regulated by injecting Acid from a tank into the pool water (a relay starts/stops the Acid peristaltic pump)
24 | ORP is regulated by injecting Chlorine from a tank into the pool water (a relay starts/stops the Chlorine peristaltic pump)
25 | Defined time-slots and water temperature are used to start/stop the filtration pump for a daily given amount of time (a relay starts/stops the filtration pump)
26 | Tank-levels are estimated based on the running-time and flow-rate of each pump.
27 | Ethernet connectivity parameters can be set through a webpage accessible from the LAN at http://PoolMaster.local.
28 | If an ethernet connection is available, the internal clock (RTC) is synchronized with a time-server every day at midnight.
29 |
30 | An API function enables telling the system what the outside air temperature is. In case it is below -2.0°C, filtration is started until it rises back above +2.0°C
31 | Communication with the system is performed using the MQTT protocol over an Ethernet connection to the local network/MQTT broker.
32 |
33 | Every 30 seconds (by default), the system will publish on the "PoolTopicMeas1" and "PoolTopicMeas2"(see in code below) the following payloads in Json format:
34 | {"Tmp":818,"pH":321,"PSI":56,"Orp":583,"FilUpT":8995,"PhUpT":0,"ChlUpT":0}
35 | {"AcidF":100,"ChlF":100,"IO":11,"IO2":0}
36 | Tmp: measured Water temperature value in °C x100 (8.18°C in the above example payload)
37 | pH: measured pH value x100 (3.21 in the above example payload)
38 | Orp: measured Orp (aka Redox) value in mV (583mV in the above example payload)
39 | PSI: measured Water pressure value in bar x100 (0.56bar in the above example payload)
40 | FiltUpT: current running time of Filtration pump in seconds (reset every 24h. 8995secs in the above example payload)
41 | PhUpT: current running time of Ph pump in seconds (reset every 24h. 0secs in the above example payload)
42 | ChlUpT: current running time of Chl pump in seconds (reset every 24h. 0secs in the above example payload)
43 | AcidF: percentage fill estimate of acid tank ("pHTank" command must have been called when a new acid tank was set in place in order to have accurate value)
44 | ChlF: percentage fill estimate of Chlorine tank ("ChlTank" command must have been called when a new Chlorine tank was set in place in order to have accurate value)
45 | IO: a variable of type BYTE where each individual bit is the state of a digital input on the Arduino. These are :
46 |
47 | - FiltPump: current state of Filtration Pump (0=on, 1=off)
48 | - PhPump: current state of Ph Pump (0=on, 1=off)
49 | - ChlPump: current state of Chl Pump (0=on, 1=off)
50 | - PhlLevel: current state of Acid tank level (0=empty, 1=ok)
51 | - ChlLevel: current state of Chl tank level (0=empty, 1=ok)
52 | - PSIError: over-pressure error
53 | - pHErr: pH pump overtime error flag
54 | - ChlErr: Chl pump overtime error flag
55 |
56 | IO2: a variable of type BYTE where each individual bit is the state of a digital input on the Arduino. These are :
57 |
58 | - pHPID: current state of pH PID regulation loop (1=on, 0=off)
59 | - OrpPID: current state of Orp PID regulation loop (1=on, 0=off)
60 | - Mode: state of pH and Orp regulation mode (0=manual, 1=auto)
61 | - Heat: state of water heat command (0=off, 1=on)
62 | - R1: state of Relay1 (0=off, 1=on)
63 | - R2: state of Relay2 (0=off, 1=on)
64 | - R6: state of Relay6 (0=off, 1=on)
65 | - R7: state of Relay7 (0=off, 1=on)
66 |
67 |
68 | How to compile
69 |
70 | - this code was developped for two main hardware configurations (see list in the hardware section below):
71 |
72 | - Controllino-Maxi or
73 | - Arduino Mega 2560 + Ethernet shield + relay shield + RTC module
74 | - select the target board type in the Arduino IDE (either "Arduino Mega 2560" or "Controllino Maxi") code should compile for both types
75 |
76 |
77 | Compatibility
78 |
79 | For this sketch to work on your setup you must change the following in the code (in the "Config.h" file):
80 | - possibly the pinout definitions depending on your wiring
81 | - the unique address of the DS18b20 water temperature sensor
82 | - MAC and IP address of the Ethernet shield
83 | - MQTT broker IP address and login credentials
84 | - possibly the topic names on the MQTT broker to subscribe and publish to
85 | - the Kp,Ki,Kd parameters for both PID loops in case your peristaltic pumps have a different throughput than 1.5Liters/hour for the pH pump and 3.0Liters/hour for the Chlorine pump. Also the default Kp values were adjusted for a 50m3 pool volume. You might have to adjust the Kp values in case of a different pool volume and/or peristaltic pumps throughput (start by adjusting it proportionally). In any case these parameters are likely to require adjustments for every pool
86 |
87 | Tips
88 | Before attempting to regulate your pool water with this automated system, it is essential that you start with:
89 | 1- testing your water quality (using liquid kits and/or test strips for instance) and balancing it properly (pH, Chlorine, Alkalinity, Hardness). Proper water balancing will greatly ease the pH stability and regulation
90 | 2- calibrating the pH probe using calibrated buffer solutions (pay attention to the water temperature which plays a big role in pH readings)
91 | 3- adjusting pH to 7.4
92 | 4- once above steps 1 to 3 are ok, you can start regulating ORP
93 |
94 | Notes:
95 | a/ the ORP sensor should theoretically not be calibrated nore temperature compensated (by nature its 0mV pivot point cannot shift)
96 | b/ the ORP reading is strongly affected by the pH value and the water temperature. Make sure pH is adjusted at 7.4
97 | c/ prefer platinium ORP probes for setpoints >500mV (ie. Pools and spas)
98 | e/ the response time of ORP sensors can be fast in reference buffer solutions (10 secs) and yet very slow in pool water (minutes or more) as it depends on the water composition
99 |
100 | Details on the PID regulation
101 |
102 | In this project the Arduino PID library is used to start/stop the chemicals pumps in a cyclic manner, similar to a "PWM" signal.
103 | The period of the cycle is defined by the WINDOW SIZE parameter which is fixed (in Milliseconds). What the PID library does is vary the duty cycle of the cycle.
104 |
105 | If the computed error in the PID loop is null or negative, the duty cycle is set to zero (the ouput of the function PID.Compute()) and the pump is never actuated.
106 | If the error is positive, the duty cycle is set to a value between 0 and a max value (equal to the WINDOW SIZE, ie. the pump is running full time).
107 |
108 | So in practice the ouput of the PID.Compute() function is a duration in milliseconds during which the pump will be activated for every cycle.
109 | If for instance, the WINDOW SIZE is set to 3600000ms (ie. one hour) and the output of the PID is 600000ms (ie. 10mins), the pump will be activated for 10mins at the begining of every hour cycle.
110 |
111 | On the default Kp,Ki,Kd parameter values of the PID:
112 | By default in this project, Ki and Kd are null for stability reasons and so the PID loop is only a P loop, ie. a proportional loop.
113 | Adding some Ki and Kd to the PID loop may theoretically increase regulation performance but is also more complex to adjust and could result in instabilities. Since a P-only loop worked well enough and that safety considerations should be taken seriously in this project, I left it as is.
114 |
115 | For my 50m3 pool the Kp default values are 2000000 for the pH loop and 4500 for the Orp loop. They were chosen experimentally in the following way:
116 |
117 | I experimentally checked how much chemical was required to change the measured parameter (pH or Orp) by a certain amount. For instance I determined that 83ml of acid changed the pH by 0.1 for my 50m3 pool. The flow rate of the acid pump being 1.5L/hour, we can then determine for how many minutes the pump should be activated if the pH error is 0.1, which are (0.083*60/1.5) = 3.3minutes or roughly 200000ms.
118 | And so for an error of 1 in the pH PID loop, the pump needs to be activated 10 times longer, ie. during 2000000ms, which should be taken as the Kp value. The same reasoning goes for the Kp value of the Orp PID loop.
119 |
120 | On the WINDOW SIZE:
121 | Various parameters influence the speed at which an injected chemical in the pool water will result in a variation in the measured pH or Orp.
122 | Experimentally I measured that in my case it can take up to 30minutes and therefore the injection cycle period should be at least 30mins or longer in order not to inject more chemical over the following cycles thinking that it required more when in fact the chemical reactions simply needed more time to take effect, which would eventually result in overshooting.
123 | So in my case I setlled for a safe one hour WINDOW SIZE (ie. 3600000ms)
124 |
125 |
126 |
127 |
128 |
129 | MQTT API
130 |
131 | Below are the Payloads/commands to publish on the "PoolTopicAPI" topic (see hardcoded in code) in Json format in order to launch actions on the Arduino:
132 |
133 | - {"Mode":1} or {"Mode":0} -> set "Mode" to manual (0) or Auto (1). In Auto, filtration starts/stops at set times of the day and pH and Orp are regulated
134 | - {"Heat":1} or {"Heat":0} -> start/stop the regulation of the pool water temperature
135 | - {"FiltPump":1} or {"FiltPump":0} -> manually start/stop the filtration pump
136 | - {"ChlPump":1} or {"ChlPump":0} -> manually start/stop the Chl pump to add more Chlorine
137 | - {"PhPump":1} or {"PhPump":0} -> manually start/stop the Acid pump to lower the Ph
138 | - {"PhPID":1} or {"PhPID":0} -> start/stop the Ph PID regulation loop
139 | - {"OrpPID":1} or {"OrpPID":0} -> start/stop the Orp PID regulation loop
140 | - {"PhCalib":[4.02,3.8,9.0,9.11]} -> multi-point linear regression calibration (minimum 1 point-couple, 6 max.) in the form [ProbeReading_0, BufferRating_0, xx, xx, ProbeReading_n, BufferRating_n]
141 |
- {"OrpCalib":[450,465,750,784]} -> multi-point linear regression calibration (minimum 1 point-couple, 6 max.) in the form [ProbeReading_0, BufferRating_0, xx, xx, ProbeReading_n, BufferRating_n]
142 |
- {"PhSetPoint":7.4} -> set the Ph setpoint, 7.4 in this example
143 | - {"OrpSetPoint":750.0} -> set the Orp setpoint, 750mV in this example
144 | - {"WSetPoint":27.0} -> set the water temperature setpoint, 27.0deg in this example
145 | - {"WTempLow":10.0} -> set the water low-temperature threshold below which there is no need to regulate Orp and Ph (ie. in winter)
146 | - {"OrpPIDParams":[2857,0,0]} -> respectively set Kp,Ki,Kd parameters of the Orp PID loop. In this example they are set to 2857, 0 and 0
147 | - {"PhPIDParams":[1330000,0,0.0]} -> respectively set Kp,Ki,Kd parameters of the Ph PID loop. In this example they are set to 1330000, 0 and 0
148 | - {"OrpPIDWSize":3600000} -> set the window size of the Orp PID loop in msec, 60mins in this example
149 | - {"PhPIDWSize":1200000} -> set the window size of the Ph PID loop in msec, 20mins in this example
150 | - {"Date":[1,1,1,18,13,32,0]} -> set date/time of RTC module in the following format: (Day of the month, Day of the week, Month, Year, Hour, Minute, Seconds), in this example: Monday 1st January 2018 - 13h32mn00secs
151 | - {"FiltT0":9} -> set the earliest hour (9:00 in this example) to run filtration pump. Filtration pump will not run beofre that hour
152 | - {"FiltT1":20} -> set the latest hour (20:00 in this example) to run filtration pump. Filtration pump will not run after that hour
153 | - {"PubPeriod":30} -> set the periodicity (in seconds) at which the system info (pumps states, tank levels states, measured values, etc) will be published to the MQTT broker
154 | - {"PumpsMaxUp":1800} -> set the Max Uptime (in secs) for the Ph and Chl pumps over a 24h period. If over, PID regulation is stopped and a warning flag is raised
155 | - {"Clear":1} -> reset the pH and Orp pumps overtime error flags in order to let the regulation loops continue. "Mode" also needs to be switched back to Auto (1) after an error flag was raised
156 | - {"DelayPID":30} -> Delay (in mins) after FiltT0 before the PID regulation loops will start. This is to let the Orp and pH readings stabilize first. 30mins in this example. Should not be > 59mins
157 | - {"TempExt":4.2} -> Provide the system with the external temperature. Should be updated regularly and will be used to start filtration when temperature is less than 2°C. 4.2deg in this example
158 | - {"PSIHigh":1.0} -> set the water high-pressure threshold (1.0bar in this example). When water pressure is over that threshold, an error flag is set
159 | - {"pHTank":[20,100]} -> call this function when the Acid tank is replaced or refilled. First parameter is the tank volume in Liters, second parameter is its percentage fill (100% when full)
160 | - {"ChlTank":[20,100]} -> call this function when the Chlorine tank is replaced or refilled. First parameter is the tank volume in Liters, second parameter is its percentage fill (100% when full)
161 | - {"Relay":[1,1]} -> call this generic command to actuate spare relays. Parameter 1 is the relay number (R1 in this example), parameter 2 is the relay state (ON in this example). This command is useful to use spare relays for additional features (lighting, etc). Available relay numbers are 1,2,6,7,8,9
162 | - {"Reboot":1} -> call this command to reboot the controller (after 8 seconds from calling this command)
163 | - {"pHPumpFR":1.5} -> call this command to set pH pump flow rate un L/s. In this example 1.5L/s
164 | - {"ChlPumpFR":3} -> call this command to set Chl pump flow rate un L/s. In this example 3L/s
165 | - {"RstpHCal":1} -> call this command to reset the calibration coefficients of the pH probe
166 | - {"RstOrpCal":1} -> call this command to reset the calibration coefficients of the Orp probe
167 | - {"RstPSICal":1} -> call this command to reset the calibration coefficients of the pressure sensor
168 |
169 |
170 |
171 |
172 |
173 |
174 | Hardware
175 |
176 |
188 |
189 |
190 | Wiring
191 |
192 | Below is a (quick and dirty) wiring diagram with the Controllino MAXI. Right click and display image in full screen to see the details.
193 |
194 |
195 |
196 | Cloud integration example (BLYNK)
197 |
198 | See NodeRed folder for more info and code
199 |
200 |
201 |
202 |
203 | Non-cloud home automation integration example (Node-Red + InfluxDB + Grafana)
204 |
205 | See the NodeRed folder for more info and this tutorial on how to create a Grafana dashboard from MQTT data.
206 |
207 |
208 |
209 |
210 |
211 | Non-cloud home automation integration example (JEEDOM)
212 |
213 |
214 |
215 |
216 |
217 |
--------------------------------------------------------------------------------
/docs/Blynk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Blynk.jpg
--------------------------------------------------------------------------------
/docs/Blynk2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Blynk2.jpg
--------------------------------------------------------------------------------
/docs/CONTROLLINO_MAXI_Pinout_Table.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/CONTROLLINO_MAXI_Pinout_Table.pdf
--------------------------------------------------------------------------------
/docs/Grafana.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Grafana.png
--------------------------------------------------------------------------------
/docs/JeedomInterface.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/JeedomInterface.jpg
--------------------------------------------------------------------------------
/docs/JeedomInterface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/JeedomInterface.png
--------------------------------------------------------------------------------
/docs/MeasuringChamberPickup.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/MeasuringChamberPickup.JPG
--------------------------------------------------------------------------------
/docs/Nextion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Nextion.png
--------------------------------------------------------------------------------
/docs/NodeRedDashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/NodeRedDashboard.png
--------------------------------------------------------------------------------
/docs/OneWayInjectionNozzles.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/OneWayInjectionNozzles.JPG
--------------------------------------------------------------------------------
/docs/Plumbing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Plumbing.png
--------------------------------------------------------------------------------
/docs/PoolMaster.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/PoolMaster.jpg
--------------------------------------------------------------------------------
/docs/PoolMasterBox_pf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/PoolMasterBox_pf.jpg
--------------------------------------------------------------------------------
/docs/PoolMasterIntegration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/PoolMasterIntegration.png
--------------------------------------------------------------------------------
/docs/PoolMaster_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/PoolMaster_2.jpg
--------------------------------------------------------------------------------
/docs/PoolMaster_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/PoolMaster_3.jpg
--------------------------------------------------------------------------------
/docs/Probes cross-talk test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Probes cross-talk test.jpg
--------------------------------------------------------------------------------
/docs/Reaction_to_pH_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Reaction_to_pH_plus.png
--------------------------------------------------------------------------------
/docs/TemperatureProbe.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/TemperatureProbe.JPG
--------------------------------------------------------------------------------
/docs/TuileJeedom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/TuileJeedom.jpg
--------------------------------------------------------------------------------
/docs/VirtuelJeedom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/VirtuelJeedom.jpg
--------------------------------------------------------------------------------
/docs/VirtuelJeedom_pf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/VirtuelJeedom_pf.jpg
--------------------------------------------------------------------------------
/docs/Wiring.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Loic74650/PoolMaster/7f46f519dadafb3148cbf901fb7c9be39e42cc2e/docs/Wiring.jpg
--------------------------------------------------------------------------------
/libraries/Dependencies.txt:
--------------------------------------------------------------------------------
1 | https://github.com/256dpi/arduino-mqtt/releases (rev 2.4.3)
2 | https://github.com/CONTROLLINO-PLC/CONTROLLINO_Library (rev 3.0.4)
3 | https://github.com/PaulStoffregen/OneWire (rev 2.3.4)
4 | https://github.com/milesburton/Arduino-Temperature-Control-Library (rev 3.7.2)
5 | https://github.com/RobTillaart/Arduino/tree/master/libraries/RunningMedian (rev 0.1.15)
6 | https://github.com/prampec/arduino-softtimer (rev 3.1.3)
7 | https://github.com/bricofoy/yasm (rev 0.9.2)
8 | https://github.com/br3ttb/Arduino-PID-Library (rev 1.2.0)
9 | https://github.com/bblanchon/ArduinoJson (rev 5.13.4)
10 | https://github.com/thijse/Arduino-EEPROMEx (rev 1.0.0)
11 | https://github.com/EinarArnason/ArduinoQueue
12 | https://github.com/PaulStoffregen/Time (rev 1.5) -> /!\ Bug: in file "Time.cpp" "static const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31};" must be replaced by "static volatile const uint8_t monthDays[]={31,28,31,30,31,30,31,31,30,31,30,31};"
13 | https://github.com/adafruit/RTClib (rev 1.2.0)
14 | https://github.com/TrippyLighting/EthernetBonjour
15 | https://github.com/Seithan/EasyNextionLibrary (rev 1.0.6)
16 | http://arduiniana.org/libraries/streaming/ (rev 5)
17 | https://github.com/tardate/TextFinder
18 | https://lygte-info.dk/pic/Projects/ADS1115Library/ADS1115.zip (rev 1.0.0) -> documentation here: https://lygte-info.dk/project/ADS1115Library%20UK.html
--------------------------------------------------------------------------------
/source/PoolMaster/Config.h:
--------------------------------------------------------------------------------
1 | #include "OneWire.h"
2 |
3 | #define DEBUG ->comment this line to prevent code from writing debug messages to serial port
4 | #define pHOrpBoard //->comment this line if your setup is using the Phidget boards ((PoolMaster V5.0 and earlier) as interface to the pH and Orp probes instead of the default pHOrpBoard(https://github.com/Loic74650/pH_Orp_Board)
5 |
6 | #include "DebugUtils.h"
7 |
8 | #if defined(CONTROLLINO_MAXI) //Controllino Maxi board specifics
9 |
10 | #include
11 |
12 | //output relays pin definitions
13 | #define FILTRATION_PUMP CONTROLLINO_R4 //CONTROLLINO_RELAY_4
14 | #define PH_PUMP CONTROLLINO_R3 //CONTROLLINO_RELAY_3
15 | #define CHL_PUMP CONTROLLINO_R5 //CONTROLLINO_RELAY_5
16 | #define HEAT_ON CONTROLLINO_R0 //CONTROLLINO_RELAY_0
17 |
18 | #define RELAY_R1 CONTROLLINO_R1 //CONTROLLINO_RELAY_1
19 | #define RELAY_R2 CONTROLLINO_R2 //CONTROLLINO_RELAY_2
20 | #define RELAY_R6 CONTROLLINO_R6 //CONTROLLINO_RELAY_6
21 | #define RELAY_R7 CONTROLLINO_R7 //CONTROLLINO_RELAY_7
22 | #define RELAY_R8 CONTROLLINO_R8 //CONTROLLINO_RELAY_8
23 | #define RELAY_R9 CONTROLLINO_R9 //CONTROLLINO_RELAY_9
24 |
25 | //Digital input pins connected to Acid and Chl tank level reed switches
26 | #define CHL_LEVEL CONTROLLINO_D1 //CONTROLLINO_D1 pin 3
27 | #define PH_LEVEL CONTROLLINO_D3 //CONTROLLINO_D3 pin 5
28 |
29 | //Analog input pins connected to Phidgets 1130_0 pH/ORP Adapters.
30 | //Galvanic isolation circuitry between Adapters and Arduino required!
31 | #define ORP_MEASURE CONTROLLINO_A2 //CONTROLLINO_A2 pin A2 on pin header connector, not on screw terminal (/!\)
32 | #define PH_MEASURE CONTROLLINO_A4 //CONTROLLINO_A4 pin A4 on pin header connector, not on screw terminal (/!\)
33 |
34 | //Analog input pin connected to pressure sensor
35 | #define PSI_MEASURE CONTROLLINO_A9 //CONTROLLINO_A9 pin A9 on pin header connector, not on screw terminal (/!\)
36 |
37 | #else //Mega2560 board specifics
38 |
39 | #include
40 | #include "RTClib.h"
41 | RTC_DS3231 rtc;
42 |
43 | #if !( defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) )
44 | #error This code is intended to run only on the Arduino Mega 1280/2560 boards ! Please check your Tools->Board setting.
45 | #endif
46 | // #define EspSerial Serial3
47 | #define EEPROM_START 512
48 | // #include
49 |
50 | #define FILTRATION_PUMP A14
51 | #define PH_PUMP 36
52 | #define CHL_PUMP 42
53 | #define HEAT_ON 58
54 |
55 | #define RELAY_R1 37
56 | #define RELAY_R2 31
57 | #define RELAY_R6 32
58 | #define RELAY_R7 33
59 | #define RELAY_R8 34
60 | #define RELAY_R9 35
61 |
62 |
63 | //Digital input pins connected to Acid and Chl tank level reed switches
64 | #define CHL_LEVEL 28
65 | #define PH_LEVEL 30
66 |
67 | //Analog input pins connected to Phidgets 1130_0 pH/ORP Adapters.
68 | //Galvanic isolation circuitry between Adapters and Arduino required!
69 | #define ORP_MEASURE A2
70 | #define PH_MEASURE A0
71 |
72 | //Analog input pin connected to pressure sensor
73 | #define PSI_MEASURE A10
74 |
75 | #endif
76 |
77 | //One wire bus for the water temperature measurement
78 | //Data wire is connected to input digital pin 6 on the Arduino
79 | #define ONE_WIRE_BUS_A 6
80 |
81 | // Setup a oneWire instance to communicate with any OneWire devices
82 | OneWire oneWire_A(ONE_WIRE_BUS_A);
83 | #include
84 | #include
85 |
86 | // Pass our oneWire reference to Dallas Temperature library instance
87 | DallasTemperature sensors_A(&oneWire_A);
88 |
89 | //12bits (0,06°C) temperature sensor resolution
90 | #define TEMPERATURE_RESOLUTION 12
91 |
92 | //MAC Address of DS18b20 water temperature sensor
93 | DeviceAddress DS18b20_0 = { 0x28, 0x92, 0x25, 0x41, 0x0A, 0x00, 0x00, 0xEE };
94 | String sDS18b20_0;
95 |
96 | String sArduinoMac;
97 | //IPAddress ip(192, 168, 0, 188); //IP address, needs to be adapted depending on local network topology
98 |
99 | //Version of config stored in Eeprom
100 | //Random value. Change this value (to any other value) to revert the config to default values
101 | #define CONFIG_VERSION 120
102 |
103 | //interval (in miilisec) between MQTT publishes of measurement data
104 | #define PublishInterval 30000
105 |
106 | //Settings structure and its default values
107 | struct StoreStruct
108 | {
109 | uint8_t ConfigVersion; // This is for testing if first time using eeprom or not
110 | bool Ph_RegulationOnOff, Orp_RegulationOnOff, AutoMode, WaterHeat;
111 | uint8_t FiltrationStart, FiltrationDuration, FiltrationStopMax, FiltrationStop, DelayPIDs;
112 | unsigned long PhPumpUpTimeLimit, ChlPumpUpTimeLimit;
113 | unsigned long PhPIDWindowSize, OrpPIDWindowSize, PhPIDwindowStartTime, OrpPIDwindowStartTime;
114 | double Ph_SetPoint, Orp_SetPoint, PSI_HighThreshold, PSI_MedThreshold, WaterTempLowThreshold, WaterTemp_SetPoint, TempExternal, pHCalibCoeffs0, pHCalibCoeffs1, OrpCalibCoeffs0, OrpCalibCoeffs1, PSICalibCoeffs0, PSICalibCoeffs1;
115 | double Ph_Kp, Ph_Ki, Ph_Kd, Orp_Kp, Orp_Ki, Orp_Kd, PhPIDOutput, OrpPIDOutput, TempValue, PhValue, OrpValue, PSIValue, PhValue2, OrpValue2;
116 | double AcidFill, ChlFill, pHTankVol, ChlTankVol, pHPumpFR, ChlPumpFR;
117 | byte ip[4], subnet[4], gateway[4], dnsserver[4], mac[6];
118 | bool ipConfiged;
119 | } storage =
120 | { //default values. Change the value of CONFIG_VERSION in order to restore the default values
121 | CONFIG_VERSION,
122 | 0, 0, 1, 0,
123 | 8, 13, 21, 20, 120,
124 | 900, 2500,
125 | 3000000, 3600000, 0, 0,
126 | #if defined(pHOrpBoard) //using the I2C pHOrpBoard as interface to the pH and Orp probes
127 | 7.4, 750.0, 0.5, 0.25, 10.0, 27.0, 3.0, 1.15, 6.97, 244.42, -18.15, 1.11, 0.00,
128 | #else
129 | 7.4, 750.0, 0.5, 0.25, 10.0, 27.0, 3.0, 4.78, -2.54, -1291, 2580, 1.11, 0.0,
130 | #endif
131 | 2000000.0, 0.0, 0.0, 4500.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4, 0.0, 0.0,
132 | 100.0, 100.0, 20.0, 20.0, 1.5, 3.0,
133 | {192, 168, 0, 188}, {255, 255, 255, 0}, {192, 168, 0, 254}, {8, 8, 8, 8}, {0xA8, 0x61, 0x0A, 0xAE, 0x2C, 0x68},
134 | 0
135 | };
136 |
137 | // MAC address of Ethernet shield (in case of Controllino board, set an arbitrary MAC address)
138 | byte mac[] = { 0xA8, 0x61, 0x0A, 0xAE, 0x65, 0x04}; //-> Mega2560 dev setup with Ethernet shield
139 |
140 | //MQTT stuff including local broker/server IP address, login and pwd
141 | MQTTClient MQTTClient;
142 | const char* MqttServerIP = "192.168.0.38";
143 | //const char* MqttServerIP = "broker.mqttdashboard.com";//cloud-based MQTT broker to test when node-red and MQTT broker are not installed locally (/!\ public and unsecure!)
144 | const char* MqttServerClientID = "ArduinoPool4"; // /!\ choose a client ID which is unique to this Arduino board
145 | const char* MqttServerLogin = nullptr; //replace by const char* MqttServerLogin = nullptr; in case broker does not require a login/pwd
146 | const char* MqttServerPwd = nullptr; //replace by const char* MqttServerPwd = nullptr; in case broker does not require a login/pwd
147 | const char* PoolTopicMeas1 = "PoolMaster_3532313237161307/Meas1";
148 | const char* PoolTopicMeas2 = "PoolMaster_3532313237161307/Meas2";
149 | const char* PoolTopicSet1 = "PoolMaster_3532313237161307/Set1";
150 | const char* PoolTopicSet2 = "PoolMaster_3532313237161307/Set2";
151 | const char* PoolTopicSet3 = "PoolMaster_3532313237161307/Set3";
152 | const char* PoolTopicSet4 = "PoolMaster_3532313237161307/Set4";
153 | const char* PoolTopicSet5 = "PoolMaster_3532313237161307/Set5";
154 | const char* PoolTopicAPI = "PoolMaster_3532313237161307/API";
155 | const char* PoolTopicStatus = "PoolMaster_3532313237161307/status";
156 | const char* PoolTopicError = "PoolMaster_3532313237161307/Err";
157 |
--------------------------------------------------------------------------------
/source/PoolMaster/DebugUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | DebugUtils.h - Simple debugging utilities.
3 | Copyright (C) 2011 Fabio Varesano
4 |
5 | Ideas taken from:
6 | http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1271517197
7 |
8 | This program is free software: you can redistribute it and/or modify
9 | it under the terms of the version 3 GNU General Public License as
10 | published by the Free Software Foundation.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program. If not, see .
19 |
20 | */
21 |
22 | #ifndef DEBUGUTILS_H
23 | #define DEBUGUTILS_H
24 |
25 | #ifdef DEBUG
26 | #include
27 | #define DEBUG_PRINT2(str) \
28 | Serial.print(millis()); \
29 | Serial.print(": "); \
30 | Serial.print(__PRETTY_FUNCTION__); \
31 | Serial.print(' '); \
32 | Serial.print(__FILE__); \
33 | Serial.print(':'); \
34 | Serial.print(__LINE__); \
35 | Serial.print(' '); \
36 | Serial.println(str);
37 |
38 | #define DEBUG_PRINT(str) \
39 | Serial.print(millis()); \
40 | Serial.print(": "); \
41 | Serial.print(__PRETTY_FUNCTION__); \
42 | Serial.print(':'); \
43 | Serial.print(' '); \
44 | Serial.println(str);
45 | #else
46 | #define DEBUG_PRINT(str)
47 | #define DEBUG_PRINT2(str)
48 | #endif
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/source/PoolMaster/EthernetSetup.ino:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // This is our buffer through which we will will "flow" our HTML code.
4 | // It has to be as big as the longest character chain +1 including the "
5 | char buffer[100];
6 |
7 | // This is the HTML code all chopped up. The best way to do this is, is by typing
8 | // your HTML code in an editor, counting your characters and divide them by 8.
9 | // you can chop your HTML on every place, but not on the \" parts. So remember,
10 | // you have to use \" instead of simple " within the HTML, or it will not work.
11 |
12 | const char htmlx0[] PROGMEM = "PoolMaster Ethernet Setup Page|   Poolmaster Ethernet Setup Page |
";
16 | PGM_P const string_table0[] PROGMEM = {htmlx0, htmlx1, htmlx2, htmlx3};
17 |
18 | // MAC is entered in HEX (T1 3 5 7 9 11) but submitted in (hidden) Decimal - Byte (0-254) (T2 4 6 8 10)
19 |
20 | const char htmla0[] PROGMEM = "