beep-projects / SystaPi

Adding WiFi and a REST API to Paradigma SystaComfort units
GNU General Public License v3.0
16 stars 3 forks source link

I get the information about the system but no data #23

Open HenningS81 opened 3 months ago

HenningS81 commented 3 months ago

Hello,

Thanks for your great work. I had to modify it because I'm using a Raspi 4 and then the Java Version doesn't work. But that's only to let you know. My problem is another one. The Paradigma SystaComfort II is connect to the Raspi but I don't get any data. http://systapi:1337/SystaREST/findsystacomfort gives the following data: {"SystaWebIP":"192.168.11.1","SystaWebPort":22460,"DeviceTouchBcastIP":"192.168.11.255","DeviceTouchBcastPort":8001,"deviceTouchInfoString":"SC2 1 192.168.11.17 255.255.255.0 192.168.11.1 SystaComfort-II\u00000 08097E0001 0 V0.34 V1.00 40D1C6EFFEDB","unitIP":"192.168.11.17","unitName":"SystaComfort-II","unitId":"08097E0001","unitApp":8,"unitPlatform":9,"unitVersion":"1.26.1","unitMajor":126,"unitMinor":1,"unitBaseVersion":"V0.34","unitMac":"40D1C6EFFEDB","STouchAppSupported":false,"DeviceTouchPort":3477,"DeviceTouchPassword":"null"} and http://systapi:1337/SystaREST/servicestatus gives {"timeStampString":"2024-05-30T09:03:30.775577+02:00","connected":false,"running":true,"lastDataReceivedAt":"never","packetsReceived":8097,"paradigmaListenerIP":"192.168.11.1","paradigmaListenerPort":22460,"paradigmaIP":"192.168.11.17","paradigmaPort":8002,"loggingData":true,"logFileSize":60,"logFilePrefix":"SystaREST","logFileDelimiter":";","logFileRootPath":"/home/beep/logs","logFilesWritten":127,"logBufferedEntries":48,"commitDate":"2024-03-03T20:18:58+00:00"}

Any idea what I might do wrong? Thanks in advance, Henning

beep-projects commented 3 months ago

Hi Henning, sorry that this is not working for you. It looks like packets are being received from your Systa Comfort, but the format doesn't quite match, so the packets can't be evaluated. Can you use tcpdump to briefly record the communication and send it to me? sudo tcpdump -i eth0 -w systacomfort.pcap If you also record a call to http://systapi:1337/SystaREST/findsystacomfort, I could evaluate why it says that S-Touch is not supported. I think it should.

HenningS81 commented 3 months ago

Hi, thank you for your reply. Here is the tcpdump. I hope it includes everything you need. systacomfort.zip Normally I use the S-Touch app on Android without any problems if that refers to the same. Best, Henning

beep-projects commented 3 months ago

Your unit does not accept the packets sent by SystPi. I can only hope that it is the same software version for which I have already added a hack.

I have created a branch so that you can test it. Since I have not yet adapted the update script to bookworm, you must first rename the helpers and SystaRESTServer folders and can then check out the branch

In the home folder on your pi you can run:

mv SystaRESTServer SystaRESTServer.bak
mv helpers helpers.bak
helpers.bak/update.sh -b 23-i-get-the-information-about-the-system-but-no-data
HenningS81 commented 3 months ago

Hi there,

thank you for your effort. I did as you suggested. I even looked for the code in SystaRESTServer/src/de/freaklamarsch/systarest/FakeSystaWeb.java to make sure that then change happend and the 473 showed up. But the result is the same. systacomfort_new.zip

Best, Henning

beep-projects commented 3 months ago

I think Java's byte handling tricked me. I made a new commit. Can you give it another try?

HenningS81 commented 3 months ago

Thanks, but no changes...

beep-projects commented 3 months ago

do you have a pcap? I would like to see if the changed reply is sent

HenningS81 commented 2 months ago

Ah, sorry. Here it is. systacomfort_new.zip

beep-projects commented 2 months ago

bad, the hack is activated, but does not work. Do you have access to the remote portal? If yes, you could try to capture the traffic between your SystaComfort and the portal. I will try to write a script for brute force testing if we can get a reply from your unit. Might take a few evenings

HenningS81 commented 2 months ago

Unfortunately I don't have access to the remote portal. Thanks again for your time and passion!

beep-projects commented 2 months ago

Hey, I have pushed a script to the helpers folder of your branch. You can download it via

wget https://raw.githubusercontent.com/beep-projects/SystaPi/23-i-get-the-information-about-the-system-but-no-data/helpers/systapi_offset_search.py

before you run it, you need to stop SystaRESTServer

sudo systemctl stop SystaRESTServer.service

Then you can start the script via

python systapi_offset_search.py

The script tries 10,000 combinations of offsets and runs for about a day in the worst case. It prints to the console so you can see the progress, and also to the systapi_offset_search.txt file. If you restart the script, the output is simply appended to this file. If you connect to your Pi via ssh, you should consider starting the script via screen, or similar, so that the script is not interrupted if the connection is closed. If successful, the script will output a line like:

23:53:14.648559 Offsets found: CNT = 0x3fbf, MAC = 0x8e82

good luck!

HenningS81 commented 2 months ago

Wow, you do quite a lot of work for my problem, thank you! I started it late last night. But it stopped early I think: Screenshot_20240612_174127_JuiceSSH The size of the txt file seems limited to 69000 bytes or something. I started it again and try to move the file.

beep-projects commented 2 months ago

No problem, I always hope to learn something new about the protocol.

The error you see is not because of the file size, but because I indented the last 4 lines in the function one level too short. Unfortunately, the script finished and did not receive a suitable response. Can you tell me how many data packets the script displays on startup in the line: Your SystaComfort sends X data packets without being triggered

I have another idea, but it will take a little longer to implement

HenningS81 commented 2 months ago

ok, bad luck.

It says: Your SystaComfort sends 1 data packets without being triggered

beep-projects commented 2 months ago

Sorry, but at the moment I have no further idea how we can get SystaPi to work for your device :-(

HenningS81 commented 2 months ago

Thank you so much for your effort. I learned a lot on the way.