-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
ISY994 raising a lot of HomeAssistantError(f"Unable to turn off switch {self._node.address}") #87644
Comments
Hey there @bdraco, @shbatm, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) isy994 documentation |
The change was made to comply with the Integration Quality expectations:
Can you clarify: is it raising the error but the switch is actually being controlled correctly? Or is the switch not responding? |
All switches work fine physically.
I am pretty certain this is not a real error situation and it may arise out
of the fact that i have a lot of devices and when HA is trying to turn them
all off at the same time (I have a task to turn off all lights in the house
at 2am) some of them just fail this async check.
Alex
…On Tue, Feb 7, 2023 at 3:40 PM shbatm ***@***.***> wrote:
The change was made to comply with the Integration Quality
<https://developers.home-assistant.io/docs/integration_quality_scale_index/#silver->
expectations:
raise HomeAssistantError for other failures such as a problem
communicating with a device.
Can you clarify: is it raising the error but the switch is actually being
controlled correctly? Or is the switch not responding?
—
Reply to this email directly, view it on GitHub
<#87644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMBUT7UJRVKRS3SEGQGQNCTWWKXKTANCNFSM6AAAAAAUUGNUW4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There are some upcoming changes that will throttle commands and retry if the ISY is busy but: Recommended practice is to use an ISY Scene to control more than a couple devices at the same time (e.g. Add all your devices to an All Off scene in the ISY and call switch.turn_off in Home Assistant). This is for a few reasons: first, it's a single command to the ISY and for Insteon, a single command to the Insteon network which drastically reduces traffic. Second, the original ISY994 is terrible at handling too much Insteon traffic and sends 404 errors when the network is busy (this can't be differentiated from an actual bad command, hence the exceptions). FWIW, this appears to be fixed in the Polisy (and I'm guessing EISY), but still better practice to use a Scene. |
This is exactly what I think is happening - it does trigger on 404.
Recommended practice is nice and all but i have 2 light systems mixed on
the property and it's not possible to group devices in a logical way (by
room) while also sending commands sometimes to a scene and sometimes to a
light. I think i'll just comment out this "raise" line for now and run
custom code.
Alex
…On Tue, Feb 7, 2023 at 4:19 PM shbatm ***@***.***> wrote:
There are some upcoming changes
<automicus/PyISY#380> that will throttle commands
and retry if the ISY is busy but:
Recommended practice is to use an ISY Scene to control more than a couple
devices at the same time (e.g. Add all your devices to an All Off scene in
the ISY and call switch.turn_off in Home Assistant).
This is for a few reasons: first, it's a single command to the ISY and for
Insteon, a single command to the Insteon network which drastically reduces
traffic. Second, the original ISY994 is terrible at handling too much
Insteon traffic and sends 404 errors when the network is busy (this can't
be differentiated from an actual bad command, hence the exceptions).
—
Reply to this email directly, view it on GitHub
<#87644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMBUT7VHTU3TRH3SRND7LKDWWK367ANCNFSM6AAAAAAUUGNUW4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Do what works for you. See some suggestions in this discussion. Two other things not mentioned in that discussion, but sharing from personal experiences: don't be afraid to create situation specific scenes in the ISY (e.g. A dedicated scene for your 'all off at 2am') and just hide them in HA and use them only for your automations. Also, you can use the general |
@bdraco you can tag this with problem-in-dependency and I'll close it with the wait-for-not-busy pyisy update listed above. It's not a true "fix" since it's an inherent hardware issue, but will help reduce some of the errors thrown on a busy network. |
So if i have 200 lights or so on my property and need to turn them all off - is there a way to iterate through HA lights and turn off only no-insteon ones and thrn turn off insteon via AutoDR scene?
Right now all my lights are grouped by room then by structure then into “all lights” and this error arises when i turn off all lights. One would ask why does HA even issue off commands for the lights that are already off…
Kind regards
Alex
…________________________________
From: shbatm ***@***.***>
Sent: Tuesday, February 7, 2023 8:22 PM
To: home-assistant/core ***@***.***>
Cc: olyashok ***@***.***>; Author ***@***.***>
Subject: Re: [home-assistant/core] ISY994 raising a lot of HomeAssistantError(f"Unable to turn off switch {self._node.address}") (Issue #87644)
Recommended practice is nice and all but i have 2 light systems mixed on the property and it's not possible to group devices in a logical way
Do what works for you.
See some suggestions in this discussion<automicus/PyISY#184 (comment)>.
Two other things not mentioned in that discussion, but sharing from personal experiences: don't be afraid to create situation specific scenes in the ISY (e.g. A dedicated scene for your 'all off at 2am') and just hide them in HA and use them only for your automations. Also, you can use the general homeassistant.turn_on and turn_off services for mixed (legacy) groups with switches and lights.
—
Reply to this email directly, view it on GitHub<#87644 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMBUT7VM4VMIK47KNLPRBUDWWLYLTANCNFSM6AAAAAAUUGNUW4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Here's an example of a service call to turn off all lights that are currently on except those provided by the ISY: service: light.turn_off
data: {}
target:
entity_id: |-
{{ states.light
| selectattr('state','eq','on')
| map(attribute='entity_id')
| reject('in', integration_entities("isy994"))
| list
}} Further troubleshooting should be via the community forum. |
Thanks! This is a neat approach - i have been creating same myself today.
reject('in', integration_entities("isy994")) unfortunately does not work
since some of the lights are really helper entities over isy994 switches....
In any case - i think by filtering out only state=on this will already
solve the congestion problem.
…On Wed, Feb 8, 2023 at 5:51 PM shbatm ***@***.***> wrote:
service: light.turn_offdata: {}target:
entity_id: |- {{ states.light | selectattr('state','eq','on') | map(attribute='entity_id')| reject('in', integration_entities("isy994")) | list }}
—
Reply to this email directly, view it on GitHub
<#87644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMBUT7V37ADBFEJDUVW7PX3WWQPODANCNFSM6AAAAAAUUGNUW4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You could also turn the ISY lights off first, then lights on in Home Assistant will only be what's left. |
Thanks for the tip!
…On Wed, Feb 8, 2023 at 8:44 PM shbatm ***@***.***> wrote:
You could also turn the ISY lights off first, then lights on in Home
Assistant will only be what's left.
—
Reply to this email directly, view it on GitHub
<#87644 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMBUT7U2R44GU4UJ7DCLXXDWWRDYJANCNFSM6AAAAAAUUGNUW4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
Since last upgrade ISY raises a lot of these errors. It has to do with this commit 3aad153#commitcomment-99657098
What version of Home Assistant Core has the issue?
2023.2
What was the last working version of Home Assistant Core?
2022.11
What type of installation are you running?
Home Assistant OS
Integration causing the issue
isy994
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2023-02-07 02:00:33.806 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall light.turn_off (c:01GRNAS6JZA0P2AQBKTS4R2YKM): entity_id=all, params=> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 1805, in catch_exceptions await coro_or_task 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_component.py", line 213, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 681, 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 721, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 582, in async_handle_light_off_service await light.async_turn_off(**filter_turn_off_params(light, params)) File "/usr/src/homeassistant/homeassistant/components/switch/light.py", line 84, in async_turn_off await self.hass.services.async_call( 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_component.py", line 213, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 681, 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 721, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/isy994/switch.py", line 87, in async_turn_off raise HomeAssistantError(f"Unable to turn off switch {self._node.address}")
Additional information
3aad153#commitcomment-99657098
The text was updated successfully, but these errors were encountered: