I have been trying to make some kind of integration for my Samsung Smart AC (heatpump). I have an APP on my Android phone and can control it that way.
I found the AC’s local IP address and tried different things by reverse engineering this Ruby controller written for the same Samsung AC: https://bitbucket.org/CloCkWeRX/samsung-remote/src/c6f183d1fb91389fbe0a5cabb7cc0858f8c5f9ff/lib/physical/boracay.rb?at=master&fileviewer=file-view-default
Long story short: I ended up using openssl.exe.
First getting a token from the AC. Turn off / on AC and then quickly do this in openssl.exe:
openssl.exe s_client -connect 192.168.1.154:2878
"<Request Type="GetToken" />"
I then got answer back from the AC with a token. Then I could control it like this (again with openssl.exe):
"<Request Type="AuthToken"><User Token="16968012-2892-M993-N707-REMOVED" /></Request>" "<Request Type="DeviceControl"><Control CommandID="cmd11111" DUID="7825AD12REMOVED"><Attr ID="AC_FUN_POWER" Value="Off" /></Control></Request>"
And it works! The DUID is the DeviceId taken from the Android APP (“Device S/N”).
Now… My problem is that I can’t use this for automation because openssl.exe don’t seem to take parameters to send to connected device. I have to copy/type them in after openssl.exe has connected to the device. I would like to build a simple Web API that then send commands to the AC. Then I can automate my AC via CoRE. CoRE should then just use my Web API – voila. But no luck with openssl
I have tried in Powershell with Invoke-WebRequest and with .NET’s WebClient but I get SSL/TLS handshake error no matter what.
Any smart person out there to help me further? I feel so close to nailing this…