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

No worries. I can get by with that. I might make a sensor with a D1 mini to give a more accurate reading if needed.
As for the status update is it supposed to update on a state change or does it poll at agiven interval?

For old devices it should poll every 15s. You can enable debugs and see if it is polling.
I’m working on few fixes but last few days I was really busy. I will try to finish my work within few days.

Ok I’ll look at that. But so far I’m happy to have it working especially with google home. So thankyou very much for this awesome project of yours. This is something i’ve been looking for for years.
Once again cheers !!

After some playing with component status update is not working. Will update only if I restart H.A. Can set temp and modes ok most of the time. I now have 2 aircons setup and both showing very different current temps when H.A restarts. Both are samsung using port 2878 one is split system other is ducted. Both are in the same room.

Great @SebuZet!
My “2878 type” unit is working.
I can set values but then the UI isn’t updating.
How can I check if HA is polling the unit?

I set
debug: True
but in the log in “Hass.io / System” I see nothing…

Thanks

I will update the component within few days. I hope it will work better.

It looks like one device is giving current temp in Celsius and another one in Fahrenheit.
You need to make a copy of samsung_2878.yaml file (e.g. samsung_2878F.yaml) and one file have to be setup to C (remove temp_unit entry) and another to F.
In configuration.yaml you have to point to correct file in config section for each device. It will work.
@tode I’ll prepare an update very soon.

@Jman Can you try latest version from dev branch?
If attributes list will be empty then try to remove/comment line #4 in samsung_2878.yaml file

@SebuZet I tried from ya dev branch but it does not show any status. Can still control the AC though. I also tried commenting out line #4 but no change.! Logs show socket time out.

I’ve now gone back to master.
log shows

@SebuZet how the thermostat low and high temperature targets should be used? I mean, when using the infrared remote control, there is only a single temperature target that is used when on cool / auto modes (my unit doesn’t have a heater). So I was wondering if the thermostat range is really used, and how to use that.

I believe it is device dependent. I noticed that those values can be controlled and put them into YAML file. You can remove sections target_temp_high and target_temp_low from YAML file and it will be removed from the component :wink:

@joelFORCE, @Jman Can anyone try latest version from dev branch? You can PM with results to make this thread cleaner.
If it will work please try also to remove/comment line #13 from YAML file.

Thanks

Thanks. I will try to modify this component including other parameters I would like to control. (e.g.: turn off the LED display, wind free mode, and beep feedback).

Modifications are very easy. All you need to do is to modify YAML file to meet your hardware spec.
Beep function is implemented for my device - change it and make it working with yours.

You can always shared your config after all so we can build a set of configuration files for different devices.

New version on repo. Fixed issues with status update on old units.

@SebuZet with your last repo i have this error:

2019-04-20 09:41:42 INFO (MainThread) [custom_components.climate_ip.climate] Connecting with 192.168.18.18:2878
2019-04-20 09:41:43 INFO (MainThread) [custom_components.climate_ip.climate] Response: DPLUG-1.6

2019-04-20 09:41:43 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>

2019-04-20 09:41:43 INFO (MainThread) [custom_components.climate_ip.climate] Sending auth command: <Request Type="AuthToken"><User Token="TOKEN" /></Request>

2019-04-20 09:41:43 INFO (MainThread) [custom_components.climate_ip.climate] Auth command sent
2019-04-20 09:41:45 WARNING (MainThread) [custom_components.climate_ip.climate] Socket timed out
2019-04-20 09:41:45 ERROR (MainThread) [custom_components.climate_ip.climate] Creating connecting failed!
2019-04-20 09:41:45 INFO (MainThread) [custom_components.climate_ip.climate] Sending command
2019-04-20 09:41:45 ERROR (MainThread) [custom_components.climate_ip.climate] Sending command failed
2019-04-20 09:41:45 ERROR (MainThread) [custom_components.climate_ip.climate] Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 180, in send_socket_command
    sslSocket.sendall(command.encode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'sendall'

@jackdalma Try new one but it looks like socket was not created in your case

i tried all rev.
latest working version is this one cb9c9cb

this is the full log from the last update:

2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] climate_ip: async setup platform
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Loading configuration file: /home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.yaml
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] ip_address: 192.168.18.18
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] token: TOKEN
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Validate properties: False (False)
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, host: 192.168.18.18:2878
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, token: TOKEN
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, duid: DUID
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, cert: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Executing params: {'duid': 'DUID', 'token': 'TOKEN', 'host': '192.168.18.18', 'connection_template': '<Request Type="AuthToken"><User Token="{{token}}" /></Request>', 'value': None}
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: <Request Type="DeviceState" DUID="DUID"></Request>

