Samsung Smart Air Conditioner - OpenHAB 2.0

Tags: #<Tag:0x00007faed92c9928> #<Tag:0x00007faed92c9720>

I am just starting out with OpenHAB. I have installed OH 2.0 on Ubuntu Server 16.04.1 (LTS), and I am trying to get it to work with a Samsung Smart Air Conditioner.

First of all, that binding’s documentation could really, REALLY use some updating… (the only one I could find was here: https://github.com/openhab/openhab1-addons/wiki/Samsung-AC-binding ). Because almost nothing works as documented:

  1. the SSDP discovery command will not work:
    java -cp org.openhab.binding.samsungac-1.9.0.jar org.binding.openhab.samsungac.communicator.SsdpDiscovery
    Error: Could not find or load main class org.binding.openhab.samsungac.communicator.SsdpDiscovery

  2. The configuration file mentioned on that page (openhab.conf) no longer exists in OH2

  3. The syntax for the configuration parameters seems to have changed. The wiki page mentions “samsungac:Livingroom.host=192.168.1.2”, but my /etc/openhab2/services/samsungac.cfg has lines like “Livingroom.host=192.168.1.2”
    [Edit: I should have read the documentation more carefully - this is a known change in OH2 :slight_smile: . However, it is still confusing for new users, and should be documented with the binding as well… ]

I have followed the steps here to trust my AC’s certificate and to create an “application” certificate for communicating with it. I was able to successfully connect to the AC, get a valid token, and send commands to it from the command line (MAC and token edited for obvious reasons):

openssl s_client -connect 192.168.1.2:2878 -cert /etc/openhab2/services/mycert.pem 
CONNECTED(00000003)
---
<?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>
<Request Type="AuthToken"><User Token="b6hgb657-ab78-4ae3-adc4-a3e7gh10ef5" /></Request>
<?xml version="1.0" encoding="utf-8" ?><Response Type="AuthToken" Status="Okay" StartFrom="2017-01-30/12:17:31"/>
<Request DUID="BA8DCD8GH43E" Type="DeviceState" />
<?xml version="1.0" encoding="utf-8" ?><Response Type="DeviceState" Status="Okay">
...
<Request Type="DeviceControl"><Control CommandID="cmd1" DUID="BA8DCD8GH43E"><Attr ID="AC_FUN_POWER" Value="On" /></Control></Request>
<?xml version="1.0" encoding="utf-8" ?><Response Type="DeviceControl" Status="Okay" DUID="BA8DCD8GH43E" CommandID="cmd1"/>

However, I am unable to get the OpenHAB binding to work. I have added the config in /etc/openhab2/services/samsungac.cfg:

ACFirst.host=192.168.1.2
ACFirst.mac=BA8DCD8GH43E
ACFirst.certificate=/etc/openhab2/services/mycert.pem
ACFirst.token=b6hgb657-ab78-4ae3-adc4-a3e7gh10ef5

However, when I start OpenHab in debug mode (/usr/share/openhab2/start_debug.sh) and watch the logs, I get… absolutely nothing:

# grep onditioner /var/log/openhab2/openhab.log 
2017-01-30 03:51:47.213 [INFO ] [b.core.service.AbstractActiveService] - Samsung Air Conditioner service has been started

What else do I need to do in order to get the binding to work?

As I mentioned before, I am VERY new to OpenHab, so please explain as clearly as possible :slight_smile:

Thank you!

The Problem is that Samsung don’t want that other apps can control Samsung products. They updatet the air conditioners over the smart home app. I read that one user got a roll back to a older firmware to get the acs run. Maybe it is possible to write a new binding. It look like it is possible to communicate with samsung products over the Smart Home Api http://developer.samsung.com/smart-home
I tryed to communicate over ifttt with the samsung acs. But i can not turn them on. The communiaction from openhab -> ifttt -> samsung is not realy good. Some times one Message took up to 30 minutes.

Actually, I was perfectly able to communicate with the AC (see above). I have also written my own python code to interface with them, and I’ve had no issues - I can power them on/off, set parameters, view status, etc.

I would be glad to publish my code for anyone else to try, but be warned that it’s not really user-friendly. It’s just something I hacked together - it works, but it’s neither pretty nor easy to use :slight_smile:

This leaves two more issues:

  1. I believe my original issue was simply because I didn’t know enough about OpenHab. The Samsung AC binding is an older one (v1.9), and such it will not populate the “Things” tab in OH 2.0 automatically. I needed to manually create the list of items and a sitemap. As soon as I did that, I did find the items and was able to turn on/off the AC from OpenHab.
    In both cases (python / OpenHab), the communication works well. The delay between sending a command and getting a result is of several seconds at most.
  2. Unfortunately, the Samsung Home API is not available to the general public - in order to download it, one needs to register as a developer (which requires a “description of the application you intend to create”). So I had to skip that for now.

I’m getting mad at this…
recovered the root certs from my units, installed for java, got from pastebin the app certificate, but if I try to connect with
openssl s_client -connect 192.168.1.202:2878 -cert /tmp/cert.pem

I still cannot connect:
CONNECTED(00000003)
depth=0 C = KR, L = Suwon, O = Samsung Electronics, OU = Digital Applicance, CN = a287848, emailAddress = moweon.lee@samsung.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = KR, L = Suwon, O = Samsung Electronics, OU = Digital Applicance, CN = a287848, emailAddress = moweon.lee@samsung.com
verify error:num=21:unable to verify the first certificate
verify return:1
139727987519192:error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small:s3_clnt.c:3626:

Certificate chain
0 s:/C=KR/L=Suwon/O=Samsung Electronics/OU=Digital Applicance/CN=a287848/emailAddress=moweon.lee@samsung.com
i:/C=KR/L=Suwon/O=Samsung Electronics/OU=Digital Applicance/CN=a287848/emailAddress=moweon.lee@samsung.com

Server certificate
-----BEGIN CERTIFICATE-----
MIIDdDCCAt2gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMCS1Ix
DjAMBgNVBAcTBVN1d29uMRwwGgYDVQQKExNTYW1zdW5nIEVsZWN0cm9uaWNzMRsw
GQYDVQQLExJEaWdpdGFsIEFwcGxpY2FuY2UxEDAOBgNVBAMTB2EyODc4NDgxJTAj
BgkqhkiG9w0BCQEWFm1vd2Vvbi5sZWVAc2Ftc3VuZy5jb20wHhcNNzAwMTAxMDkw
MDEyWhcNNzAwMjAxMDkwMDEyWjCBkTELMAkGA1UEBhMCS1IxDjAMBgNVBAcTBVN1
d29uMRwwGgYDVQQKExNTYW1zdW5nIEVsZWN0cm9uaWNzMRswGQYDVQQLExJEaWdp
dGFsIEFwcGxpY2FuY2UxEDAOBgNVBAMTB2EyODc4NDgxJTAjBgkqhkiG9w0BCQEW
Fm1vd2Vvbi5sZWVAc2Ftc3VuZy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBALfwrYWYfaaKF3nYIoEAYGQsBIMg1/lzk9ixi1+odq+aewix4t/dgKiUhc59
UmP0M0POapF/zPNSxyjNqErX5gOuAd6vnnX0fhU/A/qHkRdkZPlQ/dtvhpP2nxSg
S5sx8F3GeNIyGq9fxIwcA6l7MFeEbcnkd4rb/dBQGgvEB+bXAgMBAAGjgdkwgdYw
CQYDVR0TBAIwADAkBglghkgBhvhCAQ0EFxYVIlNhbXN1bmcgZWxlY3Ryb25pY3Mi
MB0GA1UdDgQWBBSFE/e+0Y1n9RS6MrHBeLJCS0B06jBfBgNVHSMEWDBWoUmkRzBF
MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkggkAvwoLvHnlSoIwCwYDVR0PBAQDAgUgMBYG
A1UdEQQPMA2CC3NhbXN1bmcuY29tMA0GCSqGSIb3DQEBBQUAA4GBAKbOrRtV+wMY
m9fB4QanD4z+cX8MboJOccmv03yBRicPIyVN1+VjQdw0gJiuQu/Ygwhj6EuhgBGk
fGbCN2tsalvtD8Ev/S75SoGMXS2SggYMm8kKjDW0AyAKRhILGs8rhGSXXFEQ8HyW
HV0i9SQ51nHmSM7uqWzcte2hyqEiKpyE
-----END CERTIFICATE-----
subject=/C=KR/L=Suwon/O=Samsung Electronics/OU=Digital Applicance/CN=a287848/emailAddress=moweon.lee@samsung.com
issuer=/C=KR/L=Suwon/O=Samsung Electronics/OU=Digital Applicance/CN=a287848/emailAddress=moweon.lee@samsung.com

No client certificate CA names sent
Server Temp Key: DH, 64 bits

SSL handshake has read 1123 bytes and written 7 bytes

New, (NONE), Cipher is (NONE)
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1486233252
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)

