Add-on Maria_db : plus d'historique

Bonsoir
Je viens d’installer maria_db en add-on sur mon HA.
Mais ca ne marche plus, mes card avec graph affichent un rond qui tourne, l’« historique » disparait du menu latéral…
il me semble avoir bien suivi les différents tutos.
1- j’installe l’add_on
2- je configure l’add-on (le mot de passe)
3- je démarre l’add-on
4- je modifie le ficher configuration.yaml avec ce qui est proposé dans la documentation de l’add-on mais en modifiant le mot de passe.
5- je redémarre le serveur.

Et là plus d’historique !!
Avez-vous déjà eu ce problème?
Merci
Stéphane

Bonjour,

Il me semble que pour fonctionner avec Raspberry Pi OS il est nécessaire d’installer des paquets supplémentaires.

Quand j’ai mis cet Addon j’ai également du ajouter ceci :

sudo apt install libmariadbclient-dev libssl-dev

Cela fait quelques temps que j’ai ajouté cet Addon aussi je ne sait pas si c’est toujours d’actualité.

Bonjour @Niptoc merci pour ton retour
Je pense avoir trouvé le pourquoi de mon problème : dans la commande suivant (fichier secret) db_mysql: mysql://votreusername:votremotdepasse@core-mariadb/homeassistant?charset=utf8mb4, j’avais par erreur modifier core-mariadb par autre chose.
Par contre, je viens de refaire l’installation (10mn) en modifiant la commande, et depuis, après redémarrage de HA, je n’ai plus accès à HA. C’est donc plus grave qu’avant.

Edit de mon post précédent.
La machine a enfin démarrée (sans intervention de ma part) au bout de longues minutes.
Et même problème que hier soir, je perds l’historique.

Loin de moi l’idée de vouloir limiter tes ambitions, mais, et c’est toi même qui l’a dit, tu débutes sous HA et Linux. Ne serait-il pas plus sage et plus simple et commencer avec les trucs de base (ainsi l’historique à base de sqllite par défaut, c’est moins « joli » qu’une base SQL mais ça marche)?
Je crains qu’empiler les difficultés ne soit pas une bonne méthode pour, à la fin, avoir un truc qui marche. Qui doit, je suppose être notre but à tous :wink:

1 « J'aime »

Ca ne parait pourtant pas trop difficile !
Et puis, je souhaitais passer sur mariadb assez tôt afin de ne pas avoir à migrer les historiques, mon HA n’a qu’une semaine

Si je lis la doc de HA concernant l’action recorder, le code est mysql://user:password@SERVER_IP/DB_NAME?charset=utf8mb4.
Sur le doc de mariadb, ce code devient db_mysql: mysql://votreusername:votremotdepasse@core-mariadb/homeassistant?charset=utf8mb4.
On voit que le terme SERVER_IP devient core-mariadb
Et dans la configuration de mariadb, je n’ai modifié que le mot de passe.

