Samsung AC

I’ve ended up using HA SmartThings instead, which works pretty well for me, and it was all almost zero setup.
Even though that it needs to travel out into the internet through Samsung cloud to connect back to the AC on the local network :man_facepalming:

Ah ok… what makes me mad is that I can’t understand why our units look different from others, why I found only you with same problem as me.
Can you please tell me what do you ACs look like on the network? Are they shown as samsung? Or maybe “wisol” as mine?
I tried to look everywhere for port or API information, but I can’t find anything.

Hi.
Since I can’t find anybody but you having the same problem as me, and so no help, I chose to try Smartthings HA integration.
It works, I can control the unit, but sensors (and on/off state) never get updated.
Can you please share your config?

I am sorry, it is not working with the new version of HA, where climate component has been totally redefined

@lucac81 I havesame problem how I can solve?

first of all i’d like to give a sincere THANK YOU @SebuZet for this component :raised_hands:
i myself try to maintain a more-or-less-wannabe important HA component and i know how hard it is to debug/develop when you don’t own the device, so again thank you!

for those with older device that are using port 2878 (you can check by using the command nmap -sS -p 2878,8888 IP_ADDRESS already mentioned here in the thread) the easiest/fastest way I found to get the token was using the method mentioned by @joelFORCE here

but given the fact the openssl must be a lower version to play nice with the older certificate, i quickly installed an older debian 8.11 netinstall in a VM + all the basic packages (no updates). i proceeded by installing latest version of nodejs + homebridge-plugin-samsung-air-conditioner node package (i won’t go into details how to do all of this -> google it)

the tricky part was that running homebridge-samsung-ac-get-token <your ac's ip address> was still throwing an error SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1929 after some googleing to overcome this the command had to be run like this:

node --tls-min-v1.0 /usr/bin/homebridge-samsung-ac-get-token IP_ADDRESS

after running the command wait a bit, like 10-20 seconds, until the message Power on the device within the next 30 seconds shows up and voilà the token is returned :metal:!
(for the reference I have an AR07HSSDBWKN device model)

PS: I would like to mention that I read this entire thread and a lot of useful information was already exposed! for those who encounter problems, don’t just ask directly for a 5-seconds-solution and start reading first… also I hope this mini-tutorial helps someone someday ¯\_(ツ)_/¯

5 Likes

maybe any thoughts why i am getting this error :

iMac:~ andrius$ homebridge-samsung-ac-get-token 172.16.0.211
IP: 172.16.0.211
Power on the device within the next 30 seconds
Error occured: Failed authentication

@andriuskr have you tried running the command multiple times? it failed for me at some point giving various (other) errors. wouldn’t hurt to reset everything too router/AC

also are you sure you’re using a port 2878 model?

1 Like

I originally thought “Power on the device” meant powering the whole system off & on (typically via a breaker) - I eventually figured out that it actually meant “turn it on to cool/heat/fan via the control panel”.

Yes, i am usring 2878 model.
running homebridge on iMac with macOs high sierra. Nothing helps :frowning:

homebridge-samsung-ac-get-token 172.16.0.211

IP: 172.16.0.211

Power on the device within the next 30 seconds

Error occured: Failed authentication

have you followed my steps explained above using a virtual machine?

due to the newer version of openssl (which i highly believe HighSierra has it) or whatever ssl implementation macOS has you cannot run the homebridge-samsung-ac-get-token successfully!

@SebuZet
Hello SebuZet I have your component with samsung ac old protocol 2878, how i can sent script for start in heat mode or cool mode?
maybe the component does not support this function?

Hi Peter!

Thanks for summarising this post. I’ve tried following your instructions with a VM using Debian 8.11 + Node + Homebridge + homebridge-plugin-samsung-air-conditioner. However, when i get to this point, the installer fails. I’ve tried several times and did a lot of googling on the errors, but I can’t get it to work. My nodejs shows version 0.10.29, npm 6.13.4

I would really appreciate if you can give me a few more details on how to do this as im really struggling to get the token. I’ve tried every single option without any success, and this is the only missing piece for my current Home Assistant configuration.

Cheers,
Nick

first of all you don’t need to install homebridge, the homebridge-plugin-samsung-air-conditioner needed can run without it, it’s a nodejs executable or so

can you give more details what exactly fails, maybe posting some output? hard to tell what you’re doing there. also, unless you typed something wrong your nodejs version looks awfully low

Wow! thanks for the quick response! As expected, after a lot of frustration, when I reach out for help I make it work.

Going over the logs, I realised i was missing an access to the node_modules folder, so it wasn’t installing it properly.

I run:

sudo chown -R root:pi /usr/local/lib/node_modules/
sudo chmod -R 775 /usr/local/lib/node_modules/

and I could finish the installation. I just managed to run the script but navigating to the directory:
/usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/bin $
and running:
node ac-get-token.js 192.168.8.116
I got

Device token: 04167757-9775-M633-N858-373832354144

:smiley: Happy days!!

now onto the configuration on HA, hopefully the difficult part is over.

Thanks again!
N

1 Like

I’ve been trying for the past few days to get this working but struggling with loading the climate modules.

I’m running a Pi3 with the hassio 32bit image of HA 0.104.3

My Ac runs on the 2878 port.

I’ve successfully been able to get a token from the AC and cloned the dev version of SebuZet’s git hub to my server in config/custom_components/climate_ip. I’ve also configured the config.yaml file with the steps mentioned a few times in this post with debug on.

In the output of the log i’m getting the following:

Platform error: climate

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 760, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 265, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/climate_ip_old/climate.py", line 21, in <module>
    from homeassistant.components.climate import (ClimateDevice, DOMAIN,
ImportError: cannot import name 'ATTR_HVAC_ACTIONS' from 'homeassistant.components.climate' (/usr/src/homeassistant/homeassistant/components/climate/__init__.py)

As far as i can see all the right settings are in the right place and the config file is calling the 2878.yaml file. Is there a critical step that i’m missing or is the image i’m using on the pi not compatible with this module?

Any help is appreciated!

Cheers,

AAG

This looks like the home assistant code has changed and broken the module. If you don’t have any new features you require you can try downgrading home assistant to version 0.9x

1 Like

Thank you,

I’ll give it a go and report back

Hi all,

as per https://github.com/SebuZet/samsungrac/issues/14

you need to edit climate.py file under /config/custom_components/climate_ip and replace the 2 references on ATTR_HVAC_ACTIONS to ATTR_HVAC_ACTION

I have just made this change with version 0.105.2 and it works.

The only issue i have at the moment is that it is reading ‘Current Temperature’ as 80* C (which i believe is actually F*) but target shows as 25* C. Any ideas?

Ah thank you Nick! That seems to have done the trick!

Also seem to have the temperature showing up F*

Having a quick look around “AC_FUN_TEMPNOW” value seems to be the returned temperature, i’m struggling to find where the value is output to home assistant. was hoping to do a conversion then return that value to h.a.

properties.py seems to have mention of conversions but haven’t quite figured out how it works.