Home Assistant Community

Samsung AC Support, help needed

#21

the best way is to capture the commands that the wifi adapter sends and receives to/from the ac units, and then ditch the wifi adapter and develop one with something like mysensors! to completely remove samsung cloud and the tokens they use

#22

Hi,
I tried this new script (https://www.npmjs.com/package/homebridge-plugin-samsung-air-conditioner) in homebridge and it works, it authenticates and it is possible to send the commands.
How can I use my Samsung air conditioner in the home assistant?

#23

OMG! It works perfect with Homebridge. The next step, Home Assistant. My knowledges aren’t enough to get it done (yet) :kissing_smiling_eyes::kissing_smiling_eyes::kissing_smiling_eyes:

#24

Hi,
If you have Samsung AC device which is listening on port 8888 (with new protocol) you can try custom component which I made to work with my unit. I hope it will work also for you.

BR,
Sebastian

#25

I have one that is working on port 2878 :frowning:

I managed to integrate my AC by using Homebridge, but can’t get it work in HA or SmartThings :frowning:

Here is some useful links of someone will make integration for AC with port 2878 :
openhub: https://www.openhab.org/addons/bindings/samsungac1
node.js: https://github.com/CloCkWeRX/node-samsung-airconditioner
homebridge for port 8888: https://github.com/cicciovo/homebridge-samsung-airconditioner
homebridge for port 2878: https://www.npmjs.com/package/homebridge-plugin-samsung-air-conditioner

#26

@Modrica If binding from last link is working with your AC unit then you definitely should try my component. Just make sure that in configuration section as host you put some like 'https://device_ip:2878
It looks like this binding is using the same (or very similar) API.

#27

@SebuZet I am geting this error when I use your component with my port 2878 AC

Error loading custom_components.climate.samsungrac. Make sure all dependencies are installed
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/loader.py”, line 166, in _load_file
module = importlib.import_module(path)
File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 967, in _find_and_load_unlocked
File “”, line 677, in _load_unlocked
File “”, line 728, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/climate/samsungrac.py”, line 8, in
from homeassistant.components.climate import (ClimateDevice,
ImportError: cannot import name ‘STATE_AUTO’ from ‘homeassistant.components.climate’ (/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/init.py)
Service homeassistant/reload_core_config called.

#28

@Modrica Which version of Home Assistant are you using? I wrote this component on version used by me - 0.87.1. in my version of HA there is such value

#29

@SebuZet I am on latest beta, 0.89.0b0

#30

@Modrica As far as I know there were some breaking changes in components in latest version.
I will update my HA to the latest version in weekend and check what’s wrong.

#31

It works like a charm!

Using:
homebridge for port 2878 to control my AC-Unit from Apple Home App.

I have one question if someone can help me?
When i look in the logfile and in Apple Home-App, it shows Farenheit, is it possible to change to Celsius?
I cannot find any settings in Apple Home App.

Thanks everyone!

From Homebridge-log:
State updated: {“AC_FUN_TEMPNOW”:“79”}

#32

@Modrica New version for latest HA is available.

#33

@SebuZet

Error while setting up platform samsungrac
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 384, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 380, in _make_request
httplib_response = conn.getresponse()
File “/usr/local/lib/python3.7/http/client.py”, line 1321, in getresponse
response.begin()
File “/usr/local/lib/python3.7/http/client.py”, line 296, in begin
version, status, reason = self._read_status()
File “/usr/local/lib/python3.7/http/client.py”, line 278, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: DPLUG-1.6

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 384, in _make_request
six.raise_from(e, None)
File “”, line 2, in raise_from
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 380, in _make_request
httplib_response = conn.getresponse()
File “/usr/local/lib/python3.7/http/client.py”, line 1321, in getresponse
response.begin()
File “/usr/local/lib/python3.7/http/client.py”, line 296, in begin
version, status, reason = self._read_status()
File “/usr/local/lib/python3.7/http/client.py”, line 278, in _read_status
raise BadStatusLine(line)
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, BadStatusLine(‘DPLUG-1.6\r\n’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/config/custom_components/samsungrac/climate.py”, line 346, in async_setup_platform
rac.initialize()
File “/config/custom_components/samsungrac/climate.py”, line 449, in initialize
j = self.get_device_json()
File “/config/custom_components/samsungrac/climate.py”, line 429, in get_device_json
resp = session.request(‘GET’, url=self.host + url, headers=self.extra_headers, verify=False, cert=self.cert, data=json.dumps({ ‘sebu’ : ‘zet’ }))
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, BadStatusLine(‘DPLUG-1.6\r\n’))

#34

@tillberg

homebridge for port 2878 is working grat here too, but will be best to get it directly in HA… @SebuZet is trying to help us with “AC port 2878” :slight_smile:

#35

@Modrica It won’t work because your unit is using XML instead of JSON. I’ve to finish rewriting my component and then we can try to do something with your unit.

1 Like
#36

@SebuZet, I tried you custom component last night with 2878 AC. After some minor refactoring of you v1.0.0 (I have ha 0.88) and setting the ciphers, I got the component loading and connecting to the AC however it doesn’t use HTTP as the protocol. It was throwing and error when it received DRC-1.00 instead of a HTTP response code. Looks to me the best way would to be extend you component and implement the socket method used in the node implementation mentioned above in python. Then choose which method to use based on the port. I’d be interested is helping though my time is limited

1 Like
#37

@Nick2, It would be great to make this component working with other AC. I’ve already ported it to new HA - latest version on repo. I need few days to finish refactoring source code and the it should be much easier to add support for new device. Just give me a little time because I’m new in python (and HA) - this is my first project.

1 Like
#38

@SebuZet any news ? :blush:

#39

@Modrica. I’ve finished refactoring and I thing that my component can be easily customized. Next, we have to figure out how to communicate with your unit. Tomorrow I’ll try to write few lines of code and I hope that someone, maybe you, will test this with his unit.

#40

@Modrica @Nick2 Can anyone try this python script if it is working or not? I don’t have such unit and cannot test by myself. Please modify parameters at the beginning to meet your device/settings.

https://drive.google.com/open?id=13bOyUmElZQr_7nuvYMSZfKqDIs2VSkAC