What I’m doing wrong?

Actually, you seem to be connecting just fine. :slight_smile: Because I see a CONNECTED(00000003) in your listing.

Just to make sure, could you please send me the full copy/paste from your session? There should be some message from the AC at the end. In my case, it looks like the one here (notice the DPLUG and the <?xml at the end)

root@openhab:/etc/scripts/SamsungAC# openssl s_client -connect 192.168.1.2:2878 -cert /etc/openhab2/services/mycert.pem 
CONNECTED(00000003)
depth=3 C = KR, O = Samsung Electronics, CN = ROOTCA
verify error:num=19:self signed certificate in certificate chain
---
Certificate chain
 0 s:/C=KR/O=Samsung Electronics/CN=AC14K/emailAddress=AC14K@samsung.com
   i:/C=KR/O=Samsung Electronics/CN=RemoteAccessCA(CE)
 1 s:/C=KR/O=Samsung Electronics/CN=RemoteAccessCA(CE)
   i:/C=KR/O=Samsung Electronics/CN=CECA
 2 s:/C=KR/O=Samsung Electronics/CN=CECA
   i:/C=KR/O=Samsung Electronics/CN=ROOTCA
 3 s:/C=KR/O=Samsung Electronics/CN=ROOTCA
   i:/C=KR/O=Samsung Electronics/CN=ROOTCA
