Climate_IP - ClimateDevice for IP based units (not only Samsung AC)

Hi SebuZet,
you component works very well, thanks.

I’m trying to enable also the switches in the UI (like “purify” or “auto_clean”) but I can’t see them.
I see only widget of type “modes” (like “special”, “fun”).
Into climate state I see them (ie: “auto_clean: off”) but not in the UI.

Any hint?
Thanks
tode

Successful configuration to work with the MIM-H02 gateway for older Samsung models. (port 2878) in my case:

climate:

  • platform: ‘climate_ip’
    config_file: ‘samsung_2878.yaml’
    ip_address: ‘192.168.0.103’
    token: ‘04167757-9775-m633-123373832354’
    cert: ‘’
    mac: ‘78:11:AD:12:55:3F’

I have a problem with the temperature unit, it marks me 72 celsius, when it really is 22 … there is something that doesn’t work well for my machine, but I don’t know if it is something of my air conditioner. I’m going to investigate it.

Thank you all!

@tode I’m not using HA anymore. I can try Instal it and check hot to do this but after weekend.

@vcnt this is not a bug. Your device is reporting this temp in Fahrenheit. I don’t use HA anymore so I cannot help you right know but please look for solution on this forum. It can be changed in yaml configuration file. Someone has similar issue so the solution is here - you just need to find it :wink:

This is a bad news… Who will maintain the package and the git repository?

Sure, I can wait. You are very kind,
tode

After updating to last version of HA (0.102), the climate_ip component is giving this error:

2019-11-21 19:32:14 ERROR (MainThread) [homeassistant.components.hassio] Platform error climate.climate_ip - cannot import name 'ATTR_HVAC_ACTIONS' from 'homeassistant.components.climate' (/usr/src/homeassistant/homeassistant/components/climate/__init__.py)

In addition, wherever the cause the units on different rooms lose the WiFi connection, the component start giving a lot of errors and the CPU is at 100%, impacting on the rest of services. I need to restart.

@Patrul I had the same issue. the below actions fixed my issue.

on /config/custom_componenets/climate_ip/climate.py file

  1. near line 25, remove “ATTR_HVAC_ACTIONS” and its preceding comma
  2. near line 251, commnet/delete the below 3 lines
    @property
    def hvac_action(self):
    return self.rac.get_property(ATTR_HVAC_ACTIONS)
  3. re-start HA
2 Likes

Thanks @cpuram !! It works

I have another question, sometimes the units have lost the connection and the log shows:

2019-11-22 08:53:52 ERROR (MainThread) [custom_components.climate_ip.climate] Traceback (most recent call last):
  File "/config/custom_components/climate_ip/samsung_2878.py", line 189, in send_socket_command
    sslSocket = self.socket
  File "/config/custom_components/climate_ip/samsung_2878.py", line 245, in socket
    self.create_connection()
  File "/config/custom_components/climate_ip/samsung_2878.py", line 234, in create_connection
    sslSocket.connect((cfg.host, cfg.port))
  File "/usr/local/lib/python3.7/ssl.py", line 1172, in connect
    self._real_connect(addr, False)
  File "/usr/local/lib/python3.7/ssl.py", line 1159, in _real_connect
    super().connect(addr)
OSError: [Errno 113] Host is unreachable

When this happens, the CPU is almost full dedicated to python process and blocks the rest. Is there any way to control and mitigate the impact on system performance? For examplo, ping unit and when 5 time no answer, deactivate climate_ip component?

@Patrul please share your config

if I have to guess, I would say WIFI issue. looks like the wifi signal is weak.

Hi

Will this work for a Samsung central AC? I have the Wifi MIM-H02 contoller (not the slightly newer mim-ho3)

Yes, you should use the 2878 config

thats awesome!!

Is there a guide anywhere for dummies

I think i got some of it worked out

  1. from a linux machine (ill run up a vm) use python and the scripts to get token

  2. download the files, upload them to hass, but here is where im lost, where do i put them and how do i get it exposed?

EDIT:

Im stuck.

Traceback (most recent call last):
  File "actest.py", line 4, in <module>
    resp = s.post("https://172.25.0.9:8888/devicetoken/request", data={"DeviceToken":"xxxxxxxxxxx"}, headers=headers, stream=True, verify=False, cert='cert.pem')
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 567, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='172.25.0.9', port=8888): Max retries exceeded with url: /devicetoken/request (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f14e235c470>: Failed to establish a new connection: [Errno 111] Connection refused',))

I doesn’t have much experience in this kind of thinks… but I got my token, installing home bridge, and after that, running this plugin. https://www.npmjs.com/package/homebridge-plugin-samsung-air-conditioner

about the files, I installed them in home/homeassistant/.homeassistant/custom_components/climate_ip

thanks heaps

do i need to install homebridge on a new vm say or can i install it on my hassio rpi

I done it in a new one… I didn’t know if it will works over hassio

Hi @SebuZet

Thanks for this great plugin, with the help of another member ive got it working, but some unexpected behaviour

  1. i could not get it to work with the validate ssl being true, setting to false it works now

  2. If i turn the AC on via HAS, i can see it comes on and is working, then within minutes, say 5 or so turns off, its like HAS then tells it to turn off

If i turn it on using my samsung panel, or the genuine samsung app it stays on, so i know the AC and connectivity is ok

Any reason why this might occur

Im using old 2878 generation on ducted air

Sorry for my late feedback

You were rigth, I changed location of antena and WiFi channel and the error disappeared.

I have another problem, when I install climate_ip with HACS it seems there is a background process that implements a loop with a responsiveness delay, I mean, if I switch on and switch off a light through HA I can do it in a very responsive way during 8-10 seconds and after that time it does not repond during 5 seconds. Any similar behaviour? How to fix/debug it?

I have 3 units with similar config:

platform: climate_ip
config_file: 'samsung_2878.yaml'
ip_address: '192.168.1.29'
token: 'XXXXX'
cert: ''
#cert: 'ac14k_m.pem' #set as '' to skip certificate verification
mac: 'XXXXX'
name: 'Salón AC'
debug: false
poll: disable_ip

I’m stuck ! help !

This is my configuration.yaml

Configure a default setup of Home Assistant (frontend, api, etc)

default_config:

Uncomment this if you are using SSL/TLS, running in Docker container, etc.

http:

base_url: example.duckdns.org:8123

Text to speech

#tts:

- platform: google_translate

climate:

  • platform: ‘climate_ip’
    config_file: ‘samsung_2878.yaml’
    ip_address: ‘192.168.25.91’
    token: ‘b7ded355-6d3a-4c4c-9ea6-38ca11e17’
    cert: ‘ac14k_m.pem’ #set as ‘’ to skip certificate verification
    name: ‘Sala ac’
    mac: ‘BC:8C:CD:D7:A5:63’

  • platform: ‘climate_ip’
    config_file: ‘samsung_2878.yaml’
    ip_address: ‘192.168.25.93’
    token: ‘fcf4096f-9b1d-401b-a587-7153aa89d’
    cert: ‘ac14k_m.pem’ #set as ‘’ to skip certificate verification
    name: ‘Escritorio ac’
    mac: ‘BC:8C:CD:D7:DA:95’

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


I’m keep getting the:
2019-12-16 01:10:43 ERROR (SyncWorker_9) [homeassistant.util.yaml.loader] while parsing a block mapping
in “/config/configuration.yaml”, line 3, column 1
expected , but found ‘-’
in “/config/configuration.yaml”, line 18, column 1
2019-12-16 01:10:43 ERROR (MainThread) [homeassistant.components.homeassistant] Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/configuration.yaml”, line 3, column 1
expected , but found ‘-’
in “/config/configuration.yaml”, line 18, column 1
2019-12-16 01:12:49 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] while parsing a block mapping
in “/config/configuration.yaml”, line 3, column 1
expected , but found ‘-’
in “/config/configuration.yaml”, line 12, column 1
2019-12-16 01:12:49 ERROR (MainThread) [homeassistant.components.homeassistant] Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/configuration.yaml”, line 3, column 1
expected , but found ‘-’
in “/config/configuration.yaml”, line 12, column 1

Don’t know what to do ! anyone know ?

Apparently I could put it to work at least I can see it working in the overview now:

default_config:

climate:

  • platform: ‘climate_ip’
    config_file: ‘samsung_2878.yaml’
    ip_address: ‘192.168.25.91’
    token: ‘b7ded355-6d3a-4c4c-9ea6-38’
    cert: ‘ac14k_m.pem’ #set as ‘’ to skip certificate verification
    name: ‘Sala ac’
    mac: ‘BC:8C:CD:D7:A5:63’

  • platform: ‘climate_ip’
    config_file: ‘samsung_2878.yaml’
    ip_address: ‘192.168.25.93’
    token: ‘fcf4096f-9b1d-401b-a587-7153a’
    cert: ‘ac14k_m.pem’ #set as ‘’ to skip certificate verification
    name: ‘Escritorio ac’
    mac: ‘BC:8C:CD:D7:DA:95’

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

I also had to work with the CPURAM post regarding:

near line 25, remove “ATTR_HVAC_ACTIONS” and its preceding comma
near line 251, commnet/delete the below 3 lines
@property
def hvac_action(self):
return self.rac.get_property(ATTR_HVAC_ACTIONS)
re-start HA

Looks better now.

Rui