I’m using reverse proxy on Synology NAS and everything is working well. You can look into this thread:
Yes, indeed. Since v0.89 components are moved to different folders. Including custom components. Compatibility was broken. To make it working with old HASS you probably have to do as follow:
download all files from GitHub and place them in folder custom_components/climate/
rename file climate.py to climate_ip.py
copy everything from file __init __.py to file climate_ip.py (you can paste everything at the beginning of the file)
Thanks for sharing the info about reverse proxy. Actually I’m able to make 0.90 work under reverse proxy (like NGINX), but I have to disable basic auth in this condition, otherwise I get some 401 errors (specially on config tab).
I’ve tried to make the changes on the custom component you said, but then it fails in other way:
2019-04-01 11:26:52 ERROR (MainThread) [homeassistant.setup] Error during setup of component climate
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 146, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
AttributeError: module ‘custom_components.climate’ has no attribute ‘setup’
Anyway, thanks for your support. I will try to find a solution to move to 0.90 and test (keeping basic auth) your component.
Hi @SebuZet. I enabled the line as you requested. I can see full device state data in the response now. Still no attributes seem to be populated. See log below
The spelling error is on line 228 of samsung_2878.py. @propertry which should be @property
INFO (Thread-13) [custom_components.climate_ip.climate] Setting up verify location: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-01 12:58:18 INFO (Thread-13) [custom_components.climate_ip.climate] Setting up load cert chain: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-01 12:58:18 INFO (Thread-13) [custom_components.climate_ip.climate] Wrapping socket
2019-04-01 12:58:18 INFO (Thread-13) [custom_components.climate_ip.climate] Socket wrapped: True
2019-04-01 12:58:18 INFO (Thread-13) [custom_components.climate_ip.climate] Connecting with 192.168.1.38:2878
2019-04-01 12:58:19 INFO (Thread-13) [custom_components.climate_ip.climate] Response: DPLUG-1.6
2019-04-01 12:58:19 INFO (Thread-13) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>
2019-04-01 12:58:19 INFO (Thread-13) [custom_components.climate_ip.climate] Sending auth command: <Request Type="AuthToken"><User Token="f11d34c9a-fdd5-1112-8811-1c341111f9dc" /></Request>
2019-04-01 12:58:19 INFO (Thread-13) [custom_components.climate_ip.climate] Auth command sent
2019-04-01 12:58:21 INFO (Thread-13) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Response Type="AuthToken" Status="Okay" StartFrom="1970-01-04/18:12:21"/>
2019-04-01 12:58:21 INFO (Thread-13) [custom_components.climate_ip.climate] Connection authenticated
2019-04-01 12:58:21 INFO (Thread-13) [custom_components.climate_ip.climate] Requesting status with command: <Request Type="DeviceState" DUID="1411E055EA11"></Request>
2019-04-01 12:58:21 INFO (Thread-13) [custom_components.climate_ip.climate] Status request sent
2019-04-01 12:58:33 WARNING (Thread-13) [custom_components.climate_ip.climate] Socket timed out
2019-04-01 12:58:33 INFO (Thread-13) [custom_components.climate_ip.climate] Connection created!
2019-04-01 12:58:33 INFO (Thread-13) [custom_components.climate_ip.climate] Sending command
2019-04-01 12:58:33 INFO (Thread-13) [custom_components.climate_ip.climate] Handling response
2019-04-01 12:58:35 INFO (Thread-13) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Response Type="DeviceState" Status="Okay"><DeviceState><Device DUID="1411E055EA11" GroupID="AC" ModelID="AC" ><Attr ID="AC_FUN_ENABLE" Type="RW" Value="Enable"/><Attr ID="AC_FUN_POWER" Type="RW" Value="On"/><Attr ID="AC_FUN_OPMODE" Type="RW" Value="Heat"/><Attr ID="AC_FUN_TEMPSET" Type="RW" Value="22"/><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="22"/><Attr ID="AC_FUN_SLEEP" Type="RW" Value="0"/><Attr ID="AC_FUN_WINDLEVEL" Type="RW" Value="Low"/><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="69"/><Attr ID="AC_COOL_CAPABILITY" Type="R" Value="70"/><Attr ID="AC_WARM_CAPABILITY" Type="R" Value="80"/><Attr ID="AC_SG_WIFI" Type="W" Value="Connected"/><Attr ID="AC_SG_INTERNET" Type="W" Value="Disconnected"/><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="85"/><Attr ID="AC_SG_MACMID" Type="W" Value="234"/><Attr ID="AC_SG_MACLOW" Type="W" Value="100"/><Attr ID="AC_SG_VENDER01" Type="W" Value="20"/><Attr ID="AC_SG_VENDER02" Type="W" Value="73"/><Attr ID="AC_SG_VENDER03" Type="W" Value="224"/><Attr ID="AC_ADD2_PANEL_VERSION" Type="R" Value="130814"/><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="63162"/><Attr ID="AC_ADD2_USEDPOWER" Type="R" Value="28181"/><Attr ID="AC_ADD2_USEDTIME" Type="R" Value="24380"/><Attr ID="AC_ADD2_CLEAR_POWERTIME" Type="RW" Value="254"/
2019-04-01 12:58:35 ERROR (Thread-13) [custom_components.climate_ip.climate] Sending command failed
File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 182, in send_socket_command
File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 167, in handle_socket_response
File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 154, in handle_response_device_state
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: None
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Connection invalid, creating!
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Creating ssl context
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Setting up ciphers
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify mode
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Setting up verify location: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Setting up load cert chain: /home/homeassistant/.homeassistant/custom_components/climate_ip/ac14k_m.pem
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Wrapping socket
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Socket wrapped: True
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Connecting with 192.168.1.38:2878
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Response: DPLUG-1.6
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Update Type="InvalidateAccount"/>
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Sending auth command: <Request Type="AuthToken"><User Token="f11d34c9a-fdd5-1112-8811-1c341111f9dc" /></Request>
2019-04-01 12:58:36 INFO (MainThread) [custom_components.climate_ip.climate] Auth command sent
2019-04-01 12:58:38 INFO (MainThread) [custom_components.climate_ip.climate] Response: <?xml version="1.0" encoding="utf-8" ?><Response Type="AuthToken" Status="Okay" StartFrom="1970-01-04/18:12:39"/>
2019-04-01 12:58:38 INFO (MainThread) [custom_components.climate_ip.climate] Connection authenticated
2019-04-01 12:58:38 INFO (MainThread) [custom_components.climate_ip.climate] Requesting status with command: <Request Type="DeviceState" DUID="1411E055EA11"></Request>
2019-04-01 12:58:38 INFO (MainThread) [custom_components.climate_ip.climate] Status request sent
2019-04-01 12:58:50 WARNING (MainThread) [custom_components.climate_ip.climate] Socket timed out
INFO (MainThread) [custom_components.climate_ip.climate] Connection created!
INFO (MainThread) [custom_components.climate_ip.climate] Command empty, skipping sending
2019-04-01 12:58:52 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: None
2019-04-01 12:58:52 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-01 12:58:52 INFO (MainThread) [custom_components.climate_ip.climate] Command empty, skipping sending
2019-04-01 12:58:54 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: None
2019-04-01 12:58:54 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-01 12:58:54 INFO (MainThread) [custom_components.climate_ip.climate] Command empty, skipping sending
2019-04-01 12:58:57 INFO (MainThread) [custom_components.climate_ip.climate] Executing command: None
2019-04-01 12:58:57 INFO (MainThread) [custom_components.climate_ip.climate] Getting socket connection
2019-04-01 12:58:57 INFO (MainThread) [custom_components.climate_ip.climate] Command empty, skipping sending
Additional feedback: I can turn on/off my air conditioning with google assistant (hass cloud). but it does not have voice feedback. I mean, when I say “turn on the ar conditioning” it turns on, but the voice feedback is “sorry, there was no response from ar conditioning”
It looks like your device is reporting current temperature in Fahrenheit instead of Celsius.
Try to edit file samsung_2878.yaml in section temperature
Add new line after line #87 (should looks like this: status_template: ‘{% for a in device_state.Response.children.0.DeviceState.Device.children %}{% if a.Attr.attributes.ID == “AC_FUN_TEMPSET” %}{{a.Attr.attributes.Value}}{% endif %}{% endfor %}’)
with content: unit_template : “F”
Just make sure that number of spaces (not tabs) at the beginning of the line is same as in lines before and after new one. Additionally make sure that letter F is between characters " - sometime editors are changing this character.
Component will convert temp from Fahrenheit to Celsius.
still showing fahrenheit. I,ve also noticed that H.A not updating status of aircon. Gives correct status on restart but any state changes after ,status not change.
Can you add line
debug: True
In configuration.yaml and restart HA
Then in dev-state panel, your AC device will have attribute called device_state
Can you show what is in it?
Look good. thanks. Can you try to modify type property from number to temperature in current_temperature section?
And don’t forget to disable debug mode.
Your device is reporting current temp in AC_FUN_TEMPNOW attribute. in your debugs it was 83 (in F) so it is about 28 in C. Maybe your device is displaying desired temperature (this is how my AC unit works). maybe it can be changed somehow. I don’t know