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/Changelog CHANGED
@@ -1,216 +1,243 @@
1
- # Changelog
2
- ## 7.6
3
- 1. MasterTemp RS485 support for Nixie and IntelliCenter
4
- 2. Nixie Valve Rotation delay
5
- 3. Nixie Heater Cooldown delay
6
- 4. Nixie Cleaner Start delay
7
- 5. Nixie Cleaner Shutdown on Solar
8
- 6. Nixie Delay Cancel
9
-
10
- ## 7.5.1
11
- 1. Backup/restore fixes
12
- 2. Egg timer expiration
13
- 3. Bug Fixes
14
- 4. dashPanel/messageManager Filter
15
- 5. RS485 refactor
16
-
17
- ## 7.5
18
- 1. Backup/restore
19
- 2. Intellitouch add expansion modules
20
- ## 7.4
21
- 1. Filter object, emit, monitoring
22
-
23
- ## 7.3.1
24
- 1. Influx 2.0 support
25
-
26
- ## 7.3
27
- 1. Dynamic chlorinating % based on ORP demand for Nixie
28
- 2. Docker creation updates
29
-
30
- ## 7.2
31
- 1. Refactor Intellichem and Chem Controllers
32
-
33
- ## 7.1.1
34
- 1. Added end time for circuits to show eggtimer/schedule off times
35
- 2. Ultratemp updates
36
- 3. Heater logic refactored
37
- 4. Message response logic refactored
38
- 5. Intellichem updates
39
-
40
-
41
- ## 7.1.0
42
- 1. Moved virtual chlorinator code and control to Nixie
43
- 2. Moved virtual pump code and control to Nixie; Nixie supports SS, DS, SuperFlo, VS, VF, VSF
44
- 3. MQTT changes
45
- 4. Outbound processing for packets now has a scope. Previously if an outbound packet would receive a response we would clear all of the similar packets off the queue. EG if a user requests circuit 2 and 3 to be turned on, we would clear out the outbound message for 3. Now the code is more selective about what "scope" is considered for a successful response.
46
-
47
- ## 7.0.0
48
- 1. Upgrades to setup/sync between njsPC and REM
49
- 2. Significant steps to njsPC (Nixie) acting as a standalone pool controller (virtual controller heaters, move virtual controller code, etc.)
50
- 3. Dependency updates (Typescript 4, Socket.io 4, etc)
51
-
52
- ## 6.5.2
53
- 1. Bug Fixes
54
- 2. Schedule updates
55
- 3. MQTT Binding updates
56
- 4. LSI calcs for REM (in addition to CSI)
57
-
58
- ## 6.5.1
59
- 1. Init Touch bodies upon startup
60
- 2. *Touch chlorinator fixes
61
- 3. MQTT updates
62
-
63
- ## 6.5.0
64
- 1. Full compatibility with REM (Relay Equipment Manager) for hardware control (ph sensors, orp sensors, pumps, relays, flow sensors)
65
- 1. Upgrades to Influx binding
66
- 1. MQTT alternate bindings
67
- 1. Many, many bug fixes
68
-
69
- ## 6.1.0
70
- 1. Chem controller
71
- 1. MQTT native support
72
- 1. Server based time for *Touch and other non-internet based OCP
73
- 1. Version notifications
74
- 1. IntelliCenter updates for dual bodies, 1.045/1.047 (partial) support
75
- 1. Many bug fixes
76
-
77
- ## 6.0.1
78
- 1. Implement https (no basic auth yet)
79
- 1. API documentation @ https://tagyoureit.github.io/nodejs-poolcontroller-api/
80
- 1. Add timestamp to logs for API calls
81
- 1. #200, #202
82
-
83
- ## 6.0
84
- What's new in 6.0?s
85
-
86
- In short, everything! 6.0 is a complete re-write of the application. Huge props to @rstrouse for his wisdom and guidance in refactoring the code.
87
-
88
- 1. IntelliCenter - now supported
89
- 1. Configuring and running the app - all new. Start over with the Installation instructions.
90
- 1. Automatic detection of your pool equipment. Previous versions of the app would detect the configuration of your pool but you still had to tell the app if you had IntelliTouch/EasyTouch/IntelliCom. This is now done automatically.
91
- 1. Configuration and state information. Config.json now only stores information related to the configuration of the app. There are separate files in the /data directory that store (and persist) pool configuration and state information.
92
- 1. API's - completely changed. See separate API documentation (*link here)
93
- 1. Outbound Sockets - Now more granular to make the web app more responsive
94
- 1. Web app - Now a separate installion for a true client/server metaphore.
95
- 1. Node v12+
96
- 1. `Integrations` are now called `Bindings`. Any integration built on 5.3 need to be upgraded to the binding format. See Readme for a list of currently upgraded bindings.
97
-
98
- ## 5.3.3
99
- #134
100
-
101
- ## 5.3.1
102
- #132
103
-
104
- ## 5.3.0
105
- Fix for #106
106
- Fix for "Error 60" messages
107
- Improved caching of files on browsers. Thanks @arrmo! Now files will be loaded once in the browser and kept in cache instead of reloaded each time.
108
- Improved handling of sessions and graceful closing of the HTTP(s) servers.
109
-
110
- ## 5.2.0
111
- 1. Node 6+ is supported. This app no longer supports Node 4.
112
- 1. Update of modules. Make sure to run `npm i` or `npm upgrade` to get the latest.
113
- 1. Much better support of multiple Intellibrite controllers. We can read both controllers now. There are still some issues with sending changes and help is needed to debug these.
114
- 1. Chlorinator API calls (and UI) will now make changes through Intellitouch when available, or directly to the Intellichlor if it is standalone (aka using the virtual controller)
115
- 1. Decoupled serial port and processing of packets. Should help recovery upon packet errors.
116
- 1. Implementation of #89. Expansion boards are now (better) supported by setting variables in your config.json. See the [config.json](#module_nodejs-poolController--config) section below.
117
- 1. Fix for #95
118
- 1. Fix for #99
119
- 1. Fix for #100
120
-
121
- ## 5.1.1 -
122
- 1. Renamed all 'valves' items to valve to be in line with singular renaming of items
123
- 1. InfluxDB - moved some items that were in tag fields to field keys; added valves
124
- 1. Added days of week (with editing) back to the schedules. Not sure when they disappeared, but they are back now. #92
125
- 1. Added MySQL integration to log all packets to a DB
126
- 1. Fixed PR #95 to allow sub-hour egg timers
127
- 1. Fixed Intellibrite bugs
128
- 1. Started to move some of the inter-communications to emitter events for better micro-services and shorter call stacks (easier debugging; loosely coupled code).
129
- 1. Changed some Influx tags/queries.
130
-
131
- ## 5.1.0 -
132
- 1. Intellibrite support - API's, Sockets and a WebUI. Lights should have the 'Intellbrite' an their circuit function (set this up at the controller) to show up in this section.
133
- Will document more later, but...
134
- /light/mode/:mode
135
- /light/circuit/:circuit/setColor/:color
136
- /light/circuit/:circuit/setSwimDelay/:delay
137
- /light/circuit/:circuit/setPosition/:position
138
-
139
- See the constants.js file and the sections:
140
- strIntellibriteModes (for modes)
141
- lightColors (for setColor)
142
-
143
- ## 5.0.1 -
144
- 1. Fixed Influx error on startup #90
145
- 1. Fixed bad characters in custom names
146
-
147
- ## 5.0.0 -
148
- Make sure to run `npm upgrade`. There are many package updates and changes.
149
-
150
- * Added add/delete/edit schedule
151
- * All sockets/API now singular (`circuits`->`circuit`)
152
- * All sockets/API data now returned with a JSON qualifier. EG `{pump:...}`, `{circuit:...}`
153
- * Intellichem decoding and display
154
- * Changes to `/config` endpoint. It's now included with the `/all` end point since there would be quite a bit of duplication. It still exists standalone (for now) but has much less information in it.
155
- * Moved `hideAux` setting from `configClient.json` (web UI settings) to `config.json` template. In `config.json` template, moved
156
- ```
157
- {equipment: {controller: {circuitFriendlyNames:{1..20}}}}
158
-
159
- // to
160
-
161
- {equipment: {circuit: friendlyName:{1..20},
162
- hideAux: boolean
163
- },
164
- }
165
- ```
166
- to be in line with the other equipment in the pool setup and accomodate the `hideAux` setting.
167
-
168
- * Fixed issue #82
169
- * Extra info from `/config` was being added to the circuit section in `config.json`
170
- * This release includes a new mechanism for updating config.json files. See notes in [config.json](#module_nodejs-poolController--config) section.
171
- * mDNS server. Currently included for SmartThings integration, but in the future can be used for autodiscovery by other applications/devices.
172
- * New `/config` endpoint (beta) to allow applications to get a high level summary of the system.
173
- * Support for two separate (http/https) web servers, each/both with Auth, and also the option to redirect all http to https traffic. Thanks to @arrmo for driving this with #65 and #68.
174
- * A UI for standalone pumps
175
- * All sockets and API's renamed to be SINGULAR. Circuits -> circuit, Schedules->schedule, etc.
176
- * All returned JSON data (API/socket) now has the type qualifier per [#57](https://github.com/tagyoureit/nodejs-poolController/issues/57)
177
- * Make sure to run `npm upgrade`. There are many package updates and changes.
178
- * Intellichem initial support.
179
- * Inactivity timer for both internal connections and web page connections. If a connection is broken, it should re-establish itself automatically now.
180
- * SSDP for auto-discovery by SmartThings or other services
181
-
182
- ## 4.0.0 -
183
- * Changed much in the config.json file
184
- * Save pump programs and chlorinator level to config.json
185
- * Added support for GPM with pumps
186
- * Check for newer versions of the app on github, and dismiss notifications until next release
187
- * Bootstrap configuration is automatically saved in clientConfig.json via UI actions
188
- * Started to introduce some promises into the workflow (mostly with read/write operations)
189
- * Added log-to-file option
190
- * Added capture for Ctrl-C/SIGINT to have a clean exit
191
- * Added InfluxDB database capabilities
192
- * Added support for reading the data from up to 16 pumps. (You can still only control two.)
193
- * Support for up to 50 circuits, 8 pumps
194
- * Delay and Cancel Delay for circuits
195
-
196
- ## 3.1.x -
197
- * Added unit testing for certain areas
198
- * Added setDateTime API/Socket
199
- * Bootstrap panel states are now persistent
200
-
201
- ## 3.0.0 -
202
- * Upgraded pump logic
203
-
204
- ## 2.0.0 -
205
- * https, Authentication
206
- * Completely refactored code. Integrated BottleJS (https://github.com/young-steveo/bottlejs) for dependency injection and service locator functions
207
- * Integrations to loosely couple add-ons
208
-
209
- ## 1.0.0 -
210
- * Much of the code reworked and refactored
211
- * Added Bootstrap UI by @arrmo
212
- * Better standalone pump control (@bluemantwo was super-helpful here, too!)
213
- * More accurate recognition of packets
214
- * Super fast speed improvements
215
- * Outgoing packets are now sent based on a timer (previously number of incoming packets)
1
+ # Changelog
2
+
3
+ ## 8.0.0
4
+ 1. Refactor comms code to Async
5
+ 2. Update dependencies and Node >16
6
+ 3. EasyTouch v1 support
7
+ 4. Screenlogic support
8
+ 5. Anslq25 (Mock controller)
9
+
10
+ ## 7.7.0
11
+ 1. Aqualink-D MQTT Interface
12
+ 2. Manual Priority for Schedules
13
+ 3. Add multiple RS-485 ports
14
+ 4. Support for Hayward Pumps
15
+ 5. Display remote chlorinators
16
+ 6. Updates for ETi hybrid
17
+ 7. Stop temp deltas for Nixie
18
+ 8. Batch write influx points
19
+ 9. MQTT & Influx updates
20
+ 10. Ability to hide bodies in dashPanel
21
+ 11. Florida Sunseeker Pooltone lighting
22
+ 12. Proper uPNP formatting
23
+
24
+
25
+ ## 7.6.1
26
+ 1. Many bugfixes: Intellichem, Touch body capacities, Ultratemp heaters, Nixie, more...
27
+ 2. Add env variables for Docker setup: POOL_RS485_PORT, POOL_NET_CONNECT, POOL_NET_HOST, POOL_NET_PORT, SOURCE_COMMIT, SOURCE_BRANCH
28
+ 3. Update dependencies
29
+ ## 7.6
30
+ 1. MasterTemp RS485 support for Nixie and IntelliCenter
31
+ 2. Nixie Valve Rotation delay
32
+ 3. Nixie Heater Cooldown delay
33
+ 4. Nixie Cleaner Start delay
34
+ 5. Nixie Cleaner Shutdown on Solar
35
+ 6. Nixie Delay Cancel
36
+
37
+ ## 7.5.1
38
+ 1. Backup/restore fixes
39
+ 2. Egg timer expiration
40
+ 3. Bug Fixes
41
+ 4. dashPanel/messageManager Filter
42
+ 5. RS485 refactor
43
+
44
+ ## 7.5
45
+ 1. Backup/restore
46
+ 2. Intellitouch add expansion modules
47
+ ## 7.4
48
+ 1. Filter object, emit, monitoring
49
+
50
+ ## 7.3.1
51
+ 1. Influx 2.0 support
52
+
53
+ ## 7.3
54
+ 1. Dynamic chlorinating % based on ORP demand for Nixie
55
+ 2. Docker creation updates
56
+
57
+ ## 7.2
58
+ 1. Refactor Intellichem and Chem Controllers
59
+
60
+ ## 7.1.1
61
+ 1. Added end time for circuits to show eggtimer/schedule off times
62
+ 2. Ultratemp updates
63
+ 3. Heater logic refactored
64
+ 4. Message response logic refactored
65
+ 5. Intellichem updates
66
+
67
+
68
+ ## 7.1.0
69
+ 1. Moved virtual chlorinator code and control to Nixie
70
+ 2. Moved virtual pump code and control to Nixie; Nixie supports SS, DS, SuperFlo, VS, VF, VSF
71
+ 3. MQTT changes
72
+ 4. Outbound processing for packets now has a scope. Previously if an outbound packet would receive a response we would clear all of the similar packets off the queue. EG if a user requests circuit 2 and 3 to be turned on, we would clear out the outbound message for 3. Now the code is more selective about what "scope" is considered for a successful response.
73
+
74
+ ## 7.0.0
75
+ 1. Upgrades to setup/sync between njsPC and REM
76
+ 2. Significant steps to njsPC (Nixie) acting as a standalone pool controller (virtual controller heaters, move virtual controller code, etc.)
77
+ 3. Dependency updates (Typescript 4, Socket.io 4, etc)
78
+
79
+ ## 6.5.2
80
+ 1. Bug Fixes
81
+ 2. Schedule updates
82
+ 3. MQTT Binding updates
83
+ 4. LSI calcs for REM (in addition to CSI)
84
+
85
+ ## 6.5.1
86
+ 1. Init Touch bodies upon startup
87
+ 2. *Touch chlorinator fixes
88
+ 3. MQTT updates
89
+
90
+ ## 6.5.0
91
+ 1. Full compatibility with REM (Relay Equipment Manager) for hardware control (ph sensors, orp sensors, pumps, relays, flow sensors)
92
+ 1. Upgrades to Influx binding
93
+ 1. MQTT alternate bindings
94
+ 1. Many, many bug fixes
95
+
96
+ ## 6.1.0
97
+ 1. Chem controller
98
+ 1. MQTT native support
99
+ 1. Server based time for *Touch and other non-internet based OCP
100
+ 1. Version notifications
101
+ 1. IntelliCenter updates for dual bodies, 1.045/1.047 (partial) support
102
+ 1. Many bug fixes
103
+
104
+ ## 6.0.1
105
+ 1. Implement https (no basic auth yet)
106
+ 1. API documentation @ https://tagyoureit.github.io/nodejs-poolcontroller-api/
107
+ 1. Add timestamp to logs for API calls
108
+ 1. #200, #202
109
+
110
+ ## 6.0
111
+ What's new in 6.0?s
112
+
113
+ In short, everything! 6.0 is a complete re-write of the application. Huge props to @rstrouse for his wisdom and guidance in refactoring the code.
114
+
115
+ 1. IntelliCenter - now supported
116
+ 1. Configuring and running the app - all new. Start over with the Installation instructions.
117
+ 1. Automatic detection of your pool equipment. Previous versions of the app would detect the configuration of your pool but you still had to tell the app if you had IntelliTouch/EasyTouch/IntelliCom. This is now done automatically.
118
+ 1. Configuration and state information. Config.json now only stores information related to the configuration of the app. There are separate files in the /data directory that store (and persist) pool configuration and state information.
119
+ 1. API's - completely changed. See separate API documentation (*link here)
120
+ 1. Outbound Sockets - Now more granular to make the web app more responsive
121
+ 1. Web app - Now a separate installion for a true client/server metaphore.
122
+ 1. Node v12+
123
+ 1. `Integrations` are now called `Bindings`. Any integration built on 5.3 need to be upgraded to the binding format. See Readme for a list of currently upgraded bindings.
124
+
125
+ ## 5.3.3
126
+ #134
127
+
128
+ ## 5.3.1
129
+ #132
130
+
131
+ ## 5.3.0
132
+ Fix for #106
133
+ Fix for "Error 60" messages
134
+ Improved caching of files on browsers. Thanks @arrmo! Now files will be loaded once in the browser and kept in cache instead of reloaded each time.
135
+ Improved handling of sessions and graceful closing of the HTTP(s) servers.
136
+
137
+ ## 5.2.0
138
+ 1. Node 6+ is supported. This app no longer supports Node 4.
139
+ 1. Update of modules. Make sure to run `npm i` or `npm upgrade` to get the latest.
140
+ 1. Much better support of multiple Intellibrite controllers. We can read both controllers now. There are still some issues with sending changes and help is needed to debug these.
141
+ 1. Chlorinator API calls (and UI) will now make changes through Intellitouch when available, or directly to the Intellichlor if it is standalone (aka using the virtual controller)
142
+ 1. Decoupled serial port and processing of packets. Should help recovery upon packet errors.
143
+ 1. Implementation of #89. Expansion boards are now (better) supported by setting variables in your config.json. See the [config.json](#module_nodejs-poolController--config) section below.
144
+ 1. Fix for #95
145
+ 1. Fix for #99
146
+ 1. Fix for #100
147
+
148
+ ## 5.1.1 -
149
+ 1. Renamed all 'valves' items to valve to be in line with singular renaming of items
150
+ 1. InfluxDB - moved some items that were in tag fields to field keys; added valves
151
+ 1. Added days of week (with editing) back to the schedules. Not sure when they disappeared, but they are back now. #92
152
+ 1. Added MySQL integration to log all packets to a DB
153
+ 1. Fixed PR #95 to allow sub-hour egg timers
154
+ 1. Fixed Intellibrite bugs
155
+ 1. Started to move some of the inter-communications to emitter events for better micro-services and shorter call stacks (easier debugging; loosely coupled code).
156
+ 1. Changed some Influx tags/queries.
157
+
158
+ ## 5.1.0 -
159
+ 1. Intellibrite support - API's, Sockets and a WebUI. Lights should have the 'Intellbrite' an their circuit function (set this up at the controller) to show up in this section.
160
+ Will document more later, but...
161
+ /light/mode/:mode
162
+ /light/circuit/:circuit/setColor/:color
163
+ /light/circuit/:circuit/setSwimDelay/:delay
164
+ /light/circuit/:circuit/setPosition/:position
165
+
166
+ See the constants.js file and the sections:
167
+ strIntellibriteModes (for modes)
168
+ lightColors (for setColor)
169
+
170
+ ## 5.0.1 -
171
+ 1. Fixed Influx error on startup #90
172
+ 1. Fixed bad characters in custom names
173
+
174
+ ## 5.0.0 -
175
+ Make sure to run `npm upgrade`. There are many package updates and changes.
176
+
177
+ * Added add/delete/edit schedule
178
+ * All sockets/API now singular (`circuits`->`circuit`)
179
+ * All sockets/API data now returned with a JSON qualifier. EG `{pump:...}`, `{circuit:...}`
180
+ * Intellichem decoding and display
181
+ * Changes to `/config` endpoint. It's now included with the `/all` end point since there would be quite a bit of duplication. It still exists standalone (for now) but has much less information in it.
182
+ * Moved `hideAux` setting from `configClient.json` (web UI settings) to `config.json` template. In `config.json` template, moved
183
+ ```
184
+ {equipment: {controller: {circuitFriendlyNames:{1..20}}}}
185
+
186
+ // to
187
+
188
+ {equipment: {circuit: friendlyName:{1..20},
189
+ hideAux: boolean
190
+ },
191
+ }
192
+ ```
193
+ to be in line with the other equipment in the pool setup and accomodate the `hideAux` setting.
194
+
195
+ * Fixed issue #82
196
+ * Extra info from `/config` was being added to the circuit section in `config.json`
197
+ * This release includes a new mechanism for updating config.json files. See notes in [config.json](#module_nodejs-poolController--config) section.
198
+ * mDNS server. Currently included for SmartThings integration, but in the future can be used for autodiscovery by other applications/devices.
199
+ * New `/config` endpoint (beta) to allow applications to get a high level summary of the system.
200
+ * Support for two separate (http/https) web servers, each/both with Auth, and also the option to redirect all http to https traffic. Thanks to @arrmo for driving this with #65 and #68.
201
+ * A UI for standalone pumps
202
+ * All sockets and API's renamed to be SINGULAR. Circuits -> circuit, Schedules->schedule, etc.
203
+ * All returned JSON data (API/socket) now has the type qualifier per [#57](https://github.com/tagyoureit/nodejs-poolController/issues/57)
204
+ * Make sure to run `npm upgrade`. There are many package updates and changes.
205
+ * Intellichem initial support.
206
+ * Inactivity timer for both internal connections and web page connections. If a connection is broken, it should re-establish itself automatically now.
207
+ * SSDP for auto-discovery by SmartThings or other services
208
+
209
+ ## 4.0.0 -
210
+ * Changed much in the config.json file
211
+ * Save pump programs and chlorinator level to config.json
212
+ * Added support for GPM with pumps
213
+ * Check for newer versions of the app on github, and dismiss notifications until next release
214
+ * Bootstrap configuration is automatically saved in clientConfig.json via UI actions
215
+ * Started to introduce some promises into the workflow (mostly with read/write operations)
216
+ * Added log-to-file option
217
+ * Added capture for Ctrl-C/SIGINT to have a clean exit
218
+ * Added InfluxDB database capabilities
219
+ * Added support for reading the data from up to 16 pumps. (You can still only control two.)
220
+ * Support for up to 50 circuits, 8 pumps
221
+ * Delay and Cancel Delay for circuits
222
+
223
+ ## 3.1.x -
224
+ * Added unit testing for certain areas
225
+ * Added setDateTime API/Socket
226
+ * Bootstrap panel states are now persistent
227
+
228
+ ## 3.0.0 -
229
+ * Upgraded pump logic
230
+
231
+ ## 2.0.0 -
232
+ * https, Authentication
233
+ * Completely refactored code. Integrated BottleJS (https://github.com/young-steveo/bottlejs) for dependency injection and service locator functions
234
+ * Integrations to loosely couple add-ons
235
+
236
+ ## 1.0.0 -
237
+ * Much of the code reworked and refactored
238
+ * Added Bootstrap UI by @arrmo
239
+ * Better standalone pump control (@bluemantwo was super-helpful here, too!)
240
+ * More accurate recognition of packets
241
+ * Super fast speed improvements
242
+ * Outgoing packets are now sent based on a timer (previously number of incoming packets)
216
243
  * Added ISY support (@bluemantwo was super-helpful here, too!)
package/Dockerfile CHANGED
@@ -1,17 +1,17 @@
1
- FROM node:lts-alpine3.12 AS build
2
- RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata
3
- WORKDIR /app
4
- COPY package*.json ./
5
- RUN npm ci
6
- COPY . .
7
- RUN npm run build
8
- RUN npm ci --production
9
-
10
- FROM node:lts-alpine3.12 as prod
11
- RUN apk add git
12
- RUN mkdir /app && chown node:node /app
13
- WORKDIR /app
14
- COPY --chown=node:node --from=build /app .
15
- USER node
16
- ENV NODE_ENV=production
17
- ENTRYPOINT ["node", "dist/app.js"]
1
+ FROM node:lts-alpine3.12 AS build
2
+ RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata
3
+ WORKDIR /app
4
+ COPY package*.json ./
5
+ RUN npm ci
6
+ COPY . .
7
+ RUN npm run build
8
+ RUN npm ci --production
9
+
10
+ FROM node:lts-alpine3.12 as prod
11
+ RUN apk add git
12
+ RUN mkdir /app && chown node:node /app
13
+ WORKDIR /app
14
+ COPY --chown=node:node --from=build /app .
15
+ USER node
16
+ ENV NODE_ENV=production
17
+ ENTRYPOINT ["node", "dist/app.js"]
package/Gruntfile.js CHANGED
@@ -1,41 +1,41 @@
1
- module.exports = function(grunt) {
2
-
3
- grunt.initConfig({
4
- usebanner: {
5
- taskName: {
6
- options: {
7
- position: 'top',
8
- banner: `/* nodejs-poolController. An application to control pool equipment.
9
- Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
10
-
11
- This program is free software: you can redistribute it and/or modify
12
- it under the terms of the GNU Affero General Public License as
13
- published by the Free Software Foundation, either version 3 of the
14
- License, or (at your option) any later version.
15
-
16
- This program is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU Affero General Public License for more details.
20
-
21
- You should have received a copy of the GNU Affero General Public License
22
- along with this program. If not, see <http://www.gnu.org/licenses/>.
23
- */`,
24
- linebreak: true,
25
- replace: false
26
- },
27
- files: {
28
- src: [ 'config/*.ts', 'controller/**/*.ts', 'logger/*.ts', 'web/**/*.ts', 'app.ts' ]
29
- }
30
- }
31
- }
32
- })
33
-
34
- grunt.loadNpmTasks('grunt-banner');
35
-
36
- }
37
-
38
-
39
-
40
-
1
+ module.exports = function(grunt) {
2
+
3
+ grunt.initConfig({
4
+ usebanner: {
5
+ taskName: {
6
+ options: {
7
+ position: 'top',
8
+ banner: `/* nodejs-poolController. An application to control pool equipment.
9
+ Copyright (C) 2016, 2017. Russell Goldin, tagyoureit. russ.goldin@gmail.com
10
+
11
+ This program is free software: you can redistribute it and/or modify
12
+ it under the terms of the GNU Affero General Public License as
13
+ published by the Free Software Foundation, either version 3 of the
14
+ License, or (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU Affero General Public License for more details.
20
+
21
+ You should have received a copy of the GNU Affero General Public License
22
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */`,
24
+ linebreak: true,
25
+ replace: false
26
+ },
27
+ files: {
28
+ src: [ 'config/*.ts', 'controller/**/*.ts', 'logger/*.ts', 'web/**/*.ts', 'app.ts' ]
29
+ }
30
+ }
31
+ }
32
+ })
33
+
34
+ grunt.loadNpmTasks('grunt-banner');
35
+
36
+ }
37
+
38
+
39
+
40
+
41
41