Pat
Avril 5, 2022, 9:33
6
Bonjour,
Je déterre ce topic pour donner la solution qui a fonctionné pour moi, au cas où ça pourrait servir à d’autres.
J’avais suivi le même tutoriel que @nonome1 et avait évidemment les mêmes erreurs qui remontaient à chaque utilisation d’Alexa pour contrôler un appareils d’Home Assistant.
Voici tout d’abord la source de la solution trouvée :
opened 11:36AM - 21 May 20 UTC
integration: alexa
integration: cloud
<!-- READ THIS FIRST:
- If you need additional help with this template, pleas… e refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
- Do not report issues for integrations if you are using custom components or integrations.
- Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
-->
## The problem
<!--
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened.
-->
I get frequent log entries with the following message:
### Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid.
The integration seems to continue to work but this gets logged about every 1-2 hours. Presume when this happens it is requesting a new access token, so should this be in the error log? Is it part of normal operation?
## Environment
<!--
Provide details about the versions you are using, which helps us to reproduce
and find the issue quicker. Version information is found in the
Home Assistant frontend: Developer tools -> Info.
-->
- Home Assistant Core release with the issue: v0.110.0
- Last working Home Assistant Core release (if known): don't know. At least before v0.106.0
- Operating environment (Home Assistant/Supervised/Docker/venv): Docker with HassIO
- Integration causing this issue: Alexa
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/alexa/
## Problem-relevant `configuration.yaml`
<!--
An example configuration that caused the problem for you. Fill this out even
if it seems unimportant to you. Please be sure to remove personal information
like passwords, private URLs and other credentials.
-->
This is setup with UI config
```yaml
```
## Traceback/Error logs
<!--
If you come across any trace or error logs, please provide them.
-->
The first occurred is about 2 hours after last rebooting.
```txt
Log Details (ERROR)
Logger: homeassistant.components.alexa.state_report
Source: components/alexa/state_report.py:49
Integration: Amazon Alexa (documentation, issues)
First occurred: 0:12:50 (7 occurrences)
Last logged: 11:35:52
Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid.
```
## Additional information
En résumé :
Depuis la Console Développeurs d’Amazon , j’ai sélectionné ma Skill personnalisée pour Home Assistant.
Dans le menu PERMISSIONS de la barre à Gauche, j’ai activé « Send Alexa Events »
Dans mon fichier configuration.yaml , j’ai utilisé les « Alexa Client Id » et « Alexa Client Secret » de cette même page PERMISSIONS (pas ceux de la page " Account Linking "
Depuis l’application Alexa de mon smartphone, j’ai désactivé la Skill personnalisée, puis réactivée .
Les messages d’erreurs ont disparu depuis.
Pour information, la section concernée de mon fichier configuration.yaml ressemble à ça :
# Alexa
api:
alexa:
smart_home:
locale: fr-FR
endpoint: https://api.eu.amazonalexa.com/v3/events
client_id: !secret amazon_client_id
client_secret: !secret amazon_client_secret
filter:
include_entities:
- light.kitchen
- light.kitchen_left
include_entity_globs:
- binary_sensor.*_motion
include_domains:
- switch
exclude_entities:
- switch.outside
entity_config:
light.kitchen:
name: "Custom Name for Alexa"
description: "The light in the kitchen"
switch.stairs:
display_categories: LIGHT
3 « J'aime »