mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-11-09 19:18:47 +00:00
Update documentation on how to get logs (#41046)
This commit is contained in:
@@ -221,7 +221,7 @@ learn more about packages, see the [Packages](/docs/configuration/packages) page
|
|||||||
|
|
||||||
That about wraps it up.
|
That about wraps it up.
|
||||||
|
|
||||||
If you have issues, checkout `home-assistant.log` in the configuration directory as well as your indentations. If all else fails, head over to our [Discord chat server][discord] and ask away.
|
If you have issues, check the file indentations and check [the Home Assistant logs](/integrations/logger/#viewing-logs). If all else fails, head over to our [Discord chat server][discord] and ask away.
|
||||||
|
|
||||||
## Debugging configuration files
|
## Debugging configuration files
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ It can happen that you run into trouble while configuring Home Assistant. Perhap
|
|||||||
|
|
||||||
Before we dive into common issues, make sure you know where your configuration directory is. Home Assistant will print out the configuration directory it is using when starting up.
|
Before we dive into common issues, make sure you know where your configuration directory is. Home Assistant will print out the configuration directory it is using when starting up.
|
||||||
|
|
||||||
Whenever an integration or configuration option results in a warning, it will be stored in `home-assistant.log` in the configuration directory. This file is reset on start of Home Assistant.
|
Whenever an integration or configuration option results in a warning, it will be stored in [the logs](/integrations/logger/#viewing-logs).
|
||||||
|
|
||||||
## My integration does not show up
|
## My integration does not show up
|
||||||
|
|
||||||
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
|
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the [the logs](/integrations/logger/#viewing-logs) and see if there are any errors related to your integration you are trying to set up.
|
||||||
|
|
||||||
If you have incorrect entries in your configuration files you can use the configuration check command (below) to assist in identifying them.
|
If you have incorrect entries in your configuration files you can use the configuration check command (below) to assist in identifying them.
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ sensor:
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
Another common problem is that a required configuration setting is missing. If this is the case, the integration will report this to `home-assistant.log`. You can have a look at [the various integration pages](/integrations/) for instructions on how to setup the integrations.
|
Another common problem is that a required configuration setting is missing. If this is the case, the integration will report this in [the logs](/integrations/logger/#viewing-logs). You can have a look at [the various integration pages](/integrations/) for instructions on how to setup the integrations.
|
||||||
|
|
||||||
See the [logger](/integrations/logger/) integration for instructions on how to define the level of logging you require for specific modules.
|
See the [logger](/integrations/logger/) integration for instructions on how to define the level of logging you require for specific modules.
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ If you find any errors or want to expand the documentation, please [let us know]
|
|||||||
|
|
||||||
#### Problems with dependencies
|
#### Problems with dependencies
|
||||||
|
|
||||||
Almost all integrations have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in `home-assistant.log`.
|
Almost all integrations have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in [the logs](/integrations/logger/#viewing-logs).
|
||||||
|
|
||||||
The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you can't figure it out, please [report it](https://github.com/home-assistant/core/issues) so we can investigate what is going on.
|
The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you can't figure it out, please [report it](https://github.com/home-assistant/core/issues) so we can investigate what is going on.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ description: "My integration does not show up"
|
|||||||
ha_category: Configuration
|
ha_category: Configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the `home-assistant.log` file and see if there are any errors related to your integration you are trying to set up.
|
When an integration does not show up, many different things can be the case. Before you try any of these steps, make sure to look at the [the logs](/integrations/logger/#viewing-logs) and see if there are any errors related to your integration you are trying to set up.
|
||||||
|
|
||||||
If you have incorrect entries in your configuration files you can use the CLI script to check your configuration, each installation type has its own section in the common-tasks about this:
|
If you have incorrect entries in your configuration files you can use the CLI script to check your configuration, each installation type has its own section in the common-tasks about this:
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ description: "Problems with dependencies"
|
|||||||
ha_category: Usage
|
ha_category: Usage
|
||||||
---
|
---
|
||||||
|
|
||||||
Almost all integrations have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in `home-assistant.log`.
|
Almost all integrations have external dependencies to communicate with your devices and services. Sometimes Home Assistant is unable to install the necessary dependencies. If this is the case, it should show up in [the logs](/integrations/logger/#viewing-logs).
|
||||||
|
|
||||||
The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you can't figure it out, please [report it](https://github.com/home-assistant/home-assistant/issues) so we can investigate what is going on.
|
The first step is trying to restart Home Assistant and see if the problem persists. If it does, look at the log to see what the error is. If you can't figure it out, please [report it](https://github.com/home-assistant/home-assistant/issues) so we can investigate what is going on.
|
||||||
|
|||||||
@@ -547,32 +547,6 @@ command_line:
|
|||||||
```
|
```
|
||||||
{% endraw%}
|
{% endraw%}
|
||||||
|
|
||||||
### Monitoring failed login attempts on Home Assistant
|
|
||||||
|
|
||||||
If you'd like to know how many failed login attempts are made to Home Assistant, add the following to your {% term "`configuration.yaml`" %} file:
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
```yaml
|
|
||||||
# Example configuration.yaml entry
|
|
||||||
command_line:
|
|
||||||
- sensor:
|
|
||||||
name: Badlogin
|
|
||||||
command: "grep -c 'Login attempt' /home/hass/.homeassistant/home-assistant.log"
|
|
||||||
```
|
|
||||||
{% endraw%}
|
|
||||||
|
|
||||||
Make sure to configure the [Logger integration](/integrations/logger) to monitor the [HTTP integration](/integrations/http/) at least the `warning` level.
|
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
```yaml
|
|
||||||
# Example working logger settings that works
|
|
||||||
logger:
|
|
||||||
default: critical
|
|
||||||
logs:
|
|
||||||
homeassistant.components.http: warning
|
|
||||||
```
|
|
||||||
{% endraw%}
|
|
||||||
|
|
||||||
### Details about the upstream Home Assistant release
|
### Details about the upstream Home Assistant release
|
||||||
|
|
||||||
You can see directly in the frontend (**Developer tools** -> **About**) what release of Home Assistant you are running. The Home Assistant releases are available on the [Python Package Index](https://pypi.python.org/pypi). This makes it possible to get the current release.
|
You can see directly in the frontend (**Developer tools** -> **About**) what release of Home Assistant you are running. The Home Assistant releases are available on the [Python Package Index](https://pypi.python.org/pypi). This makes it possible to get the current release.
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ devices:
|
|||||||
type: list
|
type: list
|
||||||
keys:
|
keys:
|
||||||
id:
|
id:
|
||||||
description: The MAC address (Konnected Alarm Panel) or Device ID (Konnected Alarm Panel Pro) of the Konnected device. MAC addresses must be formatted with colons/punctuation removed, for example, `68c63a8bcd53`. You can usually find the mac address in your router's client list. Or, check the `home-assistant.log` for log messages from automatically discovered devices. Device ID can be found on the device Status Page which is accessible via the Konnected Mobile App.
|
description: The MAC address (Konnected Alarm Panel) or Device ID (Konnected Alarm Panel Pro) of the Konnected device. MAC addresses must be formatted with colons/punctuation removed, for example, `68c63a8bcd53`. You can usually find the mac address in your router's client list. Or, check [the Home Assistant logs](/integrations/logger/#viewing-logs) for log messages from automatically discovered devices. Device ID can be found on the device Status Page which is accessible via the Konnected Mobile App.
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
binary_sensors:
|
binary_sensors:
|
||||||
|
|||||||
@@ -171,12 +171,28 @@ data:
|
|||||||
|
|
||||||
## Viewing logs
|
## Viewing logs
|
||||||
|
|
||||||
The log information are stored in the
|
The log information can be viewed and downloaded from {% my logs title="**Settings** > **System** > **Logs**" %}
|
||||||
|
|
||||||
|
|
||||||
|
### Supervised installations
|
||||||
|
|
||||||
|
On {% term "Home Assistant Supervisor" %} based installations, such as the
|
||||||
|
{% term "Home Assistant Operating System" %} the logs can also be viewed
|
||||||
|
by logging in through the [SSH add-on](/common-tasks/os/#installing-and-using-the-ssh-add-on) and running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ha core logs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Non-Supervised installations
|
||||||
|
|
||||||
|
For installations without the {% term "Home Assistant Supervisor" %}
|
||||||
|
the log information is stored in the
|
||||||
[configuration directory](/docs/configuration/) as `home-assistant.log`
|
[configuration directory](/docs/configuration/) as `home-assistant.log`
|
||||||
and you can read it with the command-line tool `cat` or follow it dynamically
|
and you can read it with the command-line tool `cat` or follow it dynamically
|
||||||
with `tail -f`.
|
with `tail -f`.
|
||||||
|
|
||||||
You can use the example below, when logged in through the [SSH add-on](/addons/ssh/):
|
You can use the example below, when logged in through the [SSH add-on](/common-tasks/os/#installing-and-using-the-ssh-add-on):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tail -f /config/home-assistant.log
|
tail -f /config/home-assistant.log
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ To see the list of SwitchBot Matter-certified devices, visit the [SwitchBot Matt
|
|||||||
- `Retry count`: How many times to retry sending commands to your SwitchBot devices.
|
- `Retry count`: How many times to retry sending commands to your SwitchBot devices.
|
||||||
|
|
||||||
#### Attributes
|
#### Attributes
|
||||||
- `last_run_success`: Returns `true` if the last action sent to the SwitchBot succeeded. This attribute is useful for error trapping when Bluetooth connectivity is intermittent. If `false`, see home-assistant.log for specific error messages.
|
- `last_run_success`: Returns `true` if the last action sent to the SwitchBot succeeded. This attribute is useful for error trapping when Bluetooth connectivity is intermittent. If `false`, see [the Home Assistant logs](/integrations/logger/#viewing-logs) for specific error messages.
|
||||||
|
|
||||||
### Plugs and switches
|
### Plugs and switches
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Errors and warnings are posted as the event `system_log_event`, so it is possibl
|
|||||||
| `name` | Name of the integration, e.g., `homeassistant.components.device_tracker` |
|
| `name` | Name of the integration, e.g., `homeassistant.components.device_tracker` |
|
||||||
| `timestamp` | Unix timestamp with as a double, e.g., 1517241010.237416. |
|
| `timestamp` | Unix timestamp with as a double, e.g., 1517241010.237416. |
|
||||||
|
|
||||||
Live examples of these events can be found in the Home Assistant log file (`home-assistant.log`) or by just looking in the system log. An example could, for instance, look like this:
|
Live examples of these events can be found in the [Home Assistant logs](/integrations/logger/#viewing-logs). An example could, for instance, look like this:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
2019-02-14 16:20:35 ERROR (MainThread) [homeassistant.loader] Unable to find integration system_healt
|
2019-02-14 16:20:35 ERROR (MainThread) [homeassistant.loader] Unable to find integration system_healt
|
||||||
|
|||||||
@@ -120,11 +120,20 @@ If you find that this never creates `known_devices.yaml`, or if you need more in
|
|||||||
homeassistant.components.device_tracker: debug
|
homeassistant.components.device_tracker: debug
|
||||||
```
|
```
|
||||||
|
|
||||||
3. In another window, tail the logfile in the configuration directory:
|
3. In another window, observe the logs.
|
||||||
|
|
||||||
```bash
|
- If using an {% term "Home Assistant Supervisor" %} based installation, such as the
|
||||||
tail -f home-assistant.log | grep device_tracker
|
{% term "Home Assistant Operating System" %}, log in through the [SSH add-on](/common-tasks/os/#installing-and-using-the-ssh-add-on) and run the following command:
|
||||||
```
|
|
||||||
|
```bash
|
||||||
|
ha core logs --follow | grep device_tracker
|
||||||
|
```
|
||||||
|
|
||||||
|
- If not using the {% term "Home Assistant Supervisor" %} tail the log file in the configuration directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tail -f home-assistant.log | grep device_tracker
|
||||||
|
```
|
||||||
|
|
||||||
4. If you see a Python stack trace like the following, check your configuration for correct username/password.
|
4. If you see a Python stack trace like the following, check your configuration for correct username/password.
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ In some cases, it is also necessary to [enable debug logging](/docs/configuratio
|
|||||||
Enabling this will instruct Home Assistant to log a lot of fine-grained information about the integration. This is helpful for debugging and fixing the issue.
|
Enabling this will instruct Home Assistant to log a lot of fine-grained information about the integration. This is helpful for debugging and fixing the issue.
|
||||||
In contrast to the diagnostics information, debug logs are not automatically redacted. Make sure to include only the parts you think are relevant to the issue.
|
In contrast to the diagnostics information, debug logs are not automatically redacted. Make sure to include only the parts you think are relevant to the issue.
|
||||||
|
|
||||||
Look at the `home-assistant.log` file in the [configuration folder](/docs/configuration/) and see if there are any errors related to your integration.
|
[Download the logs](/integrations/logger/#viewing-logs) and see if there are any errors related to your integration.
|
||||||
|
|
||||||
### Additional information
|
### Additional information
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user