-
Notifications
You must be signed in to change notification settings - Fork 97
Data Structures
Version 6.x uses two sets of data structures to control the pool. These include the configuration structures and the state structures.
The configuration structures define the connected equipment, features, and settings associated with the pool control. Most of the configuration information is obtained automatically from your outdoor control panel (OCP) during the initialization phase of the Pool Controller application.
State data is obtained over time as you control the pool. Pool Controller, inspects these changes, and maintains the current state within the application. The way these two sets of information work together is illustrated in the following scenario.
With the application attached through RS485 to your Pool's OCP, information is broadcast from the OCP that indicates what type of panel exists (e.g. IntelliTouch, EasyTouch, IntelliCenter...) on the bus. From there, Pool Controller asks the panel what equipment is installed and stores this configuration information for later use. If you turn on the spa, for instance the OCP will broadcast a message that the spa has been turned on, the heater is now on, and the pump is running at a specified flow/rpm. Pool Controller will manage all these states and dispatch any changes to any web clients and interfaces connected to the Pool Controller.
State data structures are emitted from the web socket interface and any subscribed interface clients. Data emitted to interface bindings as well as web sockets follow these formats for the state data.
Data types that are declared as enumObject are extended enumerations that provide data for the specified property. These at a minimum will contain an enumerated value, a normalized name, and a description. They will have the form.
{"val":<number>, "name": <string>, "desc": <string>}
For available interfaces see the specific wiki for the interface.
Information related to the status of the controller. This event is emitted at least every minute since the time values are to the minute.
Socket Event: controller
Data Sample
{
"adjustDST": true,
"batteryVoltage": 4.2,
"freeze": false,
"mode": {"val": 0, "name": "auto", "desc": "Auto"},
"status": {"val": 1, "name": "ready", "desc": "Ready", "percent": 100},
"time": "2020-05-08T12:30:01.000-700"
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
N | Y | batteryVoltage | number | The current voltage reported for the OCP backup battery. |
Y | Y | adjustDST | boolean | Indicates whether the panel has adjusted for DST |
Y | Y | freeze | boolean | True if freeze protection is currently active |
Y | Y | mode | enumObject | The extended operation mode for the panel. This can include auto, timeout, or service. |
Y | Y | status | enumObject | The extended status code for the pool Controller. Values include initializing, ready, loading. When the panel is initializing or loading the percent of completion is detailed in the percent property. |
Y | Y | time | string | ISO string representation of the current date and time from the OCP. |
The body object contains state data related to a specified body. Depending on your configuration there can be up to 4 bodies maintained Pool Controller.
Socket Event: body
Data Sample
{
"id": 1,
"name": "Pool",
"circuit": 6,
"isOn": true,
"setPoint": 88,
"temp": 81,
"heatMode": {"val": 5, "name": "solar", "desc": "Solar Only"},
"heatStatus": {"val": 2, "name": "solar", "desc": "Solar"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The body identifier in Pool Controller. |
Y | Y | name | string | The name of the body identified. |
Y | Y | circuit | number | The associated circuit id that is associated with the body. For most installations this will be 1 for the spa and 6 for the pool. However, in dual body and multi-body systems this will be the represented circuit id from the i10x or i5x expansion panel |
Y | Y | isOn | boolean | Indicates whether the body is currently on. |
Y | Y | setPoint | number | Target temperature setpoint for the body. |
Y | Y | temp | number | The water temperature for the body. If the body is not currently on then this will be the last recorded temperature prior to the body being turned off. |
Y | Y | heatMode | enumObject | One of the valid heat modes for body that determine how the pool will be heated to attain the setpoint. This can be off, heater, solar, heatPump, solarPref, or heatPumpPref |
Y | Y | heatStatus | enumObject | Indicates the current heater operation for the body. This will be one of the valid heat status' for the configuration. Valid status' include off, heater, solar, heatPump. |
Provides the state of all the temperature data associated with the controller.
Socket Event: temps
Data Sample
{
"air": 89,
"solar": 107,
"waterSensor1": 85,
"waterSensor2": 0,
"bodies": [],
"units": {"val": 0, "name": "F", "desc": "Fahrenheit"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | air | number | The current temperature from the air temperature sensor. |
Y | Y | solar | number | The current temperature from the solar temperature sensor. |
Y | Y | waterSensor1 | number | The current temperature from the first water sensor. |
Y | Y | waterSensor2 | number | The current temperature from the second water sensor. NOTE: This will not be emitted for shared body configurations. |
N | Y | waterSensor3 | number | The current temperature from the third water sensor. NOTE: This will not be emitted for configurations where expansion 1 is not installed. |
N | Y | waterSensor4 | number | The current temperature from the fourth water sensor. NOTE: This will not be emitted for configurations where expansion 2 or 3 is not installed. |
Y | Y | bodies | body[] | An array of all the bodies configured on the OCP. See body object |
Y | Y | units | enumObject | One of the valid temperature units from the panel. This will be either F or C. |
Provides the state of an aux-circuit assigned to the OCP.
Socket Event: circuit
Data Sample
{
"id": 5,
"name": "Pool Light",
"isOn": true,
"showInFeatures": true,
"eggTimer": 720,
"type": {"val": 7, "name": "intellibrite", "desc": "Intellibrite"},
"lightingTheme": {"val": 7, "name": "romance", "desc": "Romance"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the circuit on the panel. |
Y | Y | name | string | The name of the circuit. |
Y | N | nameId | number | The ordinal for the name for *Touch panels. NOTE: This will not be emitted for IntelliCenter |
Y | Y | isOn | boolean | Indicates whether the circuit is in the on or off state. |
Y | Y | showInFeatures | boolean | Indicates whether the showInFeatures flag has been set for the circuit. NOTE: This is available on IntelliTouch and IntelliCenter to hide circuits that would appear on the main panel display. For EasyTouch this will be set to false when the name is set to not used. |
Y | Y | eggTimer | number | The current egg timer setting for the circuit in minutes. |
Y | Y | type | enumObject | One of the supported circuit functions or types associated with the model of OCP. |
N | Y | lightingTheme | enumObject | The currently selected lighting theme for color changing light circuits. NOTE: This will not be emitted for *Touch controllers or circuits that are not declared as a theme enabled light. |
Y | Y | level | number | When the circuit is a dimmer circuit this is the percentage level of the dimmer. 0-100 |
Provides the state of a feature assigned to the OCP.
Socket Event: feature
Data Sample
{
"id": 130,
"name": "Sheer Descent",
"isOn": true,
"showInFeatures": true,
"eggTimer": 720,
"type": {"val": 0, "name": "generic", "desc": "Generic"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the feature on the panel. |
Y | Y | name | string | The name of the feature. |
Y | N | nameId | number | The ordinal for the name for *Touch panels. NOTE: This will not be emitted for IntelliCenter |
Y | Y | isOn | boolean | Indicates whether the feature is in the on or off state. |
Y | Y | showInFeatures | boolean | Indicates whether the showInFeatures flag has been set for the feature. NOTE: This is available on IntelliTouch and IntelliCenter to hide circuits that would appear on the main panel display. For EasyTouch this will be set to false when the name is set to "not used." |
Y | Y | eggTimer | number | The current egg timer setting for the feature in minutes. |
Y | Y | type | enumObject | One of the supported feature functions or types associated with the model of OCP. |
Provides the state of a circuit group assigned to the OCP.
Socket Event: circuitGroup
Data Sample
{
"id": 194,
"name": "Water Features",
"isOn": true,
"showInFeatures": true,
"eggTimer":720,
"equipmentType": "circuitGroup",
"circuits": []
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the group on the panel. |
Y | Y | name | string | The name of the group. |
Y | N | nameId | number | The ordinal for the name for *Touch panels. NOTE: This will not be emitted for IntelliCenter |
Y | Y | isOn | boolean | Indicates whether the feature is in the on or off state. |
Y | Y | showInFeatures | boolean | Indicates whether the showInFeatures flag has been set for this group. NOTE: This is available on IntelliTouch and IntelliCenter to hide circuits that would appear on the main panel display. For EasyTouch this will be set to false when the name is set to "not used." |
Y | Y | eggTimer | number | The current egg timer setting for the circuit group in minutes. |
Y | Y | type | enumObject | One of the supported circuit group types. |
Y | Y | circuits | equiment[] | An array containing the grouped equipment items on the circuit group. Each element will represent a Circuit object or a Feature object. An equipmentType property on each element of the array will indicate which type it is. |
Light groups are a function of IntelliCenter only. This maintains the state of a group of color changing and dimmable lighting features. In essence these are Intellibrite controls for specific groups of light circuits. For *Touch interfaces Intellibrite is supported.
Socket Event: lightGroup
Data Sample
{
"id": 195,
"name": "Pool Lights",
"isOn": true,
"eggTimer":720,
"equipmentType": "lightGroup",
"action": {"val": 3, "name": "Sequencing Swim Operation"},
"lightingTheme": {"val": 10, "name": "sunset", "desc": "Sunset"},
"type": {"val": 1, "name": "light", "desc": "Light"},
"circuits": []
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
N | Y | id | number | The id of the group on the panel. |
N | Y | name | string | The name of the group. |
N | Y | isOn | boolean | Indicates whether the group is in the on or off state. |
N | Y | eggTimer | number | The current egg timer setting for the circuit group in minutes. |
N | Y | equipmentType | string | Identifies the object as a lightGroup. |
N | Y | action | enumObject | The current operation that is being performed on the light group. Values include ready, sync, set, and swim. |
N | Y | lightingTheme | enumObject | Defines the lighting theme that is used when starting the group |
N | Y | type | enumObject | One of the supported circuit group types. |
N | Y | circuits | lightCircuit[] | An array containing the grouped light items on the light group. Each element will represent a light circuit that is controlled by the group, the swim delay and the assigned color for color swim/set functions. |
Provides the state of a virtual circuit emitted from the OCP. Virtual circuits are those items that can be used as triggers for schedules, valves, and other items.
Socket Event: virtualCircuit
Data Sample
{
"id": 252,
"name": "Solar",
"isOn": true,
"eggTimer": 720,
"type": {"val": 252, "name": "solar", "desc": "Solar"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the virtual circuit on the panel. |
Y | Y | name | string | The name of the virtual circuit. |
Y | Y | isOn | boolean | Indicates whether the virtual circuit is in the on or off state. |
Y | Y | type | enumObject | One of the supported virtual circuit types associated with the model of OCP. The name portion of this enumeration is standardized between panel types. This is to make it easier to identify when for instance the solar heater is in use. |
Provides the state of a pump emitted from the OCP. The types of supported pumps are determined by the installed OCP.
Socket Event: pump
Data Sample
{
"id": 1,
"name": "Filter",
"address": 96,
"command": 10,
"driveState": 2,
"mode": 2,
"ppc": 0,
"rpm": 2350,
"watts": 539,
"time": 1195,
"status": {"val": 1, "name": "ok", "desc": "Ok"},
"type": {"val": 3, "name": "vs", "desc": "IntelliFlo VS"}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the pump on the panel. |
Y | Y | name | string | The name assigned to the pump. |
Y | Y | address | number | The address assigned to the pump for communications. |
Y | Y | command | number | Bitmask identifying the command bits that are reflected on the pump. Bit 2 indicates that it is powered on in standby and bit 4 indicates that it is currently running. |
Y | Y | driveState | number | |
Y | Y | mode | number | The operations mode selected on the pump. |
Y | Y | ppc | number | Pump pressure curve |
Y | Y | rpm | number | The current rpms on the pump if the pump reports it. |
Y | Y | flow | number | The current flow from the pump in the defined units. |
Y | Y | time | number | Run time in minutes. Early model VS pumps report this as total run-time up to 568 hours and 8 minutes then resets. |
Y | Y | status | enumObject | The current status value of the pump. This can be one of the following values: ok, filterWarning, overCurrent, priming, systemBlocked, generalAlarm, powerOutage, overCurrent2, overVoltage, or commLost |
Y | Y | type | enumObject | The type of pump represented by this object. This can be one of the following values: vs, vf, vsf, vs+svrs, ss, or ds depending on the model of OCP. Additional attributes such as the max number of circuits, min/max flow/speed, whether the pump supports RS485 addresses may also be available on the type depending on the pump type. |
Y | Y | flowUnits | enumObject | The flow units that are assigned to the pump. This can be either lpm or gpm depending on the reporting. |
Provides the state of a chlorinator such as IntelliChlor or IChlor attached to the OCP.
Socket Event: chlorinator
Data Sample
{
"id": 1,
"name": "Intellichlor--40",
"poolSetpoint": 50,
"spaSetpoint": 11,
"saltLevel": 2900,
"saltRequired": 141.67,
"lastComm": 1588989379454,
"superChlor": false,
"superChlorHours": 7,
"superChlorRemaining": 0,
"currentOutput": 50,
"targetOutput": 50,
"status": {"val": 0, "name": "ok", "desc": "Ok"},
"type": {"val": 0, "name": "pentair", "desc": "Pentair"},
"body": {<body>}
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the chlorinator on the panel. With special equipment and IntelliCenter, up to 4 chlorinators can be supported. |
Y | Y | name | string | The name assigned to the chlorinator. |
Y | Y | poolSetpoint | number | The percentage of output applied to the pool. |
Y | Y | spaSetpoint | number | The percentage of output applied to the spa. |
Y | Y | saltLevel | number | The current salt level in ppm |
Y | Y | saltRequired | number | The amount of salt required in lbs to get the salt level to 3400. |
Y | Y | lastComm | number | The last time that the chlorinator communicated in *nix epoch time. |
Y | Y | superChlor | number | Indicates whether the chlorinator is super chlorinating. |
Y | Y | superChlorHours | number | The number of hours set for super chlorination. |
Y | Y | superChlorRemaining | number | The number of seconds remaining for super chlorination. This value will be 0 if the super chlorination cycle is not currently active. |
Y | Y | currentOutput | number | The current output setting that is in use. |
Y | Y | targetOutput | number | The target output for the chlorinator. This is retained if the superChlorination cycle is underway. |
Y | Y | status | enumObject | The current status of the chlorinator. This can be one of the following values: ok, lowflow, lowsalt, verylowsalt, highcurrent, clean, lowvoltage, lowtemp, or commlost |
Y | Y | type | enumObject | The type of chlorinator represented by this object. This can be aquarite, pentair, or unknown. |
Y | Y | body | {}:body | The body that is currently being serviced by the chlorinator. See body object |
Provides the state of a defined equipment schedule.
Socket Event: schedule
Data Sample
{
"id": 1,
"circuit": {<circuit|feature|circuitGroup|lightGroup>},
"isOn": true,
"startTime": 1260,
"endTime": 1350,
"heatSetpoint": 78,
"heatSource": {"val": 32, "name": "nochange", "desc": "No Change"},
"scheduleDays": {"val": 123, "days": [{"name": "sun", "desc": "Sunday", "dow": 0}...],
"scheduleType": {"val": "repeat", "desc": "Repeats"},
"startDate": false,
}
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the schedule |
Y | Y | circuit | equipment | The circuit, feature, circuitGroup or lightGroup scheduled. |
Y | Y | isOn | boolean | Indicates whether the schedule is currently active. |
Y | Y | startTime | number | The number of minutes from midnight that the schedule will start. |
Y | Y | endTime | number | The number of minutes from midnight that the schedule will end |
N | Y | heatSetpoint | number | The temperature setting for the heater when the schedule is started. NOTE: This is only valid for body circuits like pool or spa. |
N | Y | heatSource | enumObject | The heater to use to heat the body assigned to the circuit to the setpoint. values can include off, heater, solar, solarPref, heatpump, heatpumpPref. NOTE: This is only valid for body circuits like pool or spa. |
Y | Y | scheduleDays | []:days | The days associated with the schedule. |
Y | Y | scheduleType | enumObject | The type of schedule. Values include runOnce, repeats |
Provides the state of a defined chem controller.
Socket Event: chemController
{
"id": 1,
"type": {
"val": 2,
"name": "intellichem",
"desc": "IntelliChem"
},
"lastComm": 1597701544115,
"address": 144,
"pHLevel": 7.44,
"orpLevel": 787,
"pHDosingTime": 13,
"orpDosingTime": 0,
"pHDosingVolume": 28,
"orpDosingVolume": 0,
"acidTankLevel": 2,
"orpTankLevel": 0,
"saturationIndex": -0.18,
"tempUnits": {
"val": 0,
"name": "F",
"desc": "Fahrenheit"
},
"temp": 79,
"alarms": {
"flow": {
"val": 0,
"name": "ok",
"desc": "Ok - No alarm"
},
"ph": {
"val": 0,
"name": "ok",
"desc": "Ok - No alarm"
},
"orp": {
"val": 8,
"name": "orphigh",
"desc": "Alarm - orp High"
},
"phTank": {
"val": 0,
"name": "ok",
"desc": "Ok - No alarm"
},
"orpTank": {
"val": 0,
"name": "ok",
"desc": "Ok - No alarm"
},
"probeFault": {
"val": 0,
"name": "ok",
"desc": "Ok - No alarm"
}
},
"phDosingStatus": {
"val": 2,
"name": "mixing",
"desc": "Dosing - Mixing"
},
"orpDosingStatus": {
"val": 2,
"name": "mixing",
"desc": "Dosing - Mixing"
},
"firmware": "1.060",
"warnings": {
"waterChemistry": {
"val": 0,
"name": "ok",
"desc": "Ok - No Warning"
},
"phLockout": {
"val": 0,
"name": "ok",
"desc": "Ok - No limits reached"
},
"phDailyLimitReached": {
"val": 0,
"name": "ok",
"desc": "Ok - No limits reached"
},
"orpDailyLimitReached": {
"val": 0,
"name": "ok",
"desc": "Ok - No limits reached"
},
"invalidSetup": {
"val": 0,
"name": "ok",
"desc": "Ok - No limits reached"
},
"chlorinatorCommError": {
"val": 0,
"name": "ok",
"desc": "Ok - No limits reached"
}
},
"saltLevel": 3450
}
Property enums can be obtained through /config/options/chemControllers
.
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id of the chem controller |
Y | Y | type | enumObject | The type of chem controller |
Y | Y | lastComm | number | Time of the last communication |
Y | Y | address | number | Address of the chem controller |
Y | Y | acidTankLevel | number | 0-6 level of the acid tank |
Y | Y | orpTankLevel | number | 0-6 level of the orp tank |
Y | Y | phLevel | number | ph reading |
Y | Y | orpLevel | number | orp reading |
Y | Y | phDosingStatus | enum | status: dosing/mixing/monitoring |
Y | Y | orpDosingStatus | enum | status: dosing/mixing/monitoring |
Y | Y | phDosingTime | number | time of last ph dosing |
Y | Y | orpDosingTime | number | time of last orp dosing |
Y | Y | phDosingVolume | number | volume of last ph dosing |
Y | Y | orpDosingVolume | number | volume of last orp dosing |
Y | Y | saltLevel | number | Salt reading in the pool. This can come from the IntelliChlor, IntelliChem or manual entry |
Y | Y | saturationIndex | number | LSI calculated value |
Y | Y | status | enumObject | Communications to the chem controller |
Y | Y | temp | number | Water temp |
Y | Y | tempUnits | enumObject | Object representing F or C units |
Y | Y | firmware | string | firmware of Chem Controller |
Y | Y | alerts | object | Alert statuses (see below) |
Y | Y | warnings | object | Warning statuses (see below) |
Alert Property Definitions
Name | Type | Comments |
---|---|---|
flow | object | water flow alert |
ph | object | ph alert |
orp | object | orp alert |
phTank | object | ph Tank alert |
orpTank | object | orp Tank alert |
probeFault | object | probe flow alert |
Warning Property Definitions
Name | Type | Comments |
---|---|---|
waterChemistry | object | water chemistry warning |
phLockout | object | ph lockout warning |
phDailyLimitReached | object | ph daily limit warning |
orpDailyLimitReached | object | orp daily limit warning |
invalidSetup | object | invalid setup warning |
chlorinatorCommError | object | chlorinator communications warning |
Provides the state of a defined valve.
Socket Event: valve
{
"id": 1,
"name": "Valve A",
"circuit": {<circuit|feature|circuitGroup|lightGroup|virtualCircuit>},
"type": {"val": 0, "name": "standard", "desc": "Standard"},
"isDiverted": true,
"isIntake": false,
"isReturn": false,
"isVirtual": false,
"pinId": 0
}
Property enums can be obtained through /config/options/valves
.
Property Definitions
*Touch | *Center | Name | Type | Comments |
---|---|---|---|---|
Y | Y | id | number | The id assigned to the valve. Virtual valves will start at id = 50. |
Y | Y | name | string | The name assigned to the valve |
Y | Y | type | enumObject | The type of valve |
Y | Y | circuit | equipment | The circuit, feature, circuitGroup, lightGroup or virtualCircuit assigned to the valve. |
Y | Y | isDiverted | boolean | A flag indicating whether the valve is currently diverted. This is based upon the state of the assigned circuit. |
Y | Y | isIntake | boolean | Identifies whether the valve is tied to the body intake. |
Y | Y | isReturn | boolean | Identifies whether the valve is tied to the body return. |
Y | Y | isVirtual | boolean | Defines whether the valve is controlled by the OCP. When true the valve should be controlled by external processes. |
Y | Y | pinId | number | A numeric value the identifies an i/o pin for an external controller. This can be used to automate virtual valves. |