2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Connection invalid, creating!
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Creating ssl context
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Setting up ciphers
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify mode
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify location: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Setting up load cert chain: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Wrapping socket
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Socket wrapped: True
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Connecting with 192.168.18.18:2878
2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Response: DPLUG-1.6

2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>

2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Sending auth command: <Request Type="AuthToken"><User Token="TOKEN" /></Request>

2019-04-20 10:53:28 INFO (MainThread) [custom_components.climate_ip.climate] Auth command sent
2019-04-20 10:53:30 WARNING (MainThread) [custom_components.climate_ip.climate] Socket timed out
2019-04-20 10:53:30 ERROR (MainThread) [custom_components.climate_ip.climate] Creating connecting failed!
2019-04-20 10:53:30 INFO (MainThread) [custom_components.climate_ip.climate] Command empty, skipping sending
2019-04-20 10:53:30 INFO (MainThread) [custom_components.climate_ip.climate] Handling socket response
2019-04-20 10:53:30 ERROR (MainThread) [custom_components.climate_ip.climate] Sending command failed
2019-04-20 10:53:30 ERROR (MainThread) [custom_components.climate_ip.climate] Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 186, in send_socket_command
    self.handle_socket_response(sslSocket)
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 158, in handle_socket_response
    reply = self.read_line_from_socket(sslSocket)
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 116, in read_line_from_socket
    ready = select.select([sslSocket], [], [], self._socket_timeout)
TypeError: argument must be an int, or have a fileno() method.

Same problem here with master repo:

Traceback (most recent call last):
  File "/config/custom_components/climate_ip/samsung_2878.py", line 186, in send_socket_command
    self.handle_socket_response(sslSocket)
  File "/config/custom_components/climate_ip/samsung_2878.py", line 158, in handle_socket_response
    reply = self.read_line_from_socket(sslSocket)
  File "/config/custom_components/climate_ip/samsung_2878.py", line 116, in read_line_from_socket
    ready = select.select([sslSocket], [], [], self._socket_timeout)
TypeError: argument must be an int, or have a fileno() method.

@jackdalma: where did you find your logs?

@tode
home assistant’s log. you need to enable debug:

   - platform: climate_ip
     ...
     debug: true

@jackdalma Can you try latest version?

@SebuZet
new log:

2019-04-22 23:21:19 INFO (MainThread) [custom_components.climate_ip.climate] climate_ip: async setup platform
2019-04-22 23:21:19 INFO (MainThread) [custom_components.climate_ip.climate] Loading configuration file: /home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.yaml
2019-04-22 23:21:19 INFO (MainThread) [custom_components.climate_ip.climate] ip_address: 192.168.18.18
2019-04-22 23:21:19 INFO (MainThread) [custom_components.climate_ip.climate] token: TOKEN
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Validate properties: False (False)
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, host: 192.168.18.18:2878
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, token: TOKEN
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, duid: DUID
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Configuration, cert: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Executing params: {'connection_template': '<Request Type="AuthToken"><User Token="{{token}}" /></Request>', 'duid': 'DUID', 'value': None, 'host': '192.168.18.18', 'token': 'TOKEN'}
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: <Request Type="DeviceState" DUID="DUID"></Request>

2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Connection invalid, creating!
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Creating ssl context
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Setting up ciphers
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify mode
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify location: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Setting up load cert chain: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Wrapping socket
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Socket wrapped: True
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Connecting with 192.168.18.18:2878
2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Response: DPLUG-1.6

2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>

2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Sending auth command: <Request Type="AuthToken"><User Token="TOKEN" /></Request>

2019-04-22 23:21:20 INFO (MainThread) [custom_components.climate_ip.climate] Auth command sent
2019-04-22 23:21:22 WARNING (MainThread) [custom_components.climate_ip.climate] Socket timed out
2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Sending command
2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Handling socket response
2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Response Type="AuthToken" Status="Okay" StartFrom="2019-04-22/21:21:22"/>

