Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing services for power switch #489

Closed
TazUk opened this issue Feb 9, 2023 · 88 comments
Closed

Error executing services for power switch #489

TazUk opened this issue Feb 9, 2023 · 88 comments
Labels

Comments

@TazUk
Copy link

TazUk commented Feb 9, 2023

Describe the bug
The power switch no longer functions - the service call fails and the error detailed below is logged.
This issue starting occurring a few releases ago, although the switch did use to work.

Expected behavior
Switching power off turns off the washer dryer.

Screenshots
N/A

Environment details:

  • Ubuntu Server 22.04LTS
  • HomeAssistant Container in docker, v2023.1.7
  • Component version installed: v0.30.0
  • Uncertain - same issue encountered with v0.29.4
  • FWV796STS.ASSQPUK washer dryer:
  • Washer dryer only.

Output of HA logs
Paste the relavant output of the HA log here.

This error originated from a custom integration.

Logger: homeassistant.core
Source: custom_components/smartthinq_sensors/wideq/core_async.py:318
Integration: SmartThinQ LGE Sensors (documentation, issues)
First occurred: 19:47:23 (1 occurrences)
Last logged: 19:47:23

Error executing service: <ServiceCall switch.turn_off (c:01GRVVFDNWSFCTX121PZ1GXR90): entity_id=['switch.washer_dryer_power']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1773, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/config/custom_components/smartthinq_sensors/switch.py", line 263, in async_turn_off
    await self.entity_description.turn_off_fn(self._wrap_device)
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 238, in power_off
    await self.set(keys[0], keys[1], value=keys[2])
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 273, in set
    await super().set(
  File "/config/custom_components/smartthinq_sensors/wideq/device.py", line 531, in set
    await self._set_control(full_key, ctrl_path=ctrl_path)
  File "/config/custom_components/smartthinq_sensors/wideq/device.py", line 503, in _set_control
    await self._client.session.device_v2_controls(
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1181, in device_v2_controls
    res = await self.post2(cmd_path, payload)
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1018, in post2
    return await self._auth.gateway.core.lgedm2_post(
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 318, in lgedm2_post
    async with self._get_session().post(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 559, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 893, in start
    with self._timer:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

Additional context
Add any other context about the problem here.
Diagnostics attached
smartthinq_sensors_diagnostics-json.txt

@ollo69
Copy link
Owner

ollo69 commented Feb 11, 2023

This is a timeout, the device is not responding to the call within timeout, there is nothing I can do.

@TazUk
Copy link
Author

TazUk commented Feb 11, 2023

That's disappointing as it used to work, but thanks for checking.

@TazUk TazUk closed this as completed Feb 11, 2023
@ollo69
Copy link
Owner

ollo69 commented Feb 11, 2023

You close this issue faster than expected :)
My first question is: are you able to use the switch from LG app?
I reopen this, let's try to better understand why was working some version ago

@ollo69 ollo69 reopened this Feb 11, 2023
@TazUk
Copy link
Author

TazUk commented Feb 11, 2023

I don't keep the LG app installed (only reinstalling for changing passwords / accepting Terms and Conditions changes), however the stop button does work from Google Home (linked via the LG integration).

When the power switch used to work it was instant.

Probably also worth noting that the appliance is on a static IP address on my internal network.

@ollo69
Copy link
Owner

ollo69 commented Feb 11, 2023

stop button does work from Google Home (linked via the LG integration).

You mean via this integration?

@TazUk
Copy link
Author

TazUk commented Feb 11, 2023

No.
In addition to the HA integration I have the washer dryer linked separately to Google Home via the LG service.
This is separate completely to the integration, but shows that I can power off the washer dryer remotely.

@ollo69
Copy link
Owner

ollo69 commented Feb 11, 2023

I just wonder if there are some relation with this service. This is more true for ThinQ1 device that do not allow to send command from 2 points at the same time (eg if you open LG application, command from integration fails). Was this connection always enabled or is something that you configure recently? Can you temporary disable and check if something changes?

@TazUk
Copy link
Author

TazUk commented Feb 11, 2023

I've always had it disabled and had it enabled before first using the integration in HA.

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

Started getting these timeouts as well after upgrading from v0.29.4 to v0.30.0 and still have them on v0.31.3

(The LG app is allowing me to turn it off without any issues)

I have a F_V7_Y___W.B_2QEUK-FL washer, running clip_hna_v1.9.183

@ollo69
Copy link
Owner

ollo69 commented Feb 17, 2023

I don't really think that this have something to do with last versions, probably something is changed at LG side. It is hard to find solution because I don't have this issue at all.

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

Can't really downgrade to check

image

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

Also getting this when I try to wake the washer up

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 795, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
    await result
  File "/config/custom_components/smartthinq_sensors/sensor.py", line 696, in async_wake_up
    await self._api.device.wake_up()
  File "/config/custom_components/smartthinq_sensors/wideq/devices/washerDryer.py", line 247, in wake_up
    raise InvalidDeviceStatus()
custom_components.smartthinq_sensors.wideq.core_exceptions.InvalidDeviceStatus

@ollo69
Copy link
Owner

ollo69 commented Feb 17, 2023

Can't really downgrade to check

You can increase number of release shown in HACS options:

image

Also getting this when I try to wake the washer up

This just means that you cannot wake-up your washer in current status. This is not a timeout or what else, just a user exception raised for specific condition.

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

You can increase number of release shown in HACS options:

Oh forgot about that, going to check if it’s working on the older version.

This just means that you cannot wake-up your washer in current status. This is not a timeout or what else, just a user exception raised for specific condition.

All I’m saying is that it was working last time I tried it. Washer was in the exact same state.

@ollo69
Copy link
Owner

ollo69 commented Feb 17, 2023

All I’m saying is that it was working last time I tried it. Washer was in the exact same state.

Make sense, I changed some controls when I introduce the remote start button and probably are wrong for your device. Please share both diagnostics and detail of the status that you expect wake-up to work.

Wait also your feed-back using previous release.

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

Yea, it started waking it up & powering it off again once I downgraded to v0.29.4.
No random timeouts

@ShonP40
Copy link

ShonP40 commented Feb 17, 2023

Well, it just started timing out again when trying to power the washer off hm.

@ollo69 ollo69 changed the title Washer Dryer FWV796STS.ASSQPUK - Error executing service for power switch Error executing services for power switch Feb 18, 2023
@ollo69
Copy link
Owner

ollo69 commented Feb 18, 2023

Well, it just started timing out again when trying to power the washer off hm.

What about wake-up?

@ShonP40
Copy link

ShonP40 commented Feb 18, 2023

Waking up works fine, only powering it off times out 90% of the time

@ollo69
Copy link
Owner

ollo69 commented Feb 18, 2023

Waking up works fine, only powering it off times out 90% of the time

But it works also with last release. I understand from your previous post that you get the error InvalidDeviceStatus

@ShonP40
Copy link

ShonP40 commented Feb 18, 2023

Couldn’t get it to work on the latest release, kept getting that error.

@ollo69
Copy link
Owner

ollo69 commented Feb 18, 2023

Clear, can you please provide details about device status when you call the service and attach device diagnostics?

@ShonP40
Copy link

ShonP40 commented Feb 18, 2023

On the latest version of the old version that works when waking up?

@ollo69
Copy link
Owner

ollo69 commented Feb 18, 2023

It's the same. What I need to understand is the condition for your device when is valid to call wake-up command and the information exposed (for this I need diagnostic)

@ShonP40
Copy link

ShonP40 commented Feb 18, 2023

Alright, I’ll do it when I get back home later today

@TazUk
Copy link
Author

TazUk commented Aug 22, 2023

Just stopping by to confirm that I can now turn a FWV796STS.ASSQPUK washer dryer off with the switch after installing the 0.33.1 release

@ollo69
Copy link
Owner

ollo69 commented Aug 22, 2023

@TazUk,

Thanks for the feedback.
What's about turn-on? Do you have the same side effect reported by @w-marco?

@TazUk
Copy link
Author

TazUk commented Aug 22, 2023

@TazUk,

Thanks for the feedback. What's about turn-on? Do you have the same side effect reported by @w-marco?

Yes I'm afraid so:
Became unavailable triggered by service Switch: Turn off
switch then returns as 'off' 30 seconds later

@ollo69
Copy link
Owner

ollo69 commented Aug 22, 2023

switch then returns as 'off' 30 seconds later

@TazUk,

not about that, but about:

when turning ON the dryer from HomeAssistant it turns on, but won't let me choose any program until i manually turn it off and on again.

Thx.

@TazUk
Copy link
Author

TazUk commented Aug 22, 2023

My bad - I don't turn on remotely (although I have remote start enabled) as I've never investigated setting the programme remotely).
Not really sure what I'm testing here?

Is the issue that after turning it on from HA you cannot select a programme on the appliance (using the appliance controls)?
A quick test (turning it on via the switch via Dev Tools) suggest that this model isn't affected - it uses a dial to select.

Or is the issue that after turning it on from HA you cannot select a programme through HA?
If so I've never looked into selecting a programme via HA (and am not sure how possible it is).

@ollo69
Copy link
Owner

ollo69 commented Aug 22, 2023

Is the issue that after turning it on from HA you cannot select a programme on the appliance (using the appliance controls)?

As I understand this is the issue reported, also because select a program via HA integration is not possible.
If you don't have the problem, can you share integration diagnostic generated when your device is turned off?

Thx again.

@TazUk
Copy link
Author

TazUk commented Aug 22, 2023

diagnostics_json.txt
Generated with device off

@ollo69
Copy link
Owner

ollo69 commented Aug 23, 2023

Main difference between @w-marco and @TazUk devices is that the first is a dryer and the second is a washer, but maybe exist dryer that can be turned on. Looking at the model info I don't find any significant information that can be used to determinate this.

@dinde
Copy link

dinde commented Aug 23, 2023 via email

@ollo69
Copy link
Owner

ollo69 commented Aug 23, 2023

Hi @dinde ,

thanks for your feed-back. The point here is understand if make sense allow to turn on device from integration. If you read a couple of post before, it seems that @w-marco is able to turn on the device from integration, but than the device is basically unresponsive, he is only able to turn it off. Trying to understand if there is a logic in this behavior and eventually totally disable the turn-on function from the integration.

@dinde
Copy link

dinde commented Aug 23, 2023

Thanks for informations.
From my understanding and with my device, there is no remote turn on because of security policies from LG.
But if device is turned on, it can wait for remote start as long as you physicaly turned remote start mode on from the machine itself. Then just use LG either your integration to start it.
Hope it helps.

@4homeassistant
Copy link
Contributor

Same behaviour as @w-marco described on our LG LSWD100E washer/dryer. Power on/off is working now but choosing a program in the LG app leads to a message that Remote Start has to be enabled first at the device. Everything else including power-off is working in the LG app 😉

@ollo69
Copy link
Owner

ollo69 commented Aug 23, 2023

Probably turn-on should be enabled only if STANDBY status is on. I suppose that device go in standby when is in remote start state for some times, and in this condition you can wake-up (turn-on) it.

@ollo69
Copy link
Owner

ollo69 commented Aug 25, 2023

There was an error in detecting the standby status. Now the power on switch to turn device on will be enabled only when device is in standby mode, that means that device is configured for remote start and automatically go to standby after some minutes. This is for sure how ThinqV1 devices work and should be the same for ThinqV2.
If someone can make a test, please report here a feed-back.

@w-marco
Copy link

w-marco commented Aug 30, 2023

So far it looks good to me.
Thanks @ollo69 for fixing!

@ollo69
Copy link
Owner

ollo69 commented Aug 30, 2023

Close this issue, hope is fixed at all.

@ollo69 ollo69 closed this as completed Aug 30, 2023
@dinde
Copy link

dinde commented Sep 3, 2023

Before your latest commit.
I was able to:

  • Turn on remotely the washer
  • Turn off remotely the washer
  • Remote Start when I activated it from physical panel

Remote start has to be done from physical panel, then washer enters in 'standby for remote start'

From LG app I'm able to

  • Turn off remotely the washer
  • Pick a cycle program from app
  • Delay start from app
  • Pick spin speed / Dryer / Pre Wash / Wash options / Rinse+

You enabled somehow before your latest commit the ability to turn on the washer remotely !!! 🤣
Would be nice if we could find a way to implement all app options here ! :)

@ollo69
Copy link
Owner

ollo69 commented Sep 4, 2023

@dinde,

not really clear what is not working at your side.

You enabled somehow before your latest commit the ability to turn on the washer remotely

This was disabled because it leaves washer in inconsistent state, as you can read some post above.

At this moment it should be possible to:

  • Turn off remotely the washer
  • Turn on remotely the washer when is in remote start stand-by mode (means with remote start enabled)
  • Remote Start when remote start enabled and not in stand-by mode

All other features are not implemented and out of scope from this issue (please open a new feature request if another one with same requests still not exists).

Can you confirm that mentioned feature work for you device? If not, what issue do you have?
Please also consider that this is a closed issue. If you still have problem related to issue itself I can reopen, otherwise open a new one👍

@dinde
Copy link

dinde commented Sep 4, 2023

@ollo69

not really clear what is not working at your side.

Sorry if my post was not clear,

Turn on remotely the washer when is in remote start stand-by mode (means with remote start enabled)

If remote start is enabled then washer is already turned on.
Before the check of stand-by mode I was able to turn on the washer, not anymore.
This function is not present on LG app but I've been able to use it with your integration before the last commit.

You enabled somehow before your latest commit the ability to turn on the washer remotely

This was disabled because it leaves washer in inconsistent state, as you can read some post above.

The state was unavailable right after turning on but after 1mn state was ON after turning on here.

All other features are not implemented and out of scope from this issue (please open a new feature request if another one with same requests still not exists).

Sure, will do that.

@ollo69
Copy link
Owner

ollo69 commented Sep 4, 2023

If remote start is enabled then washer is already turned on.

Many Washer when set in remote start mode, go in a stand-by status after some minutes (10-15, I don't know exactly). Turn-on should only be used to exit from this state and allow remote start.

Before the check of stand-by mode I was able to turn on the washer, not anymore.
This function is not present on LG app but I've been able to use it with your integration before the last commit.

Yes because this leave the washer in inconsistent state. Non the integration, but the appliance itself. This is what was reported in this discussion a couple of post above. This is not your case?

I temporally reopen this issue to eventually collect other experiences, but generally speaking I would avoid to allow command that do not work for all device (I think this is the same approach used by LG in the app)

@ollo69 ollo69 reopened this Sep 4, 2023
@dinde
Copy link

dinde commented Sep 4, 2023

TBH, I found an interesting use case with the remote turn on/off and was kind of happy when I seen it implemented.
It clears the entity wash completed which helps me with an automation to notify when it's time to take care of laundry !

@dinde
Copy link

dinde commented Sep 14, 2023

Maybe you could include the remote on only on devices reported as working ?
Mine does not need a wake up to remote start.

@github-actions
Copy link

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 30, 2023
Copy link

github-actions bot commented Nov 6, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants