nodejs-poolcontroller 7.6.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.eslintrc.json +36 -45
  2. package/.github/ISSUE_TEMPLATE/1-bug-report.yml +84 -0
  3. package/.github/ISSUE_TEMPLATE/2-docs.md +12 -0
  4. package/.github/ISSUE_TEMPLATE/3-proposal.md +28 -0
  5. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  6. package/CONTRIBUTING.md +74 -74
  7. package/Changelog +242 -215
  8. package/Dockerfile +17 -17
  9. package/Gruntfile.js +40 -40
  10. package/LICENSE +661 -661
  11. package/README.md +195 -191
  12. package/anslq25/MessagesMock.ts +218 -0
  13. package/anslq25/boards/MockBoardFactory.ts +50 -0
  14. package/anslq25/boards/MockEasyTouchBoard.ts +696 -0
  15. package/anslq25/boards/MockSystemBoard.ts +217 -0
  16. package/anslq25/chemistry/MockChlorinator.ts +75 -0
  17. package/anslq25/pumps/MockPump.ts +84 -0
  18. package/app.ts +10 -14
  19. package/config/Config.ts +26 -8
  20. package/config/VersionCheck.ts +8 -4
  21. package/controller/Constants.ts +59 -25
  22. package/controller/Equipment.ts +2667 -2459
  23. package/controller/Errors.ts +181 -180
  24. package/controller/Lockouts.ts +534 -436
  25. package/controller/State.ts +596 -77
  26. package/controller/boards/AquaLinkBoard.ts +1003 -0
  27. package/controller/boards/BoardFactory.ts +53 -45
  28. package/controller/boards/EasyTouchBoard.ts +3079 -2653
  29. package/controller/boards/IntelliCenterBoard.ts +3821 -4230
  30. package/controller/boards/IntelliComBoard.ts +69 -63
  31. package/controller/boards/IntelliTouchBoard.ts +384 -241
  32. package/controller/boards/NixieBoard.ts +1871 -1675
  33. package/controller/boards/SunTouchBoard.ts +393 -0
  34. package/controller/boards/SystemBoard.ts +5244 -4697
  35. package/controller/comms/Comms.ts +905 -541
  36. package/controller/comms/ScreenLogic.ts +1663 -0
  37. package/controller/comms/messages/Messages.ts +382 -54
  38. package/controller/comms/messages/config/ChlorinatorMessage.ts +8 -4
  39. package/controller/comms/messages/config/CircuitGroupMessage.ts +5 -2
  40. package/controller/comms/messages/config/CircuitMessage.ts +82 -13
  41. package/controller/comms/messages/config/ConfigMessage.ts +3 -1
  42. package/controller/comms/messages/config/CoverMessage.ts +2 -1
  43. package/controller/comms/messages/config/CustomNameMessage.ts +31 -30
  44. package/controller/comms/messages/config/EquipmentMessage.ts +5 -1
  45. package/controller/comms/messages/config/ExternalMessage.ts +33 -3
  46. package/controller/comms/messages/config/FeatureMessage.ts +2 -1
  47. package/controller/comms/messages/config/GeneralMessage.ts +2 -1
  48. package/controller/comms/messages/config/HeaterMessage.ts +145 -11
  49. package/controller/comms/messages/config/IntellichemMessage.ts +2 -1
  50. package/controller/comms/messages/config/OptionsMessage.ts +16 -27
  51. package/controller/comms/messages/config/PumpMessage.ts +62 -47
  52. package/controller/comms/messages/config/RemoteMessage.ts +80 -13
  53. package/controller/comms/messages/config/ScheduleMessage.ts +390 -347
  54. package/controller/comms/messages/config/SecurityMessage.ts +2 -1
  55. package/controller/comms/messages/config/ValveMessage.ts +44 -27
  56. package/controller/comms/messages/status/ChlorinatorStateMessage.ts +44 -91
  57. package/controller/comms/messages/status/EquipmentStateMessage.ts +139 -30
  58. package/controller/comms/messages/status/HeaterStateMessage.ts +135 -86
  59. package/controller/comms/messages/status/IntelliChemStateMessage.ts +448 -445
  60. package/controller/comms/messages/status/IntelliValveStateMessage.ts +36 -35
  61. package/controller/comms/messages/status/PumpStateMessage.ts +92 -2
  62. package/controller/comms/messages/status/VersionMessage.ts +2 -1
  63. package/controller/nixie/Nixie.ts +173 -162
  64. package/controller/nixie/NixieEquipment.ts +104 -103
  65. package/controller/nixie/bodies/Body.ts +120 -120
  66. package/controller/nixie/bodies/Filter.ts +135 -135
  67. package/controller/nixie/chemistry/ChemController.ts +2682 -2498
  68. package/controller/nixie/chemistry/ChemDoser.ts +806 -0
  69. package/controller/nixie/chemistry/Chlorinator.ts +367 -314
  70. package/controller/nixie/circuits/Circuit.ts +402 -248
  71. package/controller/nixie/heaters/Heater.ts +815 -649
  72. package/controller/nixie/pumps/Pump.ts +934 -661
  73. package/controller/nixie/schedules/Schedule.ts +319 -257
  74. package/controller/nixie/valves/Valve.ts +170 -170
  75. package/defaultConfig.json +346 -286
  76. package/logger/DataLogger.ts +448 -448
  77. package/logger/Logger.ts +38 -9
  78. package/package.json +60 -56
  79. package/tsconfig.json +25 -25
  80. package/web/Server.ts +275 -117
  81. package/web/bindings/aqualinkD.json +560 -0
  82. package/web/bindings/homeassistant.json +437 -0
  83. package/web/bindings/influxDB.json +1066 -1021
  84. package/web/bindings/mqtt.json +721 -654
  85. package/web/bindings/mqttAlt.json +746 -684
  86. package/web/bindings/rulesManager.json +54 -54
  87. package/web/bindings/smartThings-Hubitat.json +31 -31
  88. package/web/bindings/valveRelays.json +20 -20
  89. package/web/bindings/vera.json +25 -25
  90. package/web/interfaces/baseInterface.ts +188 -136
  91. package/web/interfaces/httpInterface.ts +148 -124
  92. package/web/interfaces/influxInterface.ts +283 -245
  93. package/web/interfaces/mqttInterface.ts +695 -475
  94. package/web/interfaces/ruleInterface.ts +87 -0
  95. package/web/services/config/Config.ts +177 -49
  96. package/web/services/config/ConfigSocket.ts +2 -1
  97. package/web/services/state/State.ts +154 -3
  98. package/web/services/state/StateSocket.ts +69 -18
  99. package/web/services/utilities/Utilities.ts +232 -42
  100. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -52
  101. package/config copy.json +0 -300
  102. package/issue_template.md +0 -52