2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Connection authenticated
2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Requesting status with command: <Request Type="DeviceState" DUID="DUID"></Request>
2019-04-22 23:21:22 INFO (MainThread) [custom_components.climate_ip.climate] Status request sent
2019-04-22 23:21:24 WARNING (MainThread) [custom_components.climate_ip.climate] Socket timed out
2019-04-22 23:21:24 INFO (MainThread) [custom_components.climate_ip.climate] Handling finished
2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Executing params: {'token': 'TOKEN', 'connection_template': '<Request Type="AuthToken"><User Token="{{token}}" /></Request>', 'duid': 'DUID', 'host': '192.168.18.18', 'value': None}
2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: <Request Type="DeviceState" DUID="DUID"></Request>

2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Sending command
2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Handling socket response
2019-04-22 23:21:26 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Response Type="DeviceState" Status="Okay"><DeviceState><Device DUID="DUID" GroupID="AC" ModelID="AC" ><Attr ID="AC_FUN_ENABLE" Type="RW" Value="Enable"/><Attr ID="AC_FUN_POWER" Type="RW" Value="Off"/><Attr ID="AC_FUN_OPMODE" Type="RW" Value="Auto"/><Attr ID="AC_FUN_TEMPSET" Type="RW" Value="26"/><Attr ID="AC_FUN_COMODE" Type="RW" Value="Off"/><Attr ID="AC_FUN_ERROR" Type="RW" Value="NULL"/><Attr ID="AC_FUN_TEMPNOW" Type="R" Value="21"/><Attr ID="AC_FUN_SLEEP" Type="RW" Value="0"/><Attr ID="AC_FUN_WINDLEVEL" Type="RW" Value="Auto"/><Attr ID="AC_FUN_DIRECTION" Type="RW" Value="Fixed"/><Attr ID="AC_ADD_AUTOCLEAN" Type="RW" Value="Off"/><Attr ID="AC_ADD_SETKWH" Type="RW" Value="255"/><Attr ID="AC_ADD_CLEAR_FILTER_ALARM" Type="RW" Value="0"/><Attr ID="AC_ADD_APMODE_END" Type="W" Value="0"/><Attr ID="AC_ADD_STARTWPS" Type="RW" Value="Default"/><Attr ID="AC_ADD_SPI" Type="RW" Value="Off"/><Attr ID="AC_OUTDOOR_TEMP" Type="R" Value="70"/><Attr ID="AC_COOL_CAPABILITY" Type="R" Value="35"/><Attr ID="AC_WARM_CAPABILITY" Type="R" Value="40"/><Attr ID="AC_SG_WIFI" Type="W" Value="Connected"/><Attr ID="AC_SG_INTERNET" Type="W" Value="Connected"/><Attr ID="AC_ADD2_USEDWATT" Type="R" Value="65024"/><Attr ID="AC_ADD2_VERSION" Type="RW" Value="65024"/><Attr ID="AC_SG_MACHIGH" Type="W" Value="183"/><Attr ID="AC_SG_MACMID" Type="W" Value="161"/><Attr ID="AC_SG_MACLOW" Type="W" Value="253"/><Attr ID="AC_SG_VENDER01" Type="W" Value="188"/><Attr ID="AC_SG_VENDER02" Type="W" Value="140"/><Attr ID="AC_SG_VENDER03" Type="W" Value="205"/><Attr ID="AC_ADD2_PANEL_VERSION" Type="R" Value="140315"/><Attr ID="AC_ADD2_OUT_VERSION" Type="R" Value="1246985"/><Attr ID="AC_FUN_MODEL" Type="R" Value="6"/><Attr ID="AC_ADD2_OPTIONCODE" Type="R" Value="54458"/><Attr ID="AC_ADD2_USEDPOWER" Type="R" Value="2060"/><Attr ID="AC_ADD2_USEDTIME" Type="R" Value="2440"/><Attr ID="AC_ADD2_CLEAR_POWERTIME" Type="RW" Value="254"/><Attr ID="AC_ADD2_FILTERTIME" Type="RW" Value="500"/><Attr ID="AC_ADD2_FILTER_USE_TIME" Type="R" Value="2440"/></Device></DeviceState></Response>

2019-04-22 23:21:26 ERROR (MainThread) [custom_components.climate_ip.climate] Sending command failed
2019-04-22 23:21:26 ERROR (MainThread) [custom_components.climate_ip.climate] Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 188, in send_socket_command
    self.handle_socket_response(sslSocket)
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 168, in handle_socket_response
    self.handle_response_device_state(sslSocket, reply)
  File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 155, in handle_response_device_state
    device_status[f[1]] = f[2]
TypeError: '_sre.SRE_Match' object is not subscriptable