---
Server certificate
-----BEGIN CERTIFICATE-----
<snip>
-----END CERTIFICATE-----
    Start Time: 1486312203
    Timeout   : 300 (sec)
    Verify return code: 19 (self signed certificate in certificate chain)
---
DPLUG-1.6
<?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>

If you have those lines at the end, try sending a message to the AC yourself. Try copy/pasting the following line into the session, and press Enter at the end (only one Enter - two will close the session!):

<Request Type="GetToken"/>

No, I always get the connected commad but the full output is the one I pasted above, no XML, and end with

New, (NONE), Cipher is (NONE)
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1486317933
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)

My only guess is that my certificate (the one from the app) is invalid, I got that from the pastebin link, but I don’t know if is good, I tried to extract it myself but I cannot decode the bouncycastle (I can’t find the password)

In my case, I simply took the pastebin code for the client cert (this one), and converted it:

base64 -d < pasted.txt > cert.pem

I got a text file which starts with a private key for ac14k_m, and continues with the full certificate chain:

oot@openhab:/etc/openhab2/services# cat mycert.pem 
Bag Attributes
    friendlyName: ac14k_m
    localKeyID: 54 69 6D 65 20 31 34 35 35 34 39 32 33 35 32 36 39 36 
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
....
-----END PRIVATE KEY-----
Bag Attributes
    friendlyName: ac14k_m
    localKeyID: 54 69 6D 65 20 31 34 35 35 34 39 32 33 35 32 36 39 36 
subject=/C=KR/O=Samsung Electronics/CN=AC14K_M/emailAddress=AC14K_M@samsung.com
issuer=/C=KR/O=Samsung Electronics/CN=RemoteAccessCA(CE)
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
Bag Attributes
    friendlyName: CN=RemoteAccessCA(CE),O=Samsung Electronics,C=KR
