Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown panel request data #1

Open
garbled1 opened this issue Dec 21, 2019 · 25 comments
Open

Unknown panel request data #1

garbled1 opened this issue Dec 21, 2019 · 25 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@garbled1
Copy link
Owner

garbled1 commented Dec 21, 2019

I am attempting to understand how to decode two of the panel commands. Please run the test by executing: python -m pybalboa <spa_ip> from inside the base of the git repo. This runs a basic test. Then paste the data in this section:

Sending unknown commands
Got msg: 7e1a0abf2464dc140042503230303047310451800c6b010a0200f97e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Got msg: 7e0e0abf25120432635068290341197e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Got msg: 7e1dffaf13000368053800020000080c01000000000000012068000000437e
Please add this section to issue:

Hopefully if I get enough of them, I can figure out how to decode those sections. I think I more or less understand them, but it's not 100%.

Also, when posting, anything you can provide about your spa, like the model, voltage, panel model if known, etc etc would be nice.

@garbled1 garbled1 added enhancement New feature or request help wanted Extra attention is needed labels Dec 21, 2019
@garbled1 garbled1 self-assigned this Dec 21, 2019
@fabltd
Copy link

fabltd commented Jan 5, 2020

Hi Tim

Here you go. - BTW the temp is reading wrong. Also it crashed.

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x6 got 0x6
******** Testing basic commands **********
Asking for base config
7e1e0abf94021480001527729bf80000000000000000001527ffff729bf8287e
Got msg: 7e1e0abf94021480001527729bf80000000000000000001527ffff729bf8287e
Mac Addr: 0:15:27:72:9b:f8
Pump Array: [1, 0, 0, 0, 0, 0]
Light Array: [1, 0]
Asking for panel config
7e0b0abf2e1500019000003c7e
Got msg: 7e0b0abf2e1500019000003c7e
Pump Array: [1, 1, 1, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0
******** Testing engine ***********
7e0b0abf2e1500019000003c7e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
Config is loaded:
Pump Array: [1, 1, 1, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265262.164663
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265263.066945
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265264.23464
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265265.2164009
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265266.137574
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265267.235327
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265267.835741
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265269.110508
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265269.949491
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
7e20ffaf1300004e170000004f500b0c0000020000000000004e0000005a0000767e
New data as of 1578265270.8451
Current Temp: 25.555555555555557
Tempscale: C
Set Temp: 25.555555555555557
Heat Mode: 0
Heat State: 0
Temp Range: 1
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: 1
Light Status: [0, 0]
Mister Status: 0
Aux Status: [0, 0]

Spa read failed: 0 bytes read on a total of 2 expected bytes
Traceback (most recent call last):
File "pybalboa/balboa.py", line 379, in read_one_message
header = await self.reader.readexactly(2)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/asyncio/streams.py", line 677, in readexactly
raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes
(demo) %

@garbled1
Copy link
Owner Author

garbled1 commented Jan 8, 2020

Can you tell me what the temp was when you ran the test? Just trying to figure out what the math would be.

Thank you!

@fabltd
Copy link

fabltd commented Jan 8, 2020 via email

@dcwyzant
Copy link

dcwyzant commented Feb 24, 2020

Assuming you still want these since the issue is open

Sending unknown commands
Got msg: 7e1a0abf2464c913004d51425035303120010403daed01060400357e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Got msg: 7e0e0abf25040132633c68080341c07e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Got msg: 7e1dffaf13000066120900005a000a04010000000000000000660000003d7e
Please add this section to issue:

@vincedarley
Copy link

Here you go, for my Spa (wish I'd seen this earlier - I've been building the homebridge-balboa-spa plugin).

******** Testing basic commands **********
Asking for base config
Got msg: 7e1e0abf940214800015273f9b950000000000000000001527ffff3f9b951d7e
Mac Addr: 0:15:27:3f:9b:95
Pump Array: [1, 0, 0, 0, 0, 0]
Light Array: [1, 0]
Asking for panel config
Got msg: 7e0b0abf2e1a0001900000ac7e
Pump Array: [1, 1, 1, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0
Sending unknown commands
Got msg: 7e1a0abf2464e124004d5334304520202001c3479636030a4400197e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Got msg: 7e0e0abf25050132635068610741287e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Got msg: 7e1dffaf1300004c140000000306070c0100020000000000004c0000003a7e
Please add this section to issue:
#1
******** Testing engine ***********
Config is loaded:
Pump Array: [1, 1, 1, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0

New data as of 1589655637.412055
Current Temp: 38.0
Tempscale: Celcius
Set Temp: 38.0
Heat Mode: Ready
Heat State: Off
Temp Range: High
Pump Status: [1, 0, 0, 0, 0, 0]
Circulation Pump: On
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 20:0 12h
Filter Mode: Cycle 1

(The config looks correct to me: 1 light, 3 pumps, no mister or blower)

@vincedarley
Copy link

Although above, pump1 & 2 are 2-speed pumps, and pump 3 is only 1-speed. So that part of the status hasn't been discovered it seems.

@garbled1
Copy link
Owner Author

So IIRC, the pumps don't report as having a speed capability, but when you cycle them, they report current speed. In theory the 1 speed would never cycle into high? I don't actually have a 1 speed pump... Thanks for your assist! Hopefully I can decode these messages.. I think I'm close.

@vincent0794
Copy link

Actually I'm pretty sure the 2-bits per pump reported here do encode the speeds. My 3 pumps report 0x1a which corresponds to 00011010 - i.e. pump 1 is 2 speed, pump 2 is 2 speed and pump 3 is 1 speed. (Which is correct).

@aci-drain
Copy link

Hi, also sending my output:

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x6 got 0x6
******** Testing basic commands **********
Asking for base config
Got msg: 7e1e0abf94020a800015271a51690000000000000000001527ffff1a5169aa7e
Mac Addr: 0:15:27:1a:51:69
Pump Array: [1, 0, 0, 0, 1, 0]
Light Array: [1, 0]
Asking for panel config
Got msg: 7e0b0abf2e050001910000c97e
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0
Sending unknown commands
Got msg: 7e1a0abf2464e11400425032313030473111ebce9fd8030a1600d77e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Got msg: 7e0e0abf25121132635068610341a67e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Got msg: 7e1dffaf13000049100f00000306032c0a00020000000000004a000000c07e
Please add this section to issue:
#1
******** Testing engine ***********
Config is loaded:
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0

New data as of 1590329646.5673845
Current Temp: 36.5
Tempscale: Celcius
Set Temp: 37.0
Heat Mode: Ready
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/alexandervollmer/.local/lib/python3.7/site-packages/pybalboa/main.py", line 161, in
asyncio.run(mini_engine(sys.argv[1]))
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/alexandervollmer/.local/lib/python3.7/site-packages/pybalboa/main.py", line 109, in mini_engine
print("Heat State: {0}".format(spa.get_heatstate(True)))
File "/home/alexandervollmer/.local/lib/python3.7/site-packages/pybalboa/balboa.py", line 855, in get_heatstate
return text_switch[self.heatstate]
IndexError: list index out of range

@garbled1
Copy link
Owner Author

Huh.. thats.. really odd. your heat state returned something crazy. Normally that's an on/off.. I wouldn't expect it to be something other than those two... Does your spa have multiple heat states other than just ON/OFF ? Or maybe something else is being encoded there that I don't understand.

@garbled1
Copy link
Owner Author

OK.. @vincedarley it looks like the nrofpumps in the config resp is a bit of a lie? or maybe I parse that wrong and it's an int not a bitmask. That's interesting.. then on your panel config... ok.. maybe I have a fix for this..

@aci-drain
Copy link

I don’t think so. It should be just on or off. The spa is located in Germany. Maybe some location/language problems? Can I do some further debugging?

@garbled1
Copy link
Owner Author

@aci-drain Yeah.. hrmm.. Maybe I just need to mask off some bits there. Mine just shows HEATING or it doesn't. Does yours show anything else in that area of the display other than HEATING, like a third state?

Maybe, does the program crash regardless of if the spa is currently HEATING or not? Could you run the program, paste the output, and then tell me what the physical state of the spa was at the time of run, or maybe attach a pic of the display? Like maybe it was trying to tell me the blower was on or something?

@garbled1
Copy link
Owner Author

So it looks like your heatstate returned "2". I'm curious what the Got msg: 7e1d returns when it is heating, or not heating.

@aci-drain
Copy link

Ok, when the heating was switched off I got:

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x6 got 0x6
******** Testing basic commands **********
Asking for base config
Got msg: 7e1e0abf94020a800015271a51690000000000000000001527ffff1a5169aa7e
Mac Addr: 0:15:27:1a:51:69
Pump Array: [1, 0, 0, 0, 1, 0]
Light Array: [1, 0]
Asking for panel config
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Pump Array: [0, 0, 0, 0, 0, 0]
Light Array: [1, 1]
Aux Array: [0, 0]
Circulation Pump: 0
Blower: 0
Mister: 0
Sending unknown commands
Got msg: 7e0b0abf2e050001910000c97e
Got msg: 7e1a0abf2464e11400425032313030473111ebce9fd8030a1600d77e
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Got msg: 7e0e0abf25121132635068610341a67e
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Got msg: 7e1dffaf1300004a140800000306070c0000020000000000004a000000567e
Please add this section to issue:
https://github.com/garbled1/pybalboa/issues/1
******** Testing engine ***********
Config is loaded:
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0

New data as of 1590343642.7369668
Current Temp: 37.0
Tempscale: Celcius
Set Temp: 37.0
Heat Mode: Ready
Heat State: Off
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: On
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: Off
Spa Time: 20:8 12h
Filter Mode: Cycle 1

Trying to set temperatures
Curent settemp: 37.0
Could not set temp to desired: 37.0
Attempt to set temp outside of boundary of heatmode
Current temp should be set back to 37.0 is: 37.0
Spa read failed: 0 bytes read on a total of 2 expected bytes


However, when I increased the temperature the display said "Heating waiting" and I got following output:

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x6 got 0x6
******** Testing basic commands **********
Asking for base config
Got msg: 7e1e0abf94020a800015271a51690000000000000000001527ffff1a5169aa7e
Mac Addr: 0:15:27:1a:51:69
Pump Array: [1, 0, 0, 0, 1, 0]
Light Array: [1, 0]
Asking for panel config
Got msg: 7e0b0abf2e050001910000c97e
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0
Sending unknown commands
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Got msg: 7e1a0abf2464e11400425032313030473111ebce9fd8030a1600d77e
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Got msg: 7e0e0abf25121132635068610341a67e
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Got msg: 7e1dffaf1300004a140a00000306072c0000020000000000004e000000a27e
Please add this section to issue:
https://github.com/garbled1/pybalboa/issues/1
******** Testing engine ***********
Config is loaded:
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0

New data as of 1590343754.667139
Current Temp: 37.0
Tempscale: Celcius
Set Temp: 39.0
Heat Mode: Ready
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "pybalboa/__main__.py", line 161, in <module>
    asyncio.run(mini_engine(sys.argv[1]))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "pybalboa/__main__.py", line 109, in mini_engine
    print("Heat State: {0}".format(spa.get_heatstate(True)))
  File "pybalboa/balboa.py", line 855, in get_heatstate
    return text_switch[self.heatstate]
IndexError: list index out of range


When "heating" was displayed I got the following output:

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x6 got 0x6
******** Testing basic commands **********
Asking for base config
Got msg: 7e1e0abf94020a800015271a51690000000000000000001527ffff1a5169aa7e
Mac Addr: 0:15:27:1a:51:69
Pump Array: [1, 0, 0, 0, 1, 0]
Light Array: [1, 0]
Asking for panel config
Got msg: 7e0b0abf2e050001910000c97e
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0
Sending unknown commands
Got msg: 7e1a0abf2464e11400425032313030473111ebce9fd8030a1600d77e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Got msg: 7e0e0abf25121132635068610341a67e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Got msg: 7e1dffaf1300004a140d00000306071c0000020000000000004e000000e87e
Please add this section to issue:
https://github.com/garbled1/pybalboa/issues/1
******** Testing engine ***********
Config is loaded:
Pump Array: [1, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 1
Mister: 0

New data as of 1590343931.0185862
Current Temp: 37.0
Tempscale: Celcius
Set Temp: 39.0
Heat Mode: Ready
Heat State: On
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: On
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: Off
Spa Time: 20:13 12h
Filter Mode: Cycle 1

Trying to set temperatures
Curent settemp: 39.0
Could not set temp to desired: 39.0
Attempt to set temp outside of boundary of heatmode
Current temp should be set back to 39.0 is: 39.0

So I guess the "heating waiting" was missing?
69DBB8A1-06CE-428D-BD88-EDFC312DFF01_1_105_c
8E9245E6-412C-4F16-BA3E-7C5F7B4F0680_1_105_c
E3925DEE-62E8-408F-91BC-40940477AE92_1_105_c

@garbled1
Copy link
Owner Author

Wow.. that's totally crazy. yours actually has a third state.. Huh. I'll have to code around this. thanks!

@aci-drain
Copy link

Just tried again, the commit is now working also when "heat waiting". Thanks!

@vincedarley
Copy link

Re DIP switch settings. On my spa they are 0010001000. Unclear to me how that corresponds to the few uninterpreted bytes in the panel message.

I have got "hold" mode (read/write) and "lock" (read only at present) working fine in my implementation. See below in case you wish to copy that.

https://github.com/vincedarley/homebridge-plugin-bwaspa/blob/master/src/spaClient.ts

Have you tried a comprehensive run through of toggle messages to the Spa to see what other codes do anything? My notes so far are:

    // # 0x04 to 0x09 - pumps 1-6
    // # 0x11-0x12 - lights 1-2
    // # 0x3c - hold. Hold mode is used to disable the pumps during
    // service functions like cleaning or replacing the filter.  Hold mode will last for 1 hour
    // unless the mode is exited manually.
    // # 0x51 - heating mode (ready at rest, etc) (unsupported at present)
    // # 0x50 - temperature range (high or low)
    // # 0x0e - mister (unsupported at present)
    // # 0x0c - blower (unsupported at present)
    // # 0x16 - aux1, 0x17 - aux2 (unsupported at present)
    // The spa may also have two "lock" settings - locking the control panel completely, or
    // just locking the settings (but allowing jets and lights, say, to still be used).
    // Don't know what codes to use for those at present.

@garbled1
Copy link
Owner Author

I have not attempted hold mode.. I'll go look at that, thanks.
For the dip switch: 02 00 was mine, which matches 0100000000 as just raw binary. yours gave 4400 though, which makes zero sense.

I still have absolutely no clue what the 0x0abf25 message is trying to say.

@vincedarley
Copy link

Looking above, on 0x0abf25, I notice you seem to list two mildly different results for your spa. One starting 12, 11, 32... and the other 12, 04, 32,... (where mine is 05, 01, 32...) Any idea what situation causes your spa to return 04 vs 11 ?

The '07' vs '03' towards the end could indicate number of pumps, where mine is '111' (3 pumps) and yours '11' assuming you have just 2?

@natekspencer
Copy link
Collaborator

I was able to decipher quite a bit more information (I spent way too long attempting to do so) and unpacking the android app to try to reverse engineer some of it.

For the 0x0abf25 message, my best guess is:
05-06 - unknown
07 = LL (low low) low range temperature's minimum in Fahrenheit
08 - LH (low high) low range temperature's maximum in Fahrenheit
09 - HL (high low) high range temperature's minimum in Fahrenheit
10 - HH (high high) high range temperature's maximum in Fahrenheit
11 - unknown
12 - number of pumps
13 - unknown

For reference, my message was 7e0e0abf25040332635068e901454f7e. I have 1 pump on my spa, so thanks to @vincedarley's insight with 07, 03, and now my 01, this correlates to 3, 2, and 1 pumps, respectively. So I think it makes sense.

For the x0aba94 message, bytes 14-29 actually represent the iDigi Device Id. This gets saved to the Balboa cloud for use with their API. It does include the mac address as part of the id, but it could theoretically be different.

P.S. @garbled1 , I created a pull request with my changes as well as a few adjustments to the testing suite to make it a little more readable as well as guarantee that the correct messages were received for parsing the data.

@afxok
Copy link

afxok commented Dec 27, 2020

Here's another report if they're still useful.

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x06 got 0x06

******** Testing basic commands **********
Asking for module identification
Got msg: 7e1e0abf9402138000152761a1710000000000000000001527ffff61a171ab7e
Mac Addr: 00:15:27:61:a1:71
iDigi Device Id: 00000000-00000000-001527FF-FF61A171

Asking for device configuration
Got msg: 7e0b0abf2e0a0001900000327e
Pump Array: [2, 2, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0

Asking for system information
Got msg: 7e1a0abf2464dc24004d584250323020200476ecca96010a04007a7e
Model: MXBP20
Software Version: 36.0
Configuration Signature: 76ecca96
Setup Mode: 4
Software Version ID: M100_220 V36.0
Voltage: 240
Heater Type: Standard
DIP Switch: 0000010000000000

Asking for setup parameters
Got msg: 7e0e0abf2513043263506869034dc27e
Min Temps: [[50, 10.0], [80, 26.5]]
Max Temps: [[99, 37.0], [104, 40.0]]
Nr of pumps: 2

Asking for filter cycle info
Got msg: 7e0d0abf230800000f14000100d97e
Filter 1: 8:00
Filter 1 Duration: 0:15
Filter 2: 20:00 (disabled)
Filter 2 Duration: 1:00

Reading panel update
Got msg: 7e1dffaf130000630e3300000100000c00000200000000000063000010797e
New data as of 1609097709.4839125
Current Temp: 99.0
Tempscale: Fahrenheit
Set Temp: 99.0
Heat Mode: Ready
Heat State: Idle
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: On
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 14:51 12h
Filter Mode: Off

Please add the above section to issue:
#1
******** Testing engine ***********

@afxok
Copy link

afxok commented Dec 27, 2020

Here's the remaining part of the report if that's useful too.

Config is loaded:
Pump Array: [2, 2, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 1
Blower: 0
Mister: 0

New data as of 1609097968.8476942
Current Temp: 99.0
Tempscale: Fahrenheit
Set Temp: 99.0
Heat Mode: Ready
Heat State: Heating
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: On
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 14:55 12h
Filter Mode: Off

Trying to set temperatures

Current Set Temp: 99.0
Set to 104.0
Set Temp is now 104.0
Current Set Temp: 104.0
Set to 99.0
Set Temp is now 99.0

Trying to operate pump 0 (first pump)

Current Status: Off
Set to Low
Pump Status is now Low
Current Status: Low
Set to Off
Pump Status is now Off
Current Status: Off
Set to High
Pump Status is now High
Current Status: High
Set to Off
Pump Status is now Off

Play with heatmode

Heat Mode: Ready
Set to Ready
Heat Mode is now Ready
Heat Mode: Ready
Set to Rest
Heat Mode is now Rest
Heat Mode: Rest
Set to Ready
Heat Mode is now Ready

Spa read failed: 0 bytes read on a total of 2 expected bytes

@eric70x7
Copy link

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x06 got 0x06

******** Testing basic commands **********
Asking for module identification
Got msg: 7e1e0abf9402148000152773d1470000000000000000001527ffff73d147a57e
Mac Addr: 00:15:27:73:d1:47
iDigi Device Id: 00000000-00000000-001527FF-FF73D147

Asking for device configuration
Got msg: 7e0b0abf2e0600051000008a7e
Pump Array: [2, 1, 0, 0, 0, 0]
Light Array: [1, 1]
Aux Array: [0, 0]
Circulation Pump: 0
Blower: 0
Mister: 0

Asking for system information
Got msg: 7e1a0abf2464c924004c504935303153540277c79c4d01060400ef7e
Model: LPI501ST
Software Version: 36.0
Configuration Signature: 77c79c4d
Setup Mode: 2
Software Version ID: M100_201 V36.0
Voltage: 240
Heater Type: Unknown
DIP Switch: 0000010000000000

Asking for setup parameters
Got msg: 7e0e0abf250e0232635068090341977e
Min Temps: [[50, 10.0], [80, 26.5]]
Max Temps: [[99, 37.0], [104, 40.0]]
Nr of pumps: 2

Asking for filter cycle info
Got msg: 7e0d0abf230d00020094000200ea7e
Filter 1: 13:00
Filter 1 Duration: 2:00
Filter 2: 20:00 (enabled)
Filter 2 Duration: 2:00

Reading panel update
Got msg: 7e1dffaf13000068111800000100000400000000000000000068000000647e
New data as of 1669422335.4023838
Current Temp: 104.0
Tempscale: Fahrenheit
Set Temp: 104.0
Heat Mode: Ready
Heat State: Idle
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: None
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 17:24 12h
Filter Mode: Off

@400killer
Copy link

I am coming over from the topic noted above, about my pumps not being detected. Here is the output for my BP501G1 heat pack with a TP600 control panel. The tub was 102F. Pump 1 is two speed for filter and Jet, both operate from the Jet 1 button. Pump 2 is a single stage for Jets. And there is a light.

******* Testing CRC **********
Expected CRC=0x77 got 0x77
Expected CRC=0x06 got 0x06

******** Testing basic commands **********
Asking for module identification
Got msg: 7e1e0abf94021480001527735be20000000000000000001527ffff735be26f7e
Mac Addr: 00:15:27:73:5b:e2
iDigi Device Id: 00000000-00000000-001527FF-FF735BE2

Asking for device configuration
Got msg: 7e0b0abf2e060001100000d27e
Pump Array: [2, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 0
Blower: 0
Mister: 0

Asking for system information
Got msg: 7e1a0abf2464c91400425035303147312001129058ff01060400e77e
Model: BP501G1
Software Version: 20.0
Configuration Signature: 129058ff
Setup Mode: 1
Software Version ID: M100_201 V20.0
Voltage: 240
Heater Type: Unknown
DIP Switch: 0000010000000000

Asking for setup parameters
Got msg: 7e0e0abf25060132635068090341637e
Min Temps: [[50, 10.0], [80, 26.5]]
Max Temps: [[99, 37.0], [104, 40.0]]
Nr of pumps: 2

Asking for filter cycle info
Got msg: 7e0d0abf23170002000800000fda7e
Filter 1: 23:00
Filter 1 Duration: 2:00
Filter 2: 8:00 (disabled)
Filter 2 Duration: 0:15

Reading panel update
Got msg: 7e1dffaf130000660a2d00000100000400000000000000000066000000017e
New data as of 1671471972.2829287
Current Temp: 102.0
Tempscale: Fahrenheit
Set Temp: 102.0
Heat Mode: Ready
Heat State: Idle
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: None
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 10:45 12h
Filter Mode: Off

Please add the above section to issue:
#1
******** Testing engine ***********
Config is loaded:
Pump Array: [2, 1, 0, 0, 0, 0]
Light Array: [1, 0]
Aux Array: [0, 0]
Circulation Pump: 0
Blower: 0
Mister: 0

New data as of 1671471972.6787071
Current Temp: 102.0
Tempscale: Fahrenheit
Set Temp: 102.0
Heat Mode: Ready
Heat State: Idle
Temp Range: High
Pump Status: [0, 0, 0, 0, 0, 0]
Circulation Pump: None
Light Status: [0, 0]
Mister Status: None
Aux Status: [0, 0]
Blower Status: None
Spa Time: 10:45 12h
Filter Mode: Off

Trying to set temperatures

Current Set Temp: 102.0
Set to 104.0
Set Temp is now 104.0
Current Set Temp: 104.0
Set to 102.0
Set Temp is now 102.0

Trying to operate pump 0 (first pump)

Current Status: Low
Set to Low
Pump Status is now Low
Current Status: Low
Set to Off
Pump Status was not changed to Off after 5 seconds
Current Status: Low
Set to High
Pump Status is now High
Current Status: High
Set to Off
Pump Status was not changed to Off after 5 seconds

Play with heatmode

Heat Mode: Ready
Set to Ready
Heat Mode is now Ready
Heat Mode: Ready
Set to Rest
Heat Mode is now Rest
Heat Mode: Rest
Set to Ready
Heat Mode is now Ready

Spa read failed: 0 bytes read on a total of 2 expected bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants