SebuZet / samsungrac

Home Assistant Climate Device for controlling (not only) Samsung AC
64 stars 31 forks source link

HA 0.96 #6

Closed GGalloppa closed 5 years ago

GGalloppa commented 5 years ago

From version 0.96 the custom component no longer works. many parameters have changed, is the component updated?

Thank you

atxbyea commented 5 years ago

The OPERATION_MODE has changed to HVAC_MODE I think, and a lot of other stuff, I get this error in the logs atleast :

https://hastebin.com/kiritotoso.sql https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup.html

ildena commented 5 years ago

From version 0.96 the custom component no longer works. many parameters have changed, is the component updated?

Thank you

Same here

foughtgeoduck commented 5 years ago

same here

andrea-be commented 5 years ago

same here

Cybersmurfen commented 5 years ago

It is because the breaking changes in HA 0.96 as someone stated above. The component has to be updated - if this is a vital part in your HA-setup, I would advice you to downgrade to 0.95.4

ildena commented 5 years ago

It is because the breaking changes in HA 0.96 as someone stated above. The component has to be updated - if this is a vital part in your HA-setup, I would advice you to downgrade to 0.95.4

Yes, crystal clear... I think the reason why of this requst is to know if there's or not an update in the to do list :-)

foughtgeoduck commented 5 years ago

more to the point the author hasnt been active for 4 months @SebuZet

SebuZet commented 5 years ago

Some changes already available on repo. Devices using port 8888 should work but I will confirm this when I will be back at home. Old devices probably won't work for know but I will resolve this problem after confirming new devices.

ildena commented 5 years ago

Yes...! Thank you... I have the old one but no rush, and if you need a hand... I don't know how but ask 😅

pratesbh commented 5 years ago

Some changes already available on repo. Devices using port 8888 should work but I will confirm this when I will be back at home. Old devices probably won't work for know but I will resolve this problem after confirming new devices.

This version on repo works for me. I've noted that friendly_name can't be added anymore in the config.

GGalloppa commented 5 years ago

Some changes already available on repo. Devices using port 8888 should work but I will confirm this when I will be back at home. Old devices probably won't work for know but I will resolve this problem after confirming new devices.

This version on repo works for me. I've noted that friendly_name can't be added anymore in the config.

Same for me....

ildena commented 5 years ago

@SebuZet ... I did not understand... Is the 2878 version working or not? Sorry to bore you, I just saw you updated the files on the repo.

Cybersmurfen commented 5 years ago

The component works good for samsungrac models, but there is some issues when connecting to Google Assistant.

Also, the Eco mode showed up in GA?

I can set the units temperature and start the unit in any mode (not Eco), but when I try to change the mode or turn it off, nothing happens and GA tells me "there was something wrong with the unit". Also, I tried the command climate.turn_off and climate.turn_on and it complains about ATTR_POWER

Cybersmurfen commented 5 years ago

Well, i fixed it, it was quite easy to find out that it wasn't returning the correct power state.

Altough not in the repository, but here are the changes.

samsungrac.yaml:

24 change to:

status_template: "{% if device_state.Devices.0.Operation.power == 'Off' -%}{{ device_state.Devices.0.Operation.power }}{%- else -%}{{ device_state.Devices.0.Mode.modes.0 }}{%- endif %}"

35 change 'eco' to 'quiet' (Apparently Google Assistant lists Eco as a mode, not preset)

climate.py:

49 change to:

from .controller import (ATTR_POWER, ClimateController, create_controller)

SebuZet commented 5 years ago

Well, i fixed it, it was quite easy to find out that it wasn't returning the correct power state.

This is power of YAML configuration ;-)

I'll look at this when I will be at home. Today I will put new version. New devices will work. Old devices should work but I don't have possibility to check.

SebuZet commented 5 years ago

I did not understand... Is the 2878 version working or not? Sorry to bore you, I just saw you updated the files on the repo.

Not yet. I believe it is very close to be finished.

SebuZet commented 5 years ago

climate.py:

49 change to:

from .controller import (ATTR_POWER, ClimateController, create_controller)

Good point. I've missed that. I'll fix this today.

NephilimDM commented 5 years ago

I updated to the latest version of the repository (commit 61e9fd9) and the latest stable version of HA (0.97.2), I kept the configuration of the previous component to HA 0.96 (modifying friedly_name in name) but the component does not work, I have the following error (I'm using Hassbian):

2019-08-15 09:18:43 ERROR (MainThread) [custom_components.climate_ip.climate] climate_ip: error while creating controller! 2019-08-15 09:18:43 ERROR (MainThread) [custom_components.climate_ip.climate] climate_ip: error while creating controller! 2019-08-15 09:18:49 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform climate_ip Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/home/homeassistant/.homeassistant/custom_components/climate_ip/climate.py", line 97, in async_setup_platform device_controller = create_controller(config.get(CONF_CONTROLLER), config, _LOGGER) File "/home/homeassistant/.homeassistant/custom_components/climate_ip/controller.py", line 68, in create_controller if c.initialize(): File "/home/homeassistant/.homeassistant/custom_components/climate_ip/controller_yaml.py", line 128, in initialize connection = create_connection(connection_node, self._config, self._logger) File "/home/homeassistant/.homeassistant/custom_components/climate_ip/connection.py", line 43, in create_connection if c.load_from_yaml(node, None): File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 92, in load_from_yaml if CONFIG_DEVICE_CONNECTION in node: NameError: name 'CONFIG_DEVICE_CONNECTION' is not defined 2019-08-15 09:18:49 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform climate_ip Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/home/homeassistant/.homeassistant/custom_components/climate_ip/climate.py", line 97, in async_setup_platform device_controller = create_controller(config.get(CONF_CONTROLLER), config, _LOGGER) File "/home/homeassistant/.homeassistant/custom_components/climate_ip/controller.py", line 68, in create_controller if c.initialize(): File "/home/homeassistant/.homeassistant/custom_components/climate_ip/controller_yaml.py", line 128, in initialize connection = create_connection(connection_node, self._config, self._logger) File "/home/homeassistant/.homeassistant/custom_components/climate_ip/connection.py", line 43, in create_connection if c.load_from_yaml(node, None): File "/home/homeassistant/.homeassistant/custom_components/climate_ip/samsung_2878.py", line 92, in load_from_yaml if CONFIG_DEVICE_CONNECTION in node: NameError: name 'CONFIG_DEVICE_CONNECTION' is not defined

My config: `climate:

What did I do wrong?

Thank you.

mttstt commented 5 years ago

Same problem here with 2878 port.

2019-08-18 16:59:12 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform climate_ip Traceback (most recent call last): File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/climate_ip/climate.py", line 97, in async_setup_platform device_controller = create_controller(config.get(CONF_CONTROLLER), config, _LOGGER) File "/config/custom_components/climate_ip/controller.py", line 68, in create_controller if c.initialize(): File "/config/custom_components/climate_ip/controller_yaml.py", line 128, in initialize connection = create_connection(connection_node, self._config, self._logger) File "/config/custom_components/climate_ip/connection.py", line 43, in create_connection if c.load_from_yaml(node, None): File "/config/custom_components/climate_ip/samsung_2878.py", line 92, in load_from_yaml if CONFIG_DEVICE_CONNECTION in node: NameError: name 'CONFIG_DEVICE_CONNECTION' is not defined

My config: `climate:

climate:

atxbyea commented 5 years ago

I can confirm my 2878 works perfectly after the last updates :smile:

mttstt commented 5 years ago

I'm using 0.97.2 version of HA.

@atxbyea: can you share your climate config yaml ?

Thanks

atxbyea commented 5 years ago

I'm using 0.97.2 version of HA.

@atxbyea: can you share your climate config yaml ?

Thanks

https://github.com/atxbyea/HA-Config/blob/fbf4c85270373fb0ce43d103864a821f1812a57c/configuration.yaml#L563

https://github.com/atxbyea/HA-Config/tree/master/custom_components/climate_ip

foughtgeoduck commented 5 years ago

in the samsung_2878.py

on line 3 changed to ... CONFIG_DEVICE_CONECTION_TEMPLATE,CONFIG_DEVICE_CONNECTION,CONFIG_DEVICE_CONDITION_TEMPLATE, CONF_CERT,

i added in CONFIG_DEVICE_CONNECTION, and CONFIG_DEVICE_CONDITION_TEMPLATE

comes up now in HASS though i cant see an ON button is that correct?

SebuZet commented 5 years ago

Ok, I've updated files for old devices:

SebuZet commented 5 years ago

I believe that everything should work if device is powered on. If you confirm that it is working please edit samsung_2878.yaml file and comment out line #25 and uncomment line #26. I need to know if old device can handle two request at once. Thanks in advance

foughtgeoduck commented 5 years ago

Hi ive tested the new Files, i hear a beep from the unit but it doesn't do anything the shutter doesn't open I've tried adjusting temps, fan only mode etc , doesn't seem to start

also in the hass debug i get a lot of these 2019-08-19 23:21:13 WARNING (MainThread) [custom_components.climate_ip.climate] Execute condition not found, executing

and in the samsung_2878.py file there is a spelling error on line 3 aswell CONFIG_DEVICE_CONECTION_TEMPLATE should be 2 'N's - but I've seen this in other files aswell such as yaml_const.yaml

Thanks

foughtgeoduck commented 5 years ago

update, yes it appears to work only after manually switching the unit on, then all control seem to be working,

unit can turn off via HASS but not on

it also seems it can handle 2 requests at once ( but only quickly tested)

SebuZet commented 5 years ago

Thank you @foughtgeoduck. I'll correct spelling errror after all ;-) The question is if everything is working correctly after uncommenting line #26. If device can handle two requests at once then it should work even if device is off. One request is to power on and second one for operation mode. Please let me know.

SebuZet commented 5 years ago

Can anyone check if last version is working correctly?

skky88 commented 5 years ago

Can anyone check if last version is working correctly?

HI SebuZet, I have just install your last code, I use HASS on version 0.97.2 (latest one) on HASSIO platform. I can confirm that my two Samsung AC that work on port 2878 now work perfectly. They can be turn on/off direct from HA without problem. I have also update all my automation / script in order to keep my input_boolean for start the various special mode (just now I use the new service preset_mode).

Thank you for your update and for your work,