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

Heat Status Code 1 Meaning? #12

Closed mikemucc closed 4 years ago

mikemucc commented 4 years ago

I'm actually trying to wrap your code into a polling REST API using express.js.

Right now I'm just working on getting the status of the pool and I'm working through the heater status options.

I was able to figure out what the heater mode codes are from that PDF published by Carson Eisenach, but I'm not sure what the heat status codes are.

From my own observations I've been able to glean the following: 0 = off 2 = on (gas heater)

Would you perchance know what does a heat status code 1 mean?

If I were going to guess, I'd guess it means "Solar On", since the lower non-zero codes for heat mode refer to Solar, but I figured I'd ask the expert.

parnic commented 4 years ago

I think you're probably right. I haven't looked into it too much myself.

Here are all the references to heat mode/status in the official app's decompiled source:

    public static final int GENERAL_HEAT_MODE_HEAT = 0;
    public static final int GENERAL_HEAT_MODE_HPUMP = 2;
    public static final int GENERAL_HEAT_MODE_SOLAR = 1;
    public static final int HEAT_BUTTON_MODE_HEATER = 1;
    public static final int HEAT_BUTTON_MODE_HPUMP = 3;
    public static final int HEAT_BUTTON_MODE_HPUMP_PREF = 2;
    public static final int HEAT_BUTTON_MODE_OFF = 0;
    public static final int HEAT_BUTTON_MODE_SOLAR_ONLY = 2;
    public static final int HEAT_BUTTON_MODE_SOLAR_PREF = 3;
    public static final int HEAT_MODE_HEATER = 3;
    public static final int HEAT_MODE_OFF = 0;
    public static final int HEAT_MODE_SOLAR = 2;
    public static final int HEAT_MODE_SOLARONLY = 1;
mikemucc commented 4 years ago

Anything in that decompiled source about how to get the Pump Speed & power usage?

Where/how did you get the decompiled source?

parnic commented 4 years ago

I would have to take a look, don't know off the top of my head. edit: there are two interesting events: GETPUMPSTATUS (12584) and SETPUMPFLOW (12586) but Pentair's app doesn't seem to use them (and ceisenach's pdf doesn't have any more info), so I don't know what the arguments represent. You'd probably have to do some detective work to figure out what's in each reply if indeed the equipment even responds to them.

Ran the .apk (which I downloaded from apkpure.com) through JADX.

mikemucc commented 4 years ago

I saw those in ceisenach's pdf.

I've already tweaked your source to add a module to call 12584 but I got nothing back (possibly because I'm not interpreting it properly in the return)... and then I had to stop for a while.

I intend to play with this... hopefully you'll be getting a PR from me soon. :-)