iOS
iOS copied to clipboard
Calling the service to restart/reboot via shortcuts leads to timeout error, despite success.
iOS device model, version and app version
Model Name: Iphone 11 pro Software Version: 14.0 App version: 2020.6.2 (1)
Home Assistant Core Version
0.116.2
Describe the bug When using the shortcuts app to call the service to either restart or reboot (the host of) homeassitant, the response leads to an error saying that the the app could not parse the response. Most likely due to the response taking too long.
Can this be fixed on the iOS side, by either assuming that long response time is considered ok for these 2 operations? Or does Home Assistent need to be tweaked to send faster response for these operations?
When calling the api directly
➜ ~ http 192.168.1.63:8123/api/services/homeassistant/restart Authorization:"Bearer ${HASSIO_TOKEN}"
HTTP/1.1 200 OK
Content-Encoding: deflate
Content-Length: 961
Content-Type: application/json
Date: Sun, 18 Oct 2020 13:09:58 GMT
Server: Python/3.8 aiohttp/3.6.2
It takes a while but there is an actual response.
To Reproduce
Create a shortcut like the following:
and execute it. Home assistant actually gets restarted/rebooted but the shortcut will always report error.
Expected behavior The execution results in a success.
Screenshots
Additional context
I'm unable to reproduce this. When I call homeassistant.restart
it returns immediately and then restarts:
2020-10-20 20:03:04.764121-0700 Extensions-Intents[53438:5387298] [Verbose] [com.apple.siri.extension] [CallService.swift:127] handle(intent:completion:) > Handling call service shortcut homeassistant, restart
…
2020-10-20 20:03:05.112073-0700 Extensions-Intents[53438:5386993] [Verbose] [main] [CallService.swift:130] handle(intent:completion:) > Successfully called service during shortcut
This is against 0.117 dev, so it's possible there's been a change there, but I wouldn't expect that to be the case. Can you tell me what installation method you're using for HA?
Can you tell me what installation method you're using for HA?
I have it installed via docker on ubuntu
arch | aarch64 |
---|---|
chassis | |
dev | false |
docker | true |
docker_version | 19.03.12 |
hassio | true |
host_os | Ubuntu 18.04.5 LTS |
installation_type | Home Assistant Supervised |
os_name | Linux |
os_version | 4.4.154-111-rockchip-g39b306a41b2d |
python_version | 3.8.5 |
supervisor | 247 |
timezone | Europe/Amsterdam |
version | 0.116.4 |
virtualenv | false |
http post 192.168.1.63:8123/api/services/homeassistant/restart 0.24s user 0.06s system 2% cpu 10.353 total
there are times it takes a little bit longer tho.
So what are the next steps here? Do I just need to accept the fact that my instance is slow and that is the problem?
2020-10-30 11:23:11 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /homeassistant/restart request
Could be that my instance is just slow. How shall we proceed from here?
Interesting, that timeout does look like it's being logged not in the app, right? I wonder if this is a difference in installation method. When the app talks directly to core it hears back right away, but this method is not working that way. You may need to talk to hassio/core authors to learn more about the difference in behavior here.
Shall this issue be moved to https://github.com/home-assistant/core? Do you have the powers to move it? Or do I need to create a new one?
Just to mention, the timeout is not always logged in hassio. Sometimes its just slow and it executes the reboot/restart.
Have the same issue.
Having the same issue for Home Assistant shortcuts running every BMW Connect action.
Has there been any update on this issue. I have it when calling Scripts from a Shortcut. The Scripts complete correctly but error out in the Shortcut.
@wraith1385 was able to workaround it with the HA Helpers