Skip to content

thread and app pin model is not understood and does not work #2523

@hhaim

Description

@hhaim

What happened?

Any combination other than the default throw exception. the number of threads was not the perf issue i was looking but wanted to understand how it works (the production_mode..)

Version

4.5.12

Installation type

Docker container

Relevant log output

total_threads: 1
  pin_apps: false          # Pin all apps


appdaemon  | 2026-01-01 11:00:01.049873 INFO light_automation: start LightApp
appdaemon  | 2026-01-01 11:00:01.053849 WARNING AppDaemon: Invalid value for pin_thread (-1) in app: light_automation - discarding callback
appdaemon  | 2026-01-01 11:00:01.054819 WARNING AppDaemon: App 'light_automation' failed to start
appdaemon  | 2026-01-01 11:00:01.056003 ERROR Error: =====  Failed to start 'light_automation'  ================================
appdaemon  | 2026-01-01 11:00:01.056318 ERROR Error: AppStartFailure: App 'light_automation' failed to start
appdaemon  | 2026-01-01 11:00:01.057292 ERROR Error:   InitializationFail: initialize() method failed for app 'light_automation'
appdaemon  | 2026-01-01 11:00:01.058608 ERROR Error:     PinOutofRange: Pin thread -1 out of range. Must be between 0 and 0
appdaemon  | 2026-01-01 11:00:01.064690 ERROR Error:     apps/ada/schedule.py line 131 in __init__
appdaemon  | 2026-01-01 11:00:01.065157 ERROR Error:     apps/heat_app.py line 1599 in initialize
appdaemon  | 2026-01-01 11:00:01.065510 ERROR Error: ===========================================================================
appdaemon  | 2026-01-01 11:00:01.066974 INFO AppDaemon: Calling initialize() for voice_events
appdaemon  | 2026-01-01 11:00:01.069129 WARNING AppDaemon: Invalid value for pin_thread (-1) in app: voice_events - discarding callback
appdaemon  | 2026-01-01 11:00:01.070162 WARNING AppDaemon: App 'voice_events' failed to start
appdaemon  | 2026-01-01 11:00:01.071336 ERROR Error: =====  Failed to start 'voice_events'  ====================================
appdaemon  | 2026-01-01 11:00:01.071683 ERROR Error: AppStartFailure: App 'voice_events' failed to start
appdaemon  | 2026-01-01 11:00:01.072750 ERROR Error:   InitializationFail: initialize() method failed for app 'voice_events'
appdaemon  | 2026-01-01 11:00:01.074121 ERROR Error:     PinOutofRange: Pin thread -1 out of range. Must be between 0 and 0
appdaemon  | 2026-01-01 11:00:01.081388 ERROR Error:     apps/heat_app.py line 1676 in initialize
appdaemon  | 2026-01-01 11:00:01.081749 ERROR Error: ===========================================================================
Gracefully S

Relevant code in the app or config file that caused the issue

the code is here 
https://github.com/hhaim/hass/tree/master/cfg/hass/apps

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issueSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions