parnic / node-screenlogic

Pentair ScreenLogic Javascript library using Node.JS
https://www.npmjs.com/package/node-screenlogic
MIT License
53 stars 15 forks source link

(Some) equipFlags meanings #15

Closed mikemucc closed 4 years ago

mikemucc commented 4 years ago

Not so much an issue, but interesting findings that I thought anybody working on this would find useful.

I'm in the middle of creating a UI in Angular, and needed the ability to programmatically determine the heater/cooler configuration so I did a little research with my EasyTouch/ScreenLogic II today to figure out what equipFlags really means.

Here are the results:

24: No Solar (Heat Pump Present) - Baseline
25: Solar Present (+1)
27: Solar Is Heat Pump (+2)
27: UltraTemp or ThermaFlo (Turns on Solar & Solar Is Heat Pump)
28: Chlorinator Present (+4)
29: Chlorinator + Solar 
31: Chlorinator + Solar is Heat Pump

--- Cooling Present
8219: Has Cooling (+8192 (Turns on Solar Present (+1), Solar Is HP (+2), UltraTemp or ThermaFlo))
8223: Has Cooling + Chlorinator Present (Turns on Solar Present, Solar Is HP, UltraTemp or ThermaFlo)

--- IntelliChem Present
32792: IntelliChem Present (+32768)
32793: IC + Solar
32795: IC + Solar + Solar Is heatpump
32796: IntelliChem + Chlorinator
32797: IntelliChem + Chlorinator + Solar
32799 : IntelliChem + Chlorinator + Solar + Solar is HP
40991 : IntelliChem + Chlorinator + Solar + Cooling

Binary Representations:

Setting Binary Notes
Heater 0000000000011000 Baseline
+ Solar 0000000000011001
+ Solar + Solar is HP 0000000000011011
+ Chlorinator 0000000000011100
+ Chlorinator + Solar 0000000000011101
+ Ch + So + SoisHP 0000000000011111
+ Cooling (+ So + SoisHP) 00100000011011
+ Cooling + Ch 00100000011111
IntelliChem + Ch + Cooling + Solar 1010000000011111
mikemucc commented 4 years ago

JSON representation:


{
    "24": {
      "Heater": true,
      "Solar": false,
      "Solar is Heater": false,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": false
    },
    "25": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": false,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": false
    },
    "27": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": false
    },
    "28": {
      "Heater": true,
      "Solar": false,
      "Solar is Heater": false,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": false
    },
    "29": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": false,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": false
    },
    "31": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": false
    },
    "8219": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": false,
      "Cooler": true,
      "IntelliChem": false
    },
    "8223": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": true,
      "Cooler": true,
      "IntelliChem": false
    },
    "32792": {
      "Heater": true,
      "Solar": false,
      "Solar is Heater": false,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": true
    },
    "32793": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": false,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": true
    },
    "32795": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": false,
      "Cooler": false,
      "IntelliChem": true
    },
    "32796": {
      "Heater": true,
      "Solar": false,
      "Solar is Heater": false,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": true
    },
    "32797": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": false,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": true
    },
    "32799":{
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": true,
      "Cooler": false,
      "IntelliChem": true
    },
    "40991": {
      "Heater": true,
      "Solar": true,
      "Solar is Heater": true,
      "Chlorinator": true,
      "Cooler": true,
      "IntelliChem": true
    }
  }
parnic commented 4 years ago

Very cool, thanks for sharing!

So: Solar 0x1 Solar-is-heatpump 0x2 Chlorinator 0x4 Cooling 0x800 Intellichem 0x8000

And we can just OR them together to interpret the flags. I appreciate it!

mikemucc commented 4 years ago

Indeed. Sorry if GitHub spammed you, I had some mistakes in my initial findings, mainly because my API only refreshes every 5 seconds and it was late. I also jacked up my pool automation figuring this out (but a quick powercycle fixed it... :-) ).