Dans le journal de mariadb, je n’ai pas d’erreur au chargement, mais il y a une erreur de connexion 211109 16:14:17 mysqld_safe Starting mysqld daemon with databases from /data/databases 2021-11-09 16:14:17 0 [Note] /usr/bin/mysqld (mysqld 10.4.19-MariaDB) starting as process 399 ... 2021-11-09 16:14:17 0 [Note] mysqld: Aria engine: starting recovery recovered pages: 0% 11% 22% 32% 42% 52% 63% 73% 83% 93% 100% (0.0 seconds); tables to flush: 3 2 1 0 (0.0 seconds); 2021-11-09 16:14:17 0 [Note] mysqld: Aria engine: recovery done 2021-11-09 16:14:17 0 [Note] InnoDB: Using Linux native AIO 2021-11-09 16:14:17 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2021-11-09 16:14:17 0 [Note] InnoDB: Uses event mutexes 2021-11-09 16:14:17 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2021-11-09 16:14:17 0 [Note] InnoDB: Number of pools: 1 2021-11-09 16:14:17 0 [Note] InnoDB: Using generic crc32 instructions 2021-11-09 16:14:17 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts) 2021-11-09 16:14:17 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2021-11-09 16:14:17 0 [Note] InnoDB: Completed initialization of buffer pool 2021-11-09 16:14:17 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2021-11-09 16:14:17 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=157115 2021-11-09 16:14:17 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2021-11-09 16:14:17 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2021-11-09 16:14:17 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2021-11-09 16:14:17 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2021-11-09 16:14:17 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2021-11-09 16:14:17 0 [Note] InnoDB: Waiting for purge to start 2021-11-09 16:14:18 0 [Note] InnoDB: 10.4.19 started; log sequence number 157124; transaction id 161 2021-11-09 16:14:18 0 [Note] InnoDB: Loading buffer pool(s) from /data/databases/ib_buffer_pool 2021-11-09 16:14:18 0 [Note] Plugin 'FEEDBACK' is disabled. 2021-11-09 16:14:18 0 [Note] InnoDB: Buffer pool(s) load completed at 211109 16:14:18 2021-11-09 16:14:18 0 [Note] Server socket created on IP: '::'. 2021-11-09 16:14:18 0 [Note] Reading of all Master_info entries succeeded 2021-11-09 16:14:18 0 [Note] Added new Master_info '' to hash table 2021-11-09 16:14:18 0 [Note] /usr/bin/mysqld: ready for connections. Version: '10.4.19-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server [16:14:18] INFO: Check data integrity and fix corruptions mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.global_priv OK mysql.gtid_slave_pos OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.roles_mapping OK mysql.servers OK mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.transaction_registry OK phpmyadmin.pma__bookmark OK phpmyadmin.pma__central_columns OK phpmyadmin.pma__column_info OK phpmyadmin.pma__designer_settings OK phpmyadmin.pma__export_templates OK phpmyadmin.pma__favorite OK phpmyadmin.pma__history OK phpmyadmin.pma__navigationhiding OK phpmyadmin.pma__pdf_pages OK phpmyadmin.pma__recent OK phpmyadmin.pma__relation OK phpmyadmin.pma__savedsearches OK phpmyadmin.pma__table_coords OK phpmyadmin.pma__table_info OK phpmyadmin.pma__table_uiprefs OK phpmyadmin.pma__tracking OK phpmyadmin.pma__userconfig OK phpmyadmin.pma__usergroups OK phpmyadmin.pma__users OK [16:14:18] INFO: Ensuring internal database upgrades are performed This installation of MariaDB is already upgraded to 10.4.19-MariaDB, use --force if you still need to run mysql_upgrade [16:14:18] INFO: Ensure databases exists [16:14:18] INFO: Create database homeassistant [16:14:18] INFO: Ensure users exists and are updated [16:14:18] INFO: Update user homeassistant [16:14:18] INFO: Init/Update rights [16:14:18] INFO: Granting all privileges to homeassistant on homeassistant [16:14:19] INFO: Successfully send service information to Home Assistant. 2021-11-09 18:20:50 23 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:20:53 24 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:20:56 25 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:20:59 26 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:02 27 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:05 28 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:08 29 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:11 30 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:14 31 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES) 2021-11-09 18:21:17 32 [Warning] Access denied for user 'homeassistant'@'172.30.32.1' (using password: YES)

qu’est-ce que cette adresse IP 172.30.32.1?
Merci
Stéphane

Je viens de trouver la solution !!
Il ne faut pas mettre de caractères spéciaux dans le mot de passe.
https://community.home-assistant.io/t/mariadb-install-and-setup-questions/266735/4

L’adresse du container (probablement HA puisque c’est le client)

Migrer les historiques, ça ne veut pas dire grand chose…
De base, ça gère aussi les historiques.
Quant à passer de sqllite à mysql/mariadb, ça ne transfère pas les historiques, c’est à toi de le faire…