Skip to content
UsecaseBoard
← All use cases
blogHome Automation

Diagnose a Home Assistant database login failure with Claude Code

At a glance

Rob Taylor used a prepared Home Assistant skill to investigate MariaDB errors and restore his system's recorder connection. This workflow is listed under Home Automation, Troubleshooting, Self Hosting.

Agents / tools
Claude Code, Home Assistant, MariaDB, SSH

SourceBuilding a tool for these workflows? See weekly rates.

What they did

1) Prepare Claude Code with a HomeAssistant skill containing SSH details, add-on inventory and diagnostic commands, with credentials stored separately. You need host administration and Supervisor API access. 2) Describe the failed automations and have Claude SSH in and inspect ha core logs for errors. 3) In this incident, investigate the MariaDB access-denied error after an add-on update. Check that the recorder's database account matches the configured login and rights. 4) Send an authenticated POST to the Supervisor endpoint /addons/core_mariadb/options. In its options object, set databases to ["homeassistant"], logins to the installation's username/password pair, and rights to that username plus database "homeassistant". Preserve your own account values. 5) Run ha addon restart core_mariadb, followed by ha core restart. Confirm the recorder reconnects and affected automations resume.

How it went

The author reports restoring operation in four minutes and says the lights stayed off for the remainder of the night.

Worth knowing

This was a specific database-permissions incident. The workflow depended on existing SSH access and installation context.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

No prompt excerpt was provided by the source.

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →