Samsung AC

I would like to see Samsung AC integrated into HA, I can see some work was done on it but looks like it has been disabled. Can we please get this implemented or a way to manually enable the feature if it already exists ?

I reviewed code that disabled Samsung AC and undid all the changes. The result was that half of my previously discovered devices stopped being discovered and neither did it successfully find my Samsung AirCon.

I think the net result from my test suggests that the previous Samsung AC changes never worked anyway. So I changed code back to disable the Samsung AirCon. I’m using Hassbian on a raspberry pi 3.

I do wish it’d work too. If you’d like to try also look here and restore all the code changes in RED and give it a go.

I gave up trying to get this working. I’ve worked around it by buying a Broadlink RM mini 3 (very cheap ir blaster) and placed it near the AC.

I can now send the relevant IR signals via HASS to turn on and off the AC.

I’ve never gone past the first discovery, there is a key that can be extracted from android app, but I’ve never been able to estabilish a connection.
I’m still interested in getting it to work without relaying on an IR blaster, maybe I’ll give it a second try

Keep us posted if you succeed. Thanks

Sure, first stop is SSL
the units use SSLv3 cyphers which are right now deprecated in openssl, so if I try to interrogate it using curl I get back

3069289680:error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small:s3_clnt.c:3435:

Ok most of my informations come from here:

I don’t know the status of the home-assistant component, so I start from the basic.

The first problem is that the AC uses a weak DH key, so in order to communicate we need to use the correct cipher, after some trial I’ve been able to ko past the dh key too small error with those:
-cipher 'HIGH:!DH:!aNULL'

so for curl:
curl -k --cert cert.pem --ciphers 'HIGH:!DH:!aNULL'
and openssl:
openssl s_client -connect -cert cert.pem -cipher 'HIGH:!DH:!aNULL'

after I got an xml response now I have to understand how to request the token to authenticate

another little progress, by using the ruby code I found here:
made by some people hacking on samsung ACs

I’ve been able to see token exchange, still got a lot of errors, but at least I’ve been able to communicate with the AC
The only modification needed is to add this line of code:
context.ciphers = 'HIGH:!DH:!aNULL'
in lib/samsung.rb, after:
context =

to force ruby to not expose DH key exchange methods, which are deprecated in modern SSL libraries

now the next task is to port all of this to python, and see how to integrate with home-assistant, I have to see if there is still some code that is already in place

Today I retried using openssl s_client command, and instead of immediately close the session this time I can send commands, so using:

openssl s_client -connect -cipher 'HIGH:!DH:!aNULL'
(differently from what stated in the openhab link the app certificate is not needed)
and pasting

<?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>

I get the token back

`<?xml version="1.0" encoding="utf-8" ?><Response Type="GetToken" Status="Ready"/>`
`<?xml version="1.0" encoding="utf-8" ?><Update Type="GetToken" Status="Completed" Token="33965903-XXXX-XXXX-XXXX-373832354144"/>`

and sending the request with token:
<Request Type="AuthToken"><User Token="33965903-XXXX-XXXX-XXXX-373832354144" /></Request>
I can authenticate
<?xml version="1.0" encoding="utf-8" ?><Response Type="AuthToken" Status="Okay" StartFrom="2017-05-15/15:10:39"/>

and check for status or turn on the AC
<Request Type="DeviceState" DUID="XXXXXXXXXXXX"></Request>

Here there is a node version of the connection code:

The best thing is that there are defined command names.
So here is my checklist:
  • Port the basic auth and send command code to python (this should be fairly easy to do)

  • Implement this as a hass component (this is a little bit harder)

  • Code the autodiscovery part (this is supported from the unit, but for me it’s already difficult code the component part)


Any updates on this ?

Hi, How’s it going.

I’m the guy that originally broke the reliance on samsung servers back in 2014 with Daniel O’Connor, and I’ve been pretty quiet on that front ever since (I’ve simply been content to ssh into my server and run the 3 commands I need against my AC)

But now I’m back, I’ve discovered Hass (and am using it, in fact about half way though the house rewire), and MQTT.

I’m not the greatest fan of Python any more, but I’m thinking about making a MQTT bridge to cover the basic functions like on, off, mode, temperature select.

Depending on how I go, I might make a direct connector for HASS (would probably still require an external daemon)

Would anyone be interested in such a diversion?

I should add, that initially I will only be coding up support for my units, but that in theory should give us quite a bit of compatibility, as far as I know the protocol hasn’t changed much tho the handshake might have.


Hi Freman. I have a Samsung F-AR24FSSSBWK1 wi-fi AC (uses

I am interested to try your solution!

id be very keen @Freman

I have my key, how can I control the air conditioner?


Until not officially integrated Samsung Air Conditioner (new protocol, port 8888). Here is my solution for that:

  1. Get your AC’s token. Follow this instructions:

  2. Create a file in HA config directory, and paste the following content:

  3. Replace the followings:
    a: 192.168.1.XX to your AC ip address
    b: rXXXXXXXXc to your token key
    c: /var/packages/homeassistant/target/var/cert.pem to your exactly path of the cert file

  4. Add this to configuration.yaml:
    configuration.yaml (1.5 KB)
    Change this /var/packages/homeassistant/target/var/ to your real path of your

  5. Add this into automations.yaml:

automations.yaml (1.4 KB)

  1. And finally Group it via groups.yaml:

groups.yaml (239 Bytes)

And finally you get the following:


Enjoy! If you have question, let me know!



Where should take those files:, from ?

This is require only one time, so you can take anywhere. After you got the token key, you can delete them.

I meant where from should i take them :slight_smile: What script should them contain ?

As this is in the Openhab link:

Replace the AC IP and the cert file real path.

Replace the cert file real path.

If you need the cert file too, then:


Do i also need the “” ?

I see, so the is the equal with the :slight_smile:

  1. step: turn off your Samsung AC
  2. step: first terminal: python3
  3. step: second terminal: python3
  4. step: power on the Samsung AC

first terminal output look like:

[email protected]:/volume1/homes/admin# python3
Listening on localhost:8889

----- Request Start ----->

Request path: /devicetoken/response
Content Length: 0
Request headers: Host: 192.168.1.XXX:8889
Accept: /

X-API-Version : v1.0.0
Content-Type: application/json
Content-Length: 28

Request payload: b’{“DeviceToken”:“rXXXXXXXXc”}’
Body: <main.RequestHandler object at 0x2b360c30>
<----- Request End -----

192.168.1.XX - - [08/Jan/2019 14:44:23] “POST /devicetoken/response HTTP/1.1” 200 -