subject=/C=KR/O=Samsung Electronics/CN=RemoteAccessCA(CE)
issuer=/C=KR/O=Samsung Electronics/CN=CECA
-----BEGIN CERTIFICATE-----

You seem to have a slightly different device (or maybe different firmware version?) - mine sends a different server certificate (CN=AC14K), and a full certificate chain. But as long as the Samsung app is able to talk to your device, we should also be able to connect directly to it. Are you able to control your device using the app? (the “in-home” feature).


One thing I noticed from your output is the following error message:

139727987519192:error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small:s3_clnt.c:3626:

It is possible that you have an older model AC, which tries to negotiate a cipher that is insecure by today’s standards. This has been disabled in some version of openssl (some time in 2015, after the Logjam attack was published).
[Edited to add the official notice regarding the update - it is here]

Unfortunately, I was unable to find a way to disable this check - as far as I can tell, this check is hardcoded in openssl. Everyone’s solution is “update the server”, but this might not be possible in our particular case…

See here for a very similar issue.

Thanks, I’ll have a look once a have some free time, at the moment i’ll keep openhab in stand by

Hello @bogd ,

I modified samsungac.conf (I got tokens connecting through openssl), I have created samsung.items and samsung.sitemap.fragment, but the binding doesn’t appear in openhab. Should i do anything more? I’m sorry, I’m new to openhab.

I have followed this tutorial for creating the files:

http://docs.openhab.org/addons/bindings/samsungac1/readme.html#binding-configuration

using comands through openssl everything is working smooth, but I want to have in openhab in order to make rules.

Hello, after a long time I rechecked my AC bindings, I’ve migrated to home-assistant in the meantime, but I hope this helps other people, my problem above:
139727987519192:error:14082174:SSL routines:ssl3_check_cert_and_algorithm:dh key too small:s3_clnt.c:3626:

is a consequence of latest openSSL development, which disable SSLv3 and DH key exchange, in order to run the command I had to do this:
openssl s_client -connect 192.168.1.166:2878 -cert cert.pem -cipher 'HIGH:!DH:!aNULL'

which gives me a correct output, and using other libraries:


I’ve been able to connect.
Now I could try openhab again to see if I can command the ACs, and see if I could write something for home-assistant

1 Like

Hello there.
Do you have a step-by-step guide to have this AC working on openhab 2 ?
Thanks!

Hi Guys and Gals, I’m new here to the forums and have just installed OpenHAB2 for the first time. This is new ground for me and I’m here for the same thing: getting samsung aircons connected.

Any stories of actual success and any guides would be greatly appreciated.

@bogd I see you have written python to control the Samsung Aircon. You mentioned you’d share - could you please? I’m very interested.

@hotswapster - sorry about the delay in responding. Holidays got in the way :)) :stuck_out_tongue:

As mentioned before, I’d be happy to share. My only condition is that if you change/improve the code in any way, you should also share all the changes so that others can benefit from them.

You can find my code here: AC Code

Once again, I know it’s not pretty, but it works. However, there is one problem I’ve noticed - the AC simply stops responding from time to time, for very long intervals:

  ssl_sock = samsung_ac.ssl_connect (creds_ac_birou.ip_addr, creds_ac_birou.port)         
File "/etc/scripts/samsung_ac.py", line 24, in ssl_connect
  ssl_sock.connect((ip, port))
File "/usr/lib/python3.5/ssl.py", line 1019, in connect
  self._real_connect(addr, False)
File "/usr/lib/python3.5/ssl.py", line 1006, in _real_connect
  socket.connect(self, addr)
OSError: [Errno 113] No route to host

Since this connection is in the same LAN, with nothing that could block/filter the traffic, I can only assume that either the AC loses WiFi connectivity, or its firmware simply stops responding…

Hi there bogd! i’m having troubles downloading the code you’ve putted here: http://bogdan.sass.ro/code/SamsungAC.zip

can you open a git for the code so we can commit changes to it?

thank you for the help

Sorry, it was a typo in the file name. Should be OK now :slight_smile:

I will open a git as soon as I learn enough about git to be able to do that :slight_smile: (keep in mind that I’m not a programmer, more of a… sysadmin :wink: ).

Thanks! I’ll definitely share any code improvements. I’m fairly new to this stuff but I’m keen to give it a good crack :slight_smile:

Hi Guys,

should the Samsungac binding 1.12.0 work on OH 2.3?

After i installed the certificate i was able to connect to the AC but i am not able to get a token.
Here is my log:

openssl s_client -connect 192.168.88.85:88                                                                                        88 -cert cert.pem -cipher 'HIGH:!DH:!aNULL'
CONNECTED(00000003)
depth=3 C = KR, O = Samsung Electronics, CN = ROOTCA
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/C=KR/O=Samsung Electronics/CN=DA_SET/emailAddress=tp6xrac16k@samsung.com
   i:/C=KR/O=Samsung Electronics/CN=DeviceCA/emailAddress=DeviceCA@samsung.com
 1 s:/C=KR/O=Samsung Electronics/CN=DeviceCA/emailAddress=DeviceCA@samsung.com
   i:/C=KR/O=Samsung Electronics/CN=CECA
 2 s:/C=KR/O=Samsung Electronics/CN=CECA
   i:/C=KR/O=Samsung Electronics/CN=ROOTCA
 3 s:/C=KR/O=Samsung Electronics/CN=ROOTCA
   i:/C=KR/O=Samsung Electronics/CN=ROOTCA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDPDCCAiSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJLUjEc
MBoGA1UECgwTU2Ftc3VuZyBFbGVjdHJvbmljczERMA8GA1UEAwwIRGV2aWNlQ0Ex
IzAhBgkqhkiG9w0BCQEWFERldmljZUNBQHNhbXN1bmcuY29tMCIYDzE5NjAwMTAx
MDAwMDAwWhgPMjA2MDAxMDEwMDAwMDBaMGMxCzAJBgNVBAYTAktSMRwwGgYDVQQK
DBNTYW1zdW5nIEVsZWN0cm9uaWNzMQ8wDQYDVQQDDAZEQV9TRVQxJTAjBgkqhkiG
9w0BCQEWFnRwNnhyYWMxNmtAc2Ftc3VuZy5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBALL9JJzX+UXAQAkFB0feuTHIMS05w9M50v9cZrNKP8QxA9x3BMKk
KRDMvQI/DHBZdIXTLbUAhcjDecuKMGPdRdzLaEDGhYHqRW6foQnOXWM8Wnstjaiu
/Cbrp9ZZRlhPFgFd9+0iDTkwhRNmPUhKScY+4gi4L08s+xgwsvPTob9JAgMBAAGj
ezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVk
IENlcnRpZmljYXRlMB0GA1UdDgQWBBQhieY9OsEXlBotbJFLi1d52jO94TAfBgNV
HSMEGDAWgBTN1o2fJj3ZagNW1PCh3dIEngOjLDANBgkqhkiG9w0BAQUFAAOCAQEA
SZ8NtqJeIgyxupBBN8O+w7CdTP6WCVVxHSU5i17uXolqaoZzr83mc+SA8ouPnVzB
lDkPMdH7gF0MwqZqhlMJjnjnZulG4YK35p56ZtwdLSjwCU6+Z1y691Iehvo2Pfll
nFjhsMk2t+vNTRdAzdR3yHRRjdpF5FEs/3+zSojv1yL46H6edBfHKEXQwFvP7VNJ
hPi9+PcGeJp3sWZ2R7SxJlqFGCqmxwIgoceuIPVoHBidB7WNMCzkGRTYQLIDJiQa
fucukWq/gpNnhpZc+Tmw1ElJ/OfwKu9Ocu4J6XuUoiTosAnH5L7haMvZT94AcGp2
FLqT2wELzBTeE3Ag31sszg==
-----END CERTIFICATE-----
subject=/C=KR/O=Samsung Electronics/CN=DA_SET/emailAddress=tp6xrac16k@samsung.co                                                                                        m
issuer=/C=KR/O=Samsung Electronics/CN=DeviceCA/emailAddress=DeviceCA@samsung.com
---
Acceptable client certificate CA names
/C=KR/O=Samsung Electronics/CN=DeviceCA/emailAddress=DeviceCA@samsung.com
/C=KR/O=Samsung Electronics/CN=RemoteAccessCA(CE)
/C=KR/O=Samsung Electronics/CN=CECA
/C=KR/O=Samsung Electronics/CN=ROOTCA
---
SSL handshake has read 5220 bytes and written 1568 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : ECDHE-RSA-AES256-SHA
    Session-ID: D9CE201927EFCA17B7C41E4BD93459318DA0F93B86EE9C05E17E0F1985B58713
    Session-ID-ctx:
    Master-Key: 73CC0686F8DA2AC5442E371224D380E64BC49E7CFEBB34A458FB9C3269F0A18E                                                                                        CEA6A567AC1435E761539A8C1428AAA7
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 300 (seconds)
    TLS session ticket:
    0000 - 6d d7 9f 62 ce bc 07 44-48 4c ba 77 0f f0 d1 4f   m..b...DHL.w...O
    0010 - f1 b3 32 37 11 1e 58 be-9a 28 ed a9 9d 5e 6b 97   ..27..X..(...^k.
    0020 - 3c c3 ef 47 6c a1 a5 ff-ff 7f 03 f9 03 af 7e a7   <..Gl.........~.
    0030 - 42 3f 14 4e 13 e2 39 a1-1a 17 11 1f 9a 83 6f 27   B?.N..9.......o'
    0040 - 00 1e 6c 14 e1 23 90 3f-2c d9 75 9e 5f 33 20 5a   ..l..#.?,.u._3 Z
    0050 - f4 45 79 b4 bb 4c cf f0-fb 00 07 91 8e 25 ba c0   .Ey..L.......%..
    0060 - a7 84 f6 ac 86 ae 5c 2e-1a 0e ae d5 67 3a 6a 22   ......\.....g:j"
    0070 - c9 70 bf 67 c2 0b b4 de-72 41 98 26 79 45 22 65   .p.g....rA.&yE"e
    0080 - 13 10 46 d1 3d ea 49 99-da e4 b0 fc 08 57 87 28   ..F.=.I......W.(
    0090 - 19 26 24 ca 33 08 a4 83-7d 1d 77 94 51 8f ba cf   .&$.3...}.w.Q...
    00a0 - c5 92 ba 77 e7 e9 4e 92-9c 42 2d a7 d5 bd f1 dd   ...w..N..B-.....
    00b0 - 97 e7 25 12 5a 3c cf 89-a1 41 df e9 54 94 a2 3c   ..%.Z<...A..T..<
    00c0 - 11 ae ea 61 5c ae 85 00-eb e8 30 c1 8f 16 d1 e9   ...a\.....0.....
    00d0 - d5 68 55 d9 09 86 4c 70-6c de e3 f5 1e 69 47 79   .hU...Lpl....iGy
    00e0 - ec cf 8e f5 bb 92 df 61-7c bd cd f9 6e 25 2b ae   .......a|...n%+.
    00f0 - fb fb 64 9b 0b df 0f b6-58 0e 98 fe c9 c7 16 53   ..d.....X......S
    0100 - 6b 95 64 fc 43 a0 e3 93-92 eb f2 71 93 d9 02 eb   k.d.C......q....
    0110 - c3 7b 42 85 c9 9c ad 62-ab e1 48 34 60 28 2f 95   .{B....b..H4`(/.
    0120 - c0 cd 48 7f e2 21 51 a7-28 f4 89 38 61 66 47 e6   ..H..!Q.(..8afG.
    0130 - 4b 87 26 6c de 2f 76 71-aa 66 2b 13 bd 16 46 70   K.&l./vq.f+...Fp
    0140 - 22 31 c0 98 d7 0d 24 cb-3c 60 28 50 36 f0 29 f9   "1....$.<`(P6.).
    0150 - ae ad fd c1 5b 35 4e 84-a5 d8 71 da 8d e7 63 7f   ....[5N...q...c.
    0160 - fa 52 e7 42 37 30 5a b7-e1 37 d7 ed be 74 bf c3   .R.B70Z..7...t..
    0170 - f9 b1 42 08 ad 0c f7 a0-db 9c e9 c1 2b d4 a1 96   ..B.........+...
    0180 - a5 fa 05 4d db 80 ec ac-f6 ed 4c 56 38 39 5a 78   ...M......LV89Zx
    0190 - 40 14 59 ef 45 c6 30 d8-4f be 2b a7 ac e7 2a c8   @.Y.E.0.O.+...*.
    01a0 - 95 c1 29 dd 88 45 fd 64-ce 86 18 8c 7a b8 52 35   ..)..E.d....z.R5
    01b0 - 6b 31 e0 5e 61 da ec 4e-5d cb b1 35 2d 66 40 02   k1.^a..N]..5-f@.
    01c0 - 88 ed 1a 89 27 78 14 68-50 ec 2c 2f c3 20 3e 7c   ....'x.hP.,/. >|
    01d0 - 76 47 7b f2 3e 60 70 da-91 ff 22 bf f1 cd fc b6   vG{.>`p...".....
    01e0 - c3 00 e2 16 a3 9a bf 29-93 15 f9 1a 14 e1 14 54   .......).......T
    01f0 - ae ac 08 5a 7f 7c ee 84-d2 e9 ec 85 2f 74 7a b4   ...Z.|....../tz.
    0200 - 9d 6b 6c 2b f8 2c 88 38-21 b5 52 cc 6e e5 cf 77   .kl+.,.8!.R.n..w
    0210 - 8f 70 31 ae 69 3c bd 6e-d4 2a a7 3d 3d bc 1c 14   .p1.i<.n.*.==...
    0220 - f9 9b 8f b9 5f cf f8 42-82 46 87 b4 d8 66 50 fc   ...._..B.F...fP.
    0230 - 7c 54 7e 7c 3e e4 14 e9-9a bd b0 35 b8 35 53 d5   |T~|>......5.5S.
    0240 - 85 01 94 c3 ed 2a e8 a8-7a 5d c8 a1 4d 96 52 dc   .....*..z]..M.R.
    0250 - 64 b6 f7 37 2f 6b 83 18-27 81 1d 5e 00 fc c3 5f   d..7/k..'..^..._
    0260 - 6e 0a 6b 83 17 dc a4 f5-f8 15 0b c2 79 19 d6 44   n.k.........y..D
    0270 - 88 f3 ca 1a c2 c0 49 32-2b ec 5b 4a 89 62 77 ef   ......I2+.[J.bw.
    0280 - c7 6c 08 00 81 46 12 ad-c9 88 4e 78 bf 48 0a a0   .l...F....Nx.H..
    0290 - ae e7 e2 c8 75 a5 fd a4-9b 5d 26 8d 28 35 c4 2c   ....u....]&.(5.,
    02a0 - b4 92 3c f7 31 76 4e f9-0c 26 48 cb ca 10 ed b2   ..<.1vN..&H.....
    02b0 - 51 09 85 1b a8 90 6f c2-26 41 b9 2f 48 bf 17 f0   Q.....o.&A./H...
    02c0 - 76 5d 3a bd c4 84 3e 4d-7f 15 8d 92 6e 42 8e f7   v]:...>M....nB..
    02d0 - 0d b3 fc 68 ec e3 14 88-89 b6 86 cc b4 6a af d1   ...h.........j..
    02e0 - 72 b6 9f 9d 78 de c5 96-72 3b 30 c1 ec 78 57 19   r...x...r;0..xW.
    02f0 - d8 16 9b 45 9b e4 ba 93-d5 cc 80 7e a6 81 23 b2   ...E.......~..#.
    0300 - 77 da 16 09 f7 4d b6 d8-01 3d 04 e0 08 ad ee 7f   w....M...=......
    0310 - a5 c0 69 3f d3 b0 37 d6-29 ec ed d0 85 a3 47 b5   ..i?..7.).....G.
    0320 - 1b 5d f1 40 8d 16 2a a3-24 9d 8a 18 36 1f 62 6c   .].@..*.$...6.bl
    0330 - b7 b5 8d 3e 10 a8 39 9b-dc bf a3 3d 33 98 db 16   ...>..9....=3...
    0340 - bf a3 38 ef 0c 71 ad 9c-94 83 5b 68 68 7f c5 56   ..8..q....[hh..V
    0350 - e0 db c5 22 d3 1a 1d 4b-1b d4 65 ac d3 20 48 b2   ..."...K..e.. H.
    0360 - 1b 8d ce cd b6 28 97 fe-f2 60 4e d5 04 63 5f 09   .....(...`N..c_.
    0370 - 95 2d 8a d4 87 6b ab d6-fd 90 36 06 c1 90 8a c5   .-...k....6.....
    0380 - a0 58 f1 41 8e a5 25 ae-d1 1e 71 6e 05 48 f3 64   .X.A..%...qn.H.d
    0390 - 9f 14 9e 03 2f eb ab 34-2a 61 19 9f 81 9e ab 70   ..../..4*a.....p
    03a0 - 39 67 2b 5e e5 7f 2f 95-bd ae a3 0c 55 15 d7 24   9g+^../.....U..$
    03b0 - 4a 3e 5e 60 af d8 73 49-71 64 ab 4d 29 35 85 7e   J>^`..sIqd.M)5.~
    03c0 - 41 fe 51 4e ee b5 5a ff-fd 76 d6 43 e3 f3 90 e8   A.QN..Z..v.C....
    03d0 - 3d 95 d9 af 72 06 b0 29-b6 08 87 a9 1e d3 67 c8   =...r..)......g.
    03e0 - 0a 93 e4 a5 4f 61 4b 09-dc 74 67 2c ea a5 72 f8   ....OaK..tg,..r.
    03f0 - 93 0b 86 70 f4 d4 59 bd-05 38 12 15 b9 f0 c6 86   ...p..Y..8......
    0400 - 52 c6 2d 41 ea fb 25 e4-01 b9 af 77 73 52 73 ad   R.-A..%....wsRs.
    0410 - 2f 63 9a 47 6d 70 da 5d-c2 a4 ed 83 5d d2 78 05   /c.Gmp.]....].x.
    0420 - 29 d1 83 8e c8 05 8e 6c-f7 7e 74 e9 7e f3 6c fb   )......l.~t.~.l.
    0430 - 71 ad db b2 8a e5 b2 72-d0 99 f4 b3 20 f0 09 5b   q......r.... ..[

    Start Time: 1528724163
    Timeout   : 300 (sec)
    Verify return code: 19 (self signed certificate in certificate chain)
---
<Request Type="GetToken"/>
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.2.7</center>
</body>
</html>
read:errno=0

Here my binding config:

AC.host=192.168.88.85
AC.mac=C097276E3CAC
AC.token=
AC.password=something
AC.certificate=/etc/openhab2/services/cert.pem
AC.port=8888


Here the debug log:

2018-06-11 15:56:45.646 [DEBUG] [ng.samsungac.internal.AirConditioner] - Disconnected from AC: 192.168.88.85
2018-06-11 15:56:46.106 [DEBUG] [ng.samsungac.internal.AirConditioner] - Disconnecting... with exception: java.lang.Exception: Could not connect using certificate: /etc/openhab2/services/cert.pem
2018-06-11 15:56:46.108 [DEBUG] [ng.samsungac.internal.AirConditioner] - Disconnected from AC: 192.168.88.85

I hope you can help and the nice binding still works.

best regards
Vaillan

Hi, how to configure items for OH2? I had this binding working with OH1 with following:

Switch ac_power (AC) {samsungac="[pumppu|AC_FUN_POWER]"}

ok, got it working again. My item configuration was wrong, following syntax worked:

Switch AC_power “AC power” (gAC) {samsungac="[pumppu|AC_FUN_POWER]"}