Skip to content

Troubleshooting Debug Logs

raman325 edited this page Mar 29, 2026 · 7 revisions

Troubleshooting: Debug Logs

Debug logs capture the detailed decision-making inside Lock Code Manager — when codes are set/cleared, why a slot was enabled/disabled, and how entity states are evaluated. They are essential for diagnosing issues.

Enabling Debug Logging

Add the following to your configuration.yaml and restart Home Assistant:

logger:
  default: warning
  logs:
    custom_components.lock_code_manager: debug
    homeassistant.components.zwave_js: debug

Note: If your lock uses a different integration, replace zwave_js with your lock integration's domain (e.g., homeassistant.components.mqtt for MQTT).

This enables debug logging for both LCM (config flow, providers, entity platforms, etc.) and the lock integration so you can see the full picture of what's happening on both sides.

Capturing Logs for a Bug Report

  1. Enable debug logging as shown above and restart HA.
  2. Reproduce the issue.
  3. Go to Settings → System → Logs → Download full log and download the log file.
  4. Upload the full log file to your bug report, or paste relevant snippets.

Tip: Sharing the full log file is preferred — it preserves context that may be important for diagnosis. If you share a snippet instead, include a continuous time range with extra time before and after the issue. Don't stitch together separate log sections — that risks losing important context between them.

Temporary Debug Logging (No Restart)

If you don't want to edit configuration.yaml, you can enable debug logging temporarily via Developer Tools → Services:

Service: logger.set_level

custom_components.lock_code_manager: debug
homeassistant.components.zwave_js: debug

This resets when HA restarts.

Disabling Debug Logging

Debug logging is verbose and can impact performance and fill up your log file. Once you've captured the logs you need, reverse the process:

  • If you edited configuration.yaml: Remove the logger lines you added (or set them back to warning) and restart HA.
  • If you used the logger.set_level service: Simply restart HA — the temporary setting will be cleared automatically.

What to Include in a Bug Report

  • All lock_code_manager and lock integration log lines from before the issue occurs through the issue itself. Context leading up to the problem is often more useful than the error alone.
  • If the logs are long, upload them as a file rather than pasting inline.
  • Do not redact entity IDs or state values unless they contain sensitive information (like PINs). Entity names and states are critical for diagnosis.
  • PINs are automatically obfuscated in debug logs as pin#xxxxxxxx (an 8-character hex hash). The same PIN on the same lock always produces the same hash, so you can track a specific PIN across log entries without the actual code being exposed. Different locks and different HA instances produce different hashes for the same PIN. You do not need to redact these hashes when sharing logs.

← Back to Troubleshooting

Clone this wiki locally