Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Unknown error for call_service - RuntimeError: can't start new thread

$
0
0

@rct wrote:

[First, I’m new here. I’m not sure where to post a problem. I didn’t post this as a bug/issue, because I don’t know if this is a configuration error, some sort of resource exhaustion/leak, or an actual bug. If I should have posted this as an issue, please let me know.]

I have an automation that turns all lights off when a z-wave HS WD-200 is triple clicked. This has been working but failed last night. It looks like the error that caused the trace back is RuntimeError: can't start new thread

System details

  • Home Assistant 0.101.3 installed via Hassbian on RPi 3 less than 2 months ago.
  • 15-20 Z-wave devices, Aeotec Z-stick Gen 5
  • Home assistant was restarted through the Configuration GUI less than 12 hours before this occurred.
  • The error occurred last night. Digging into it this morning, looks like the hass process has 35 threads.
  • I have some integrations that poll (myq and envoy_read) and occasionally report that updates are taking over 10 seconds or have timed out.

Traceback:

2019-11-15 23:10:51 WARNING (MainThread) [pymyq.api] Device update failed; trying again in 1 seconds
2019-11-15 23:41:44 ERROR (MainThread) [homeassistant.components.automation] Error while executing automation automation.master_bedroom_all_lights_off_triple_tap. Unknown error for call_service at pos 1:
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/automation/__init__.py", line 437, in action
    await script_obj.async_run(variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 190, in async_run
    await self._handle_action(action, variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 274, in _handle_action
    await self._actions[_determine_action(action)](action, variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 357, in _async_call_service
    context=context,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 97, in async_call_from_config
    domain, service_name, service_data, blocking=blocking, context=context
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 370, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/zwave/light.py", line 255, in turn_off
    if self.node.set_dimmer(self.values.primary.value_id, 0):
  File "/srv/homeassistant/lib/python3.7/site-packages/openzwave/command.py", line 615, in set_dimmer
    timer2.start()
  File "/usr/lib/python3.7/threading.py", line 847, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
2019-11-15 23:41:44 ERROR (MainThread) [homeassistant.components.automation] Error while executing automation automation.master_bedroom_all_lights_off_triple_tap. Unknown error for call_service at pos 1:
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/automation/__init__.py", line 437, in action
    await script_obj.async_run(variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 190, in async_run
    await self._handle_action(action, variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 274, in _handle_action
    await self._actions[_determine_action(action)](action, variables, context)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/script.py", line 357, in _async_call_service
    context=context,
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 97, in async_call_from_config
    domain, service_name, service_data, blocking=blocking, context=context
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1236, in async_call
    await asyncio.shield(self._execute_service(handler, service_call))
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, service_name, required_features
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 348, in entity_service_call
    future.result()  # pop exception if have
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 370, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/zwave/light.py", line 255, in turn_off
    if self.node.set_dimmer(self.values.primary.value_id, 0):
  File "/srv/homeassistant/lib/python3.7/site-packages/openzwave/command.py", line 615, in set_dimmer
    timer2.start()
  File "/usr/lib/python3.7/threading.py", line 847, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

The automation was created through the configuration GUI:

- id: '1573420156014'
  alias: Master Bedroom All Lights Off Triple Tap
  description: 'Triple tap master bedroom ceiling light to turn all lights off '
  trigger:
  - event_data:
      entity_id: zwave.master_bedroom_ceiling_fan_light
      scene_data: 7920
      scene_id: 2
    event_type: zwave.scene_activated
    platform: event
  condition: []
  action:
  - data:
      entity_id: all
    service: light.turn_off

I have not restarted HA yet. If there is anything I should capture before doing so, please let me know.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>