Open gyrex opened 10 months ago
My heat pump is Swim'n'Fun-branded so there may well be some differences in config there. If the Android device running the Alsavo app is in the same LAN as the heat pump, it should try to connect directly instead of going via the chinese server (at least my variant does that), so you should be able to catch that via PCAP.
I do not have any extra knowledge of how those pumps work, I just managed to reverse engineer large enough chunk of the protocol that my particular heat pump could accept external commands. Your variant is the first one I've heard of that uses different server IP/port; perhaps there are other protocol differences as well. The alsavo application seems to have code for controlling a vast array of different devices and protocols, so you may indeed be hitting a different code path there.
Thanks for your response mate and I really appreciate your work on this program and the help you're providing to the community!
I can't see the app attempting to make a connection directly with the heat pump via the LAN. I've attached the pcap file to this message and was wondering if you might be able to have a look and see if you can find it yourself? FYI, the IP of the heat pump is 10.11.12.35
Also, just out of interest, is the following output the same as what you get when you query the Chinese server?
./AlsavoCtrl -s xxx -l xxx -a 47.88.188.100 -p 51192
date time ( uptime ) [ thread name/id ] file:line v|
2024-01-05 11:05:28.828 ( 0.002s) [main thread ] loguru.cpp:647 INFO| arguments: ./AlsavoCtrl -s 824500049722 -l yellow01 -a 47.88.188.100 -p 51192
2024-01-05 11:05:28.829 ( 0.002s) [main thread ] loguru.cpp:650 INFO| Current dir: /home/john/AlsavoCtrl/build
2024-01-05 11:05:28.829 ( 0.002s) [main thread ] loguru.cpp:652 INFO| stderr verbosity: 0
2024-01-05 11:05:28.829 ( 0.002s) [main thread ] loguru.cpp:653 INFO| -----------------------------------
2024-01-05 11:05:28.829 ( 0.002s) [main thread ] AlsavoCtrl.cpp:360 INFO| Disconnecting.
2024-01-05 11:05:28.829 ( 0.002s) [main thread ] AlsavoCtrl.cpp:293 INFO| Connecting to 47.88.188.100:-14344...
2024-01-05 11:05:29.050 ( 0.223s) [main thread ] AlsavoCtrl.cpp:320 INFO| Received handshake, CSID=812500A0, DSID=61020080, server token 274DBD35
2024-01-05 11:05:29.273 ( 0.446s) [main thread ] AlsavoCtrl.cpp:353 INFO| Connection complete.
/home/alsavo/status/16={"type":"status", "index":16, "value":30.2}
/home/alsavo/status/17={"type":"status", "index":17, "value":30.3}
/home/alsavo/status/18={"type":"status", "index":18, "value":28.8}
/home/alsavo/status/19={"type":"status", "index":19, "value":0.0}
/home/alsavo/status/20={"type":"status", "index":20, "value":26.0}
/home/alsavo/status/21={"type":"status", "index":21, "value":36.0}
/home/alsavo/status/22={"type":"status", "index":22, "value":0}
/home/alsavo/status/23={"type":"status", "index":23, "value":41.0}
/home/alsavo/status/24={"type":"status", "index":24, "value":0.0}
/home/alsavo/status/25={"type":"status", "index":25, "value":350}
/home/alsavo/status/26={"type":"status", "index":26, "value":0}
/home/alsavo/status/27={"type":"status", "index":27, "value":0}
/home/alsavo/status/33={"type":"status", "index":33, "value":8}
/home/alsavo/status/34={"type":"status", "index":34, "value":0}
/home/alsavo/status/48={"type":"status", "index":48, "value":0}
/home/alsavo/status/49={"type":"status", "index":49, "value":0}
/home/alsavo/status/50={"type":"status", "index":50, "value":0}
/home/alsavo/status/51={"type":"status", "index":51, "value":0}
/home/alsavo/status/52={"type":"status", "index":52, "value":0}
/home/alsavo/status/53={"type":"status", "index":53, "value":1}
/home/alsavo/status/54={"type":"status", "index":54, "value":32}
/home/alsavo/status/55={"type":"status", "index":55, "value":41.0}
/home/alsavo/status/56={"type":"status", "index":56, "value":6.0}
/home/alsavo/status/64={"type":"status", "index":64, "value":0}
/home/alsavo/status/65={"type":"status", "index":65, "value":8306}
/home/alsavo/status/66={"type":"status", "index":66, "value":16}
/home/alsavo/status/67={"type":"status", "index":67, "value":8306}
/home/alsavo/status/68={"type":"status", "index":68, "value":16}
/home/alsavo/config/1={"type":"config", "index":1, "value":300}
/home/alsavo/config/2={"type":"config", "index":2, "value":280}
/home/alsavo/config/3={"type":"config", "index":3, "value":280}
/home/alsavo/config/4={"type":"config", "index":4, "value":49}
/home/alsavo/config/5={"type":"config", "index":5, "value":0}
/home/alsavo/config/6={"type":"config", "index":6, "value":50}
/home/alsavo/config/7={"type":"config", "index":7, "value":350}
/home/alsavo/config/8={"type":"config", "index":8, "value":500}
/home/alsavo/config/9={"type":"config", "index":9, "value":-70}
/home/alsavo/config/10={"type":"config", "index":10, "value":200}
/home/alsavo/config/11={"type":"config", "index":11, "value":0}
/home/alsavo/config/12={"type":"config", "index":12, "value":40}
/home/alsavo/config/13={"type":"config", "index":13, "value":12}
/home/alsavo/config/14={"type":"config", "index":14, "value":30}
/home/alsavo/config/15={"type":"config", "index":15, "value":-20}
/home/alsavo/config/16={"type":"config", "index":16, "value":2}
/home/alsavo/config/17={"type":"config", "index":17, "value":6}
/home/alsavo/config/32={"type":"config", "index":32, "value":5940}
/home/alsavo/config/33={"type":"config", "index":33, "value":0}
/home/alsavo/config/34={"type":"config", "index":34, "value":0}
2024-01-05 11:05:29.495 ( 0.668s) [main thread ] AlsavoCtrl.cpp:360 INFO| Disconnecting.
2024-01-05 11:05:29.495 ( 0.668s) [main thread ] loguru.cpp:526 INFO| atexit
Yes, the output looks correct. FWIW, the local and remote protocols are exactly the same; the only thing that changes is IP address and the port.
I can't find any traffic going directly to the heat pump via the LAN - it appears that everything is routed via the Alsavo Pro server. Could this be the case? Did you get a chance to look at that pcap file I attached?
I also ran a packet capture from my router (pfSense) and I can't see any local traffic either, all traffic seems to be coming from the internet to the heat pump.
It's quite possible that your variant does not support local communication, but only the cloud version. (btw, if you capture data on pfsense router, I don't think it'll be able to capture WLAN-to-WLAN traffic anyway).
Update for anyone else who happens to come across this issue...
I have a Zodiac eXo IQ Pro chlorinator which uses the iAquaLink app. I ran PCAPAndroid to sniff/monitor packets and isolated the Alsavo Pro app. I noticed connections and packets being sent/received to my chlorinator's IP address on port 1194 - strange I thought. So I tried running AlsavoCtrl and connecting to my chlorinator's IP and port 1194 and low and behold, I managed to make a local connection. It appears as though the heat pump has scanned the network, found the chlorinator and makes some connection to the chlorinator as a proxy?
In any case, it's now working, although very strangely.
I've got a Swimmax branded heat pump and it uses Alsavo Pro to manage it. I seem to be having an issue connecting to it using your wonderful app, however and was hoping you might be able to help?
When I run the command
./AlsavoCtrl -s xxx -l xxx
I get the following:I came across another issue or discussion on here where you advised someone to use PCAPdroid to capture packets so I did that and saw that the app was making a connection to a server at 47.88.188.100 on port 51192 so I tried
./AlsavoCtrl -s xxx -l xxx -a 47.88.188.100 -p 51192
and was successfully able to connect to the Chinese server.However, I cannot for the life of me figure out how to connect to the heat pump directly over the LAN, I know the IP but port 1194 doesn't work. I've tried running a port scanner (nmap) on the heat pump's IP but that didn't reveal much. Any other ideas?