Alright, it's been now a few weeks, but I made some good progress and wanted to share this with you. I can now control my Pentair VS pump from my mobile phone: https://www.youtube.com/watch?v=T3iz8tXQJtM
My test rig is a bit unwieldy at the moment and not ready for permanent use just yet
I mentioned this before, but I just wanted to sum up what my goal here was. I have a very basic pool setup: VS pump, manual valves and a manual heater. So my main motivation was to be able to perform some basic tasks on the pump and not have to walk all the way back to my pump. While I could also run an external program and have to repeat the command every 30 seconds, which my Arduino controller program can do, it seemed to me a bit of an overkill for my use case. I understand why you want an external controller do that. For example, if the connection to the pump gets disrupted, you want the pump to stop and not keep going for safety reasons. Anyway, so right now I have to walk up to the pump and press one button to get it going. That's what I also wanted to be able to do from my phone.
That being said, I also found out more about some of the data for the "Mode" CFI (Command/Function/Instruction) 0x05. The highlighted values below allow you to choose the desired speed like you would press the button the pump panel itself. If you choose to do this, the pump will keep going and will not stop until you actually send the stop command again. This is different from running an external program, where you have to repeat the command every 30 seconds. So, use with caution!
From Michael's pa_iflo.h (line 23ff):
#define IFLO_MOD 5
#define IFLO_MOD_FILTER 0x00 /* Filter */
#define IFLO_MOD_MANUAL 0x01 /* Manual */
#define IFLO_MOD_BKWASH 0x02 // ERIE: SPEED 1
#define IFLO_MOD______3 0x03 /* never seen */ // ERIE: SPEED 2
#define IFLO_MOD______4 0x04 /* never seen */ // ERIE: SPEED 3
#define IFLO_MOD______5 0x05 /* never seen */ // ERIE: SPEED 4
#define IFLO_MOD_FEATR1 0x06 /* Feature 1 */
#define IFLO_MOD______7 0x07 /* never seen */
#define IFLO_MOD______8 0x08 /* never seen */
#define IFLO_MOD_EXT_P1 0x09
#define IFLO_MOD_EXT_P2 0x0a
#define IFLO_MOD_EXT_P3 0x0b
#define IFLO_MOD_EXT_P4 0x0c
The above values might have different meanings for a different pump model. But that is what they do in my case.
So to run Speed 2, I have to send the following commands:
/*
* Checksum omitted for laziness reasons. The program calculates it at runtime.
* The pump confirmation responses have also been omitted for brevity reasons. The app, however, checks them
* to verify that the last CFI was successful.
*/
P R E A M B L E VER PUMP CTRL CFI LEN DATA CHKH CHKL
Set Control Remote: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0xFF, 0x00, 0x00 }
Set Mode Speed 2: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x05, 0x01, 0x03, 0x00, 0x00 }
Set Run Start: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x0A, 0x00, 0x00 }
Set Control Local: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0x00, 0x00, 0x00 }
// Stop Pump and put it back into Schedule Mode
Set Control Remote: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0xFF, 0x00, 0x00 }
Set Run Stop: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x04, 0x00, 0x00 }
// Like pressing Stop twice on the panel
Set Run Stop: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x04, 0x00, 0x00 }
Set Control Local: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0x00, 0x00, 0x00 }
My next steps are to get my rig into a small watertight container (Pelican makes some) and see if I can downsize the Arduino board to a UNO or so and then power it maybe with a couple of D batteries, so I can leave the rig next to my pump.
Yet another shout-out to Michael whose C code was a tremendous help here! And of course rocco and tag, too