package/README.md CHANGED
@@ -1,191 +1,195 @@
1
- # nodejs-poolController - Version 7.6
2
-
3
- ## What is nodejs-poolController
4
-
5
- nodejs-poolController is an application to communicate and control your Pentair compatible pool equipment.
6
-
7
- * Want to include a low cost controller for your pool?
8
- * Want a web interface for your system?
9
- * Want to turn your pumps on remotely?
10
- * Want to have your home automation system talk to your pool?
11
- * Want to control your pumps or chlorinator without a pool controller?
12
-
13
- Equipment supported
14
- 1. Controllers: IntelliCenter, Intellitouch, EasyTouch, No controller (standalone equimpent)
15
- 1. Pumps: Intelliflow VS/VSF/VF, older models
16
- 1. Chlorinators: Intellichlor, Aqua-Rite and OEM brands
17
- 1. Heaters: Gas, solar, heatpump
18
- 1. Intellichem and Relay Equipment Manager (REM) chemical controllers
19
- 1. Intellivalve (coming soon)
20
- 1. Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo
21
- 1. Chemical probes (pH, ORP, flow sensors, EC, etc.)
22
-
23
- ## Latest Changes
24
- See [Changelog](https://github.com/tagyoureit/nodejs-poolController/blob/master/Changelog)
25
-
26
- ## What's new in 7.0?
27
-
28
- The current version includes very tight intergation with [relayEquipmentManager](https://github.com/rstrouse/relayEquipmentManager) which allows for hardware control over your ancillary pool equipment (chemical probes, pumps, tanks, heaters, pumps, etc).
29
-
30
- Starting with this version, all code will immediately be pushed to `master` branch. The version of a `next` branch for feature development will disappear.
31
-
32
-
33
- <a name="module_nodejs-poolController--install"></a>
34
-
35
- Dashpanel Client Screenshot
36
-
37
- <img src="https://tagyoureit.github.io/nodejs-poolController/images/v6/clients/dashPanel.png?raw=true" height="300">
38
-
39
- ## Installation Instructions
40
-
41
- This code requires a physical [RS485](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) adapter to work.
42
-
43
- This is only the server code. See [clients](#module_nodejs-poolController--clients) below for web or other ways to read/control the pool equipment.
44
-
45
- ### Prerequisites
46
- If you don't know anything about NodeJS, these directions might be helpful.
47
-
48
- 1. Install Nodejs (v12 recommended). (https://nodejs.org/en/download/)
49
- 1. Update NPM (https://docs.npmjs.com/getting-started/installing-node).
50
- 1. It is recommended to clone the source code as updates are frequently pushed while releases are infrequent
51
- clone with `git clone https://github.com/tagyoureit/nodejs-poolController.git`
52
- (Alternate - not recommended - Download the latest [code release](https://github.com/tagyoureit/nodejs-poolController/releases)
53
- 1. Change directory into nodejs-poolController.
54
- 1. Run `npm install` in the new folder (where package.json exists). This will automatically install all the dependencies (serial-port, express, sockets.io, etc).
55
- 1. Run the app with `npm start`.
56
- * `npm start` will compile the Typescript code. You should use this every time you download/clone/pull the latest code.
57
- * `npm run start:cached` will run the app without compiling the code which can be much faster.
58
- 1. Running `npm start` will also create a `config.json` file for your installation. If you need to modify any properties (e.g. the path to your serialport adapter, enabling socat, etc) then stop the app, edit the `config.json` per the [instructions](module_nodejs-poolController--config.json) below, and start the app again.
59
- 1. Verify your pool equipment is correctly identified by inspecting the `/data/*.json` files.
60
- 1. Install a [webclient](module_nodejs-poolController--clients) for a browser experience and/or a [binding](module_nodejs-poolController--bindings) to have two way control with Home Automation systems.
61
-
62
- For a very thorough walk-through, see [this](https://www.troublefreepool.com/threads/pentair-intellicenter-pool-control-dashboard-instructional-guide.218514/) great thread on Trouble Free Pool. Thanks @MyAZPool.
63
-
64
- #### Upgrade Instructions
65
- Assuming you cloned the repo, the following are easy steps to get the latest version:
66
- 1. Change directory to the njsPC app
67
- 2. `git pull`
68
- 3. `npm i` (not always necessary, but if dependencies are upgraded this will bring them up to date)
69
- 4. Start application as normal, or if using `npm run start:cached` then run `npm run build` to compile the code.
70
-
71
- ### Docker instructions
72
-
73
- See the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/Docker). Thanks @wurmr @andylippitt @emes.
74
-
75
- ### Automate startup of app
76
- See the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/Automatically-start-at-boot---PM2-&-Systemd).
77
-
78
- # Clients & Bindings
79
- To do anything with this app, you need a client to connect to it. A client can be a web application or Home Automation system.
80
-
81
- <a name="module_nodejs-poolController--clients"></a>
82
-
83
- ## REM (Relay Equipment Manager)
84
- [Relay Equipment Manager](https://github.com/rstrouse/relayEquipmentManager) is a companion app developed by @rstrouse that integrates standalone hardware control. Controls GPIO, i2c, and SPI devices including:
85
- * Atlas Scientific pH, orp, ec, hum, prs, pmp, rtd
86
- * ADS1x15 a/d converters
87
- * Pressure Tranducers
88
- * Flow sensors
89
- * Temperature sensors (10k, NTC)
90
-
91
- ## Web Clients
92
- 1. [nodejs-poolController-dashPanel](https://github.com/rstrouse/nodejs-poolController-dashPanel). Full compatibility with IntelliCenter, *Touch, REM (RelayEquipmentManager).
93
- 1. Deprecated - ~~[nodejs-poolController-webClient](http://github.com/tagyoureit/nodejs-poolController-webClient). Built primarily around EasyTouch/IntelliTouch but will work with other systems.~~
94
-
95
- * This app has the default to only listen to clients from localhost (127.0.0.1). If you need to have clients connect from other machines you will need to change the [ip](#module_nodejs-poolController--config.json) in `config.json`.
96
-
97
- <a name="module_nodejs-poolController--bindings"></a>
98
-
99
- ## Home Automation Bindings (previously Integrations)
100
- **NOTE: Existing integrations built of 5.3 or earlier WILL NOT WORK. They need to be upgraded to leverage 6.0. **
101
-
102
- Available for 6.x:
103
- * [Vera Home Automation Hub](https://github.com/rstrouse/nodejs-poolController-veraPlugin) - A plugin that integrates with nodejs-poolController. [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#vera)
104
- * [Hubitat](https://github.com/bsileo/hubitat_poolcontroller) by @bsileo (prev help from @johnny2678, @donkarnag, @arrmo). [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#smartthingshubitat)
105
- * [Homebridge/Siri/EVE](https://github.com/gadget-monk/homebridge-poolcontroller) by @gadget-monk, adopted from @leftyflip
106
- * InfluxDB - [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#influx)
107
- * [MQTT](https://github.com/crsherman/nodejs-poolController-mqtt) original release by @crsherman, re-write by @kkzonie, testing by @baudfather and others. [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#mqtt)
108
- * [Homeseer](https://github.com/tagyoureit/nodejs-poolController/wiki/Homeseer-Setup-Instructions) - Integration directions by @miamijerry to integrate Homeseer through MQTT
109
-
110
- Need to be updated:
111
- * [Another SmartThings Controller](https://github.com/dhop90/pentair-pool-controller/blob/master/README.md) by @dhop90
112
- * [ISY](src/integrations/socketISY.js). Original credit to @blueman2, enhancements by @mayermd
113
- * [ISY Polyglot NodeServer](https://github.com/brianmtreese/nodejs-pool-controller-polyglotv2) created by @brianmtreese
114
-
115
- # Support
116
- 1. For discussions, recommendations, designs, and clarifications, we recommend you join our [Gitter Chat room](https://gitter.im/pentair_pool/Lobby).
117
- 1. Check the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki) for tips, tricks and additional documentation.
118
- 1. For bug reports you can open a [github issue](https://github.com/tagyoureit/nodejs-poolController/issues/new),
119
-
120
- ### Virtual Controller
121
- v6 adds all new configuration and support for virtual pumps, chlorinators (and soon, Intellichem)
122
-
123
- * [Virtual Pump Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Pump-Controller---v6)
124
- * [Virtual Chlorinator Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Chlorinator-Controller-v6)
125
- * Virtual Chem Controller
126
-
127
- # Changes
128
- See [Changelog](https://github.com/tagyoureit/nodejs-poolController/blob/master/Changelog)
129
-
130
-
131
- <a name="module_nodejs-poolController--config.json"></a>
132
- # Config.json changes
133
-
134
- ## Controller section - changes to the communications for the app
135
- * `rs485Port` - set to the name of you rs485 controller. See [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) for details and testing.
136
- * `portSettings` - should not need to be changed for RS485
137
- * `mockPort` - opens a "fake" port for this app to communicate on. Can be used with [packet captures/replays](https://github.com/tagyoureit/nodejs-poolController/wiki/How-to-capture-all-packets-for-issue-resolution).
138
- * `netConnect` - used to connect via [Socat](https://github.com/tagyoureit/nodejs-poolController/wiki/Socat)
139
- * `netHost` and `netPort` - host and port for Socat connection.
140
- * `inactivityRetry` - # of seconds the app should wait before trying to reopen the port after no communications. If your equipment isn't on all the time or you are running a virtual controller you may want to dramatically increase the timeout so you don't get console warnings.
141
-
142
- ## Web section - controls various aspects of external communications
143
- * `servers` - setting for different servers/services
144
- * `http2` - not used currently
145
- * `http` - primary server used for api connections without secure communications
146
- * `enabled` - self-explanatory
147
- * `ip` - The ip of the network address to listen on. Default of `127.0.0.1` will only listen on the local loopback (localhost) adapter. `0.0.0.0` will listen on all network interfaces. Any other address will listen exclusively on that interface.
148
- * `port` - Port to listen on. Default is `4200`.
149
- * `httpsRedirect` - Redirect http traffic to https
150
- * `authentication` - Enable basic username/password authentication. (Not implemented yet.)
151
- * `authFile` - Location of the encrypted password file. By default, `/users.htpasswd`. If you have `authentication=1` then create the file users.htpasswd in the root of the application. Use a tool such as http://www.htaccesstools.com/htpasswd-generator/ and paste your user(s) into this file. You will now be prompted for authentication.
152
- * `https` - See http options above.
153
- * `sslKeyFile` - Location of key file
154
- * `sslCertFile` - Location of certificate file
155
- * `mdns` - Not currently used.
156
- * `ssdp` - Enable for automatic configuration by the webClient and other platforms.
157
-
158
-
159
- ## Log - Different aspects of logging to the application
160
- * `app` - Application wide settings
161
- * `enabled` - Enable/disable logging for the entire application
162
- * `level` - Different levels of logging from least to most: 'error', 'warn', 'info', 'verbose', 'debug', 'silly'
163
- * `packet` - Configuration for the
164
-
165
-
166
- # Credit
167
-
168
- 1. @Rstrouse for helping make the 6.0 rewrite and Intellicenter possible, continuing to make monumental changes, and driving this project forward in numerous ways. My knowledge of coding in general has benefitted greatly from working with him.
169
- 1. [Jason Young](http://www.sdyoung.com/home/decoding-the-pentair-easytouch-rs-485-protocol) (Read both posts, they are a great baseline for knowledge)
170
- 1. Michael Russe [ceesco](https://github.com/ceesco53/pentair_examples) [CocoonTech](http://cocoontech.com/forums/topic/13548-intelliflow-pump-rs485-protocol/?p=159671) - Registration required for CocoonTech. Jason Young used this material for his understanding in the protocol as well. There is a very detailed .txt file with great information ~~that I won't post unless I get permission~~. Looks like it was publicly posted to [Pastebin](http://pastebin.com/uiAmvNjG).
171
- 1. [Michael Usner](https://github.com/michaelusner/Home-Device-Controller) for taking the work of both of the above and turning it into Javascript code.
172
- 1. [rflemming](https://github.com/rflemming) for being the first to contribute some changes to the code.
173
- 1. Awesome help from @arrmo and @blueman2 on Gitter
174
-
175
- # License
176
-
177
- nodejs-poolController. An application to control pool equipment.
178
- Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
179
-
180
- This program is free software: you can redistribute it and/or modify
181
- it under the terms of the GNU Affero General Public License as
182
- published by the Free Software Foundation, either version 3 of the
183
- License, or (at your option) any later version.
184
-
185
- This program is distributed in the hope that it will be useful,
186
- but WITHOUT ANY WARRANTY; without even the implied warranty of
187
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
188
- GNU Affero General Public License for more details.
189
-
190
- You should have received a copy of the GNU Affero General Public License
191
- along with this program. If not, see <http://www.gnu.org/licenses/>
1
+ # nodejs-poolController - Version 8.0
2
+
3
+ ## What is nodejs-poolController
4
+
5
+ nodejs-poolController is an application to communicate and control your Pentair compatible pool equipment.
6
+
7
+ * Want to include a low cost controller for your pool?
8
+ * Want a web interface for your system?
9
+ * Want to turn your pumps on remotely?
10
+ * Want to have your home automation system talk to your pool?
11
+ * Want to control your pumps or chlorinator without a pool controller?
12
+
13
+ Equipment supported
14
+ 1. Controllers: IntelliCenter, Intellitouch, EasyTouch, Nixie (standalone equimpent), Aqualink
15
+ 1. Pumps: Intelliflow VS/VSF/VF, older models, relay controlled pumps, Whisperflo
16
+ 1. Chlorinators: Intellichlor, Aqua-Rite and OEM brands
17
+ 1. Heaters: Gas, solar, heatpump
18
+ 1. Intellichem and Relay Equipment Manager (REM) chemical controllers
19
+ 1. Intellivalve (coming soon)
20
+ 1. Home Automation: SmartThings, Hubitat, ISY, Vera, Siri, Echo
21
+ 1. Chemical probes (pH, ORP, flow sensors, EC, etc.)
22
+
23
+ ## Latest Changes
24
+ See [Changelog](https://github.com/tagyoureit/nodejs-poolController/blob/master/Changelog)
25
+
26
+ ## What's new in 8.0?
27
+
28
+ Screenlogic can now be used as a direct connection point. If you feel that integrating an RS-485 adapter is a bit too much, then this is an option for you. The preferred method is still RS-485 as it is more fully featured.
29
+
30
+ ## What's new in 7.0?
31
+
32
+ The current version includes very tight intergation with [relayEquipmentManager](https://github.com/rstrouse/relayEquipmentManager) which allows for hardware control over your ancillary pool equipment (chemical probes, pumps, tanks, heaters, pumps, etc).
33
+
34
+ Starting with this version, all code will immediately be pushed to `master` branch. The version of a `next` branch for feature development will disappear.
35
+
36
+
37
+ <a name="module_nodejs-poolController--install"></a>
38
+
39
+ Dashpanel Client Screenshot
40
+
41
+ <img src="https://tagyoureit.github.io/nodejs-poolController/images/v6/clients/dashPanel.png?raw=true" height="300">
42
+
43
+ ## Installation Instructions
44
+
45
+ This code requires a physical [RS485](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) adapter to work.
46
+
47
+ This is only the server code. See [clients](#module_nodejs-poolController--clients) below for web or other ways to read/control the pool equipment.
48
+
49
+ ### Prerequisites
50
+ If you don't know anything about NodeJS, these directions might be helpful.
51
+
52
+ 1. Install Nodejs (v12 recommended). (https://nodejs.org/en/download/)
53
+ 1. Update NPM (https://docs.npmjs.com/getting-started/installing-node).
54
+ 1. It is recommended to clone the source code as updates are frequently pushed while releases are infrequent
55
+ clone with `git clone https://github.com/tagyoureit/nodejs-poolController.git`
56
+ (Alternate - not recommended - Download the latest [code release](https://github.com/tagyoureit/nodejs-poolController/releases)
57
+ 1. Change directory into nodejs-poolController.
58
+ 1. Run `npm install` in the new folder (where package.json exists). This will automatically install all the dependencies (serial-port, express, sockets.io, etc).
59
+ 1. Run the app with `npm start`.
60
+ * `npm start` will compile the Typescript code. You should use this every time you download/clone/pull the latest code.
61
+ * `npm run start:cached` will run the app without compiling the code which can be much faster.
62
+ 1. Running `npm start` will also create a `config.json` file for your installation. If you need to modify any properties (e.g. the path to your serialport adapter, enabling socat, etc) then stop the app, edit the `config.json` per the [instructions](module_nodejs-poolController--config.json) below, and start the app again.
63
+ 1. Verify your pool equipment is correctly identified by inspecting the `/data/*.json` files.
64
+ 1. Install a [webclient](module_nodejs-poolController--clients) for a browser experience and/or a [binding](module_nodejs-poolController--bindings) to have two way control with Home Automation systems.
65
+
66
+ For a very thorough walk-through, see [this](https://www.troublefreepool.com/threads/pentair-intellicenter-pool-control-dashboard-instructional-guide.218514/) great thread on Trouble Free Pool. Thanks @MyAZPool.
67
+
68
+ #### Upgrade Instructions
69
+ Assuming you cloned the repo, the following are easy steps to get the latest version:
70
+ 1. Change directory to the njsPC app
71
+ 2. `git pull`
72
+ 3. `npm i` (not always necessary, but if dependencies are upgraded this will bring them up to date)
73
+ 4. Start application as normal, or if using `npm run start:cached` then run `npm run build` to compile the code.
74
+
75
+ ### Docker instructions
76
+
77
+ See the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/Docker). Thanks @wurmr @andylippitt @emes.
78
+
79
+ ### Automate startup of app
80
+ See the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/Automatically-start-at-boot---PM2-&-Systemd).
81
+
82
+ # Clients & Bindings
83
+ To do anything with this app, you need a client to connect to it. A client can be a web application or Home Automation system.
84
+
85
+ <a name="module_nodejs-poolController--clients"></a>
86
+
87
+ ## REM (Relay Equipment Manager)
88
+ [Relay Equipment Manager](https://github.com/rstrouse/relayEquipmentManager) is a companion app developed by @rstrouse that integrates standalone hardware control. Controls GPIO, i2c, and SPI devices including:
89
+ * Atlas Scientific pH, orp, ec, hum, prs, pmp, rtd
90
+ * ADS1x15 a/d converters
91
+ * Pressure Tranducers
92
+ * Flow sensors
93
+ * Temperature sensors (10k, NTC)
94
+
95
+ ## Web Clients
96
+ 1. [nodejs-poolController-dashPanel](https://github.com/rstrouse/nodejs-poolController-dashPanel). Full compatibility with IntelliCenter, *Touch, REM (RelayEquipmentManager).
97
+ 1. Deprecated - ~~[nodejs-poolController-webClient](http://github.com/tagyoureit/nodejs-poolController-webClient). Built primarily around EasyTouch/IntelliTouch but will work with other systems.~~
98
+
99
+ * This app has the default to only listen to clients from localhost (127.0.0.1). If you need to have clients connect from other machines you will need to change the [ip](#module_nodejs-poolController--config.json) in `config.json`.
100
+
101
+ <a name="module_nodejs-poolController--bindings"></a>
102
+
103
+ ## Home Automation Bindings (previously Integrations)
104
+ **NOTE: Existing integrations built of 5.3 or earlier WILL NOT WORK. They need to be upgraded to leverage 6.0. **
105
+
106
+ Available for 6.x:
107
+ * [Vera Home Automation Hub](https://github.com/rstrouse/nodejs-poolController-veraPlugin) - A plugin that integrates with nodejs-poolController. [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#vera)
108
+ * [Hubitat](https://github.com/bsileo/hubitat_poolcontroller) by @bsileo (prev help from @johnny2678, @donkarnag, @arrmo). [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#smartthingshubitat)
109
+ * [Homebridge/Siri/EVE](https://github.com/gadget-monk/homebridge-poolcontroller) by @gadget-monk, adopted from @leftyflip
110
+ * InfluxDB - [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#influx)
111
+ * [MQTT](https://github.com/crsherman/nodejs-poolController-mqtt) original release by @crsherman, re-write by @kkzonie, testing by @baudfather and others. [Bindings Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Bindings-Integrations-in-2.0#mqtt)
112
+ * [Homeseer](https://github.com/tagyoureit/nodejs-poolController/wiki/Homeseer-Setup-Instructions) - Integration directions by @miamijerry to integrate Homeseer through MQTT
113
+
114
+ Need to be updated:
115
+ * [Another SmartThings Controller](https://github.com/dhop90/pentair-pool-controller/blob/master/README.md) by @dhop90
116
+ * [ISY](src/integrations/socketISY.js). Original credit to @blueman2, enhancements by @mayermd
117
+ * [ISY Polyglot NodeServer](https://github.com/brianmtreese/nodejs-pool-controller-polyglotv2) created by @brianmtreese
118
+
119
+ # Support
120
+ 1. For discussions, recommendations, designs, and clarifications, we recommend you join the [Github discussions](https://github.com/tagyoureit/nodejs-poolController/discussions or [Gitter Chat room](https://gitter.im/pentair_pool/Lobby).
121
+ 1. Check the [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki) for tips, tricks and additional documentation.
122
+ 1. For bug reports you can open a [github issue](https://github.com/tagyoureit/nodejs-poolController/issues/new),
123
+
124
+ ### Virtual Controller
125
+ v6 adds all new configuration and support for virtual pumps, chlorinators (and soon, Intellichem)
126
+
127
+ * [Virtual Pump Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Pump-Controller---v6)
128
+ * [Virtual Chlorinator Directions](https://github.com/tagyoureit/nodejs-poolController/wiki/Virtual-Chlorinator-Controller-v6)
129
+ * Virtual Chem Controller
130
+
131
+ # Changes
132
+ See [Changelog](https://github.com/tagyoureit/nodejs-poolController/blob/master/Changelog)
133
+
134
+
135
+ <a name="module_nodejs-poolController--config.json"></a>
136
+ # Config.json changes
137
+
138
+ ## Controller section - changes to the communications for the app
139
+ * `rs485Port` - set to the name of you rs485 controller. See [wiki](https://github.com/tagyoureit/nodejs-poolController/wiki/RS-485-Adapter-Details) for details and testing.
140
+ * `portSettings` - should not need to be changed for RS485
141
+ * `mockPort` - opens a "fake" port for this app to communicate on. Can be used with [packet captures/replays](https://github.com/tagyoureit/nodejs-poolController/wiki/How-to-capture-all-packets-for-issue-resolution).
142
+ * `netConnect` - used to connect via [Socat](https://github.com/tagyoureit/nodejs-poolController/wiki/Socat)
143
+ * `netHost` and `netPort` - host and port for Socat connection.
144
+ * `inactivityRetry` - # of seconds the app should wait before trying to reopen the port after no communications. If your equipment isn't on all the time or you are running a virtual controller you may want to dramatically increase the timeout so you don't get console warnings.
145
+
146
+ ## Web section - controls various aspects of external communications
147
+ * `servers` - setting for different servers/services
148
+ * `http2` - not used currently
149
+ * `http` - primary server used for api connections without secure communications
150
+ * `enabled` - self-explanatory
151
+ * `ip` - The ip of the network address to listen on. Default of `127.0.0.1` will only listen on the local loopback (localhost) adapter. `0.0.0.0` will listen on all network interfaces. Any other address will listen exclusively on that interface.
152
+ * `port` - Port to listen on. Default is `4200`.
153
+ * `httpsRedirect` - Redirect http traffic to https
154
+ * `authentication` - Enable basic username/password authentication. (Not implemented yet.)
155
+ * `authFile` - Location of the encrypted password file. By default, `/users.htpasswd`. If you have `authentication=1` then create the file users.htpasswd in the root of the application. Use a tool such as http://www.htaccesstools.com/htpasswd-generator/ and paste your user(s) into this file. You will now be prompted for authentication.
156
+ * `https` - See http options above.
157
+ * `sslKeyFile` - Location of key file
158
+ * `sslCertFile` - Location of certificate file
159
+ * `mdns` - Not currently used.
160
+ * `ssdp` - Enable for automatic configuration by the webClient and other platforms.
161
+
162
+
163
+ ## Log - Different aspects of logging to the application
164
+ * `app` - Application wide settings
165
+ * `enabled` - Enable/disable logging for the entire application
166
+ * `level` - Different levels of logging from least to most: 'error', 'warn', 'info', 'verbose', 'debug', 'silly'
167
+ * `packet` - Configuration for the
168
+
169
+
170
+ # Credit
171
+
172
+ 1. @Rstrouse for helping make the 6.0 rewrite and Intellicenter possible, continuing to make monumental changes, and driving this project forward in numerous ways. My knowledge of coding in general has benefitted greatly from working with him.
173
+ 1. [Jason Young](http://www.sdyoung.com/home/decoding-the-pentair-easytouch-rs-485-protocol) (Read both posts, they are a great baseline for knowledge)
174
+ 1. Michael Russe [ceesco](https://github.com/ceesco53/pentair_examples) [CocoonTech](http://cocoontech.com/forums/topic/13548-intelliflow-pump-rs485-protocol/?p=159671) - Registration required for CocoonTech. Jason Young used this material for his understanding in the protocol as well. There is a very detailed .txt file with great information ~~that I won't post unless I get permission~~. Looks like it was publicly posted to [Pastebin](http://pastebin.com/uiAmvNjG).
175
+ 1. [Michael Usner](https://github.com/michaelusner/Home-Device-Controller) for taking the work of both of the above and turning it into Javascript code.
176
+ 1. [rflemming](https://github.com/rflemming) for being the first to contribute some changes to the code.
177
+ 1. Awesome help from @arrmo and @blueman2 on Gitter
178
+
179
+ # License
180
+
181
+ nodejs-poolController. An application to control pool equipment.
182
+ Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
183
+
184
+ This program is free software: you can redistribute it and/or modify
185
+ it under the terms of the GNU Affero General Public License as
186
+ published by the Free Software Foundation, either version 3 of the
187
+ License, or (at your option) any later version.
188
+
189
+ This program is distributed in the hope that it will be useful,
190
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
191
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
192
+ GNU Affero General Public License for more details.
193
+
194
+ You should have received a copy of the GNU Affero General Public License
195
+ along with this program. If not, see <http://www.gnu.org/licenses/>