Page 66 sur 93

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 18 oct. 2024 13:52
par Thomas
Honnêtement je ne sais pas te répondre, je ne suis pas assez bon en Linux.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 18 oct. 2024 14:00
par Zebulaon
@Thomas j ai poursuivi mes recherches et j ai fais un update de mes question avec une réponse.
Pour les autres éléments de configuration comme ENCRYPTION_KEY et User je continue ma recherche et je te fais signe

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 18 oct. 2024 14:37
par jpz68
@yvespsv Je n'utilise pas TeslaFi mais comme cette application a accès aux mêmes données que TeslaMate je pense que c'est comparable aussi bien pour la consommation que la dégradation de la batterie (si tu utilises les deux tu pourras le vérifier).

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 10:42
par sarti
Une nouvelle version de Teslamate est disponible (v1.31.0). :top:

Je me permets de citer @Thomas pour la procédure :

Mettre à jour de Teslamate :

Code : Tout sélectionner

sudo docker compose pull
sudo docker compose up -d
# Redémarrer Teslamate :

Code : Tout sélectionner

docker compose start teslamate
------------------------

Mises à jour optionnelles :
# Mettre à jour le firmware et l'OS du Raspberry Pi :
Mise à jour du firmware Raspberry :

Code : Tout sélectionner

sudo apt update
sudo apt full-upgrade
sudo rpi-update
sudo reboot

Mise à jour OS Raspbian :

Code : Tout sélectionner

sudo apt update
sudo apt dist-upgrade
sudo apt clean
sudo reboot

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 12:50
par GaryGate
La mise à jour s'est déroulée sans problème.
Teslamate supporte maintenant la version 17 de PostgreSQL, j'ai donc également fait la mise à jour depuis la version 16.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 14:02
par Thomas
Merci @sarti , J'avais demandé il y a quelques jours aux dévelopeurs de pulier une mise à our car ils avaient développé pas mal de nouvelles fonctions et correctifs, cela a été fait, c'est cool.

Release note : https://github.com/teslamate-org/teslam ... ANGELOG.md
As always, lots of improvements. The focus has been on performance improvements, especially on slow HW like Raspberry Pi 3B+. We achieved 240x speed improvements in several dashboards 🚀 And we welcomed @swiffer to the TeslaMate-Org team 👋 And much, much more. Enjoy it.

Regarding PostgreSQL 17: TeslaMate uses PostgreSQL as database, this is an external dependency and needs to be updated by yourself. Although TeslaMate currently runs fine with PostgreSQL 12+ we strongly recommend upgrading to the latest supported version. We recommend that you do this as follows:

Backup your data
Upgrade TeslaMate to this version
Backup your data after the upgrade
Upgrade PostgreSQL to postgres:17 (Yes, you will have to erase your data, which is why you need your backup in the first place.)
Additional info: In some very rare cases with very old installations of TeslaMate (from 2019) we have observed performance issues due to missing indexes. These should normally be added with our automatic migrations. If you think your installation may be missing some indexes, see #4201 for the corrective SQL command.

New features
Improvements and bug fixes
fix: 401 on direct Fleet API calls (#4095 - @jlestel)
feat: add support for PostgreSQL 17 (#4231 - @swiffer)
fix: add nix module option to specify postgres package (#4227 - @brianmay)
perf: limit positions to set elevation for to last 10 days (#4228 - @swiffer)
feat: add treefmt-nix to nix flake (#4219 - @JakobLichterfeld)
feat: use Grafana 11.0.6-security-01 (#4279 - @swiffer)
Build, CI, internal
ci: pin GitHub action dependencies to protect against supply chain attacks (#4076 - @JakobLichterfeld)
chore: correct comment for pinned Docker login-action to version 3.2.0 (#4120 - @JakobLichterfeld)
build(deps): bump erlef/setup-beam from 1.18.0 to 1.18.1 (#4116)
build(deps): bump docker/login-action from 3.2.0 to 3.3.0 (#4115)
chore: update PostgreSQL to version 16 in flake.nix (#4135- @JakobLichterfeld)
build(deps): bump webpack from 5.92.1 to 5.94.0 in /website (#4171)
build(deps): bump micromatch from 4.0.5 to 4.0.8 in /website (#4174)
chore: Update tzdata to version 1.1.2 and mimerl to version 1.3.0 (#4205 - @JakobLichterfeld)
build(deps): bump send and express in /website (#4203)
ci: enable dependabot for mix and npm (#4207 - @JakobLichterfeld)
build(deps): bump @docusaurus/preset-classic from 3.4.0 to 3.5.2 in /website (#4210)
build(deps): bump phoenix_ecto from 4.4.3 to 4.6.2 (#4213)
build(deps): bump jason from 1.4.1 to 1.4.4 (#4216)
build(deps): bump classnames from 2.3.2 to 2.5.1 in /website (#4211)
ci: add treefmt as code formatting multiplexer (#4219 - @JakobLichterfeld)
ci(refactor): use composite action to avoid duplication in elixir workflow (#4219 - @JakobLichterfeld)
ci: prevent workflow runs for certain conditions and allow scheduled runs (#4219 - @JakobLichterfeld)
ci(refactor): use reusable workflow to check paths (#4219 - @JakobLichterfeld)
ci(refactor): use reusable workflows for streamlined DevOps pipeline (#4219 - @JakobLichterfeld)
ci(refactor): allow ghcr_build parallel to elixir test (#4219 - @JakobLichterfeld)
ci: ensure proper linting via treefmt (#4219 - @JakobLichterfeld)
doc: update CI badge URL for devops workflow (#4219 - @JakobLichterfeld)
ci(fix): handle empty path filter output (#4219 - @JakobLichterfeld)
fix: avoid the need for impure for devenv (#4245 - @brianmay)
ci(fix): run ghcr build workflow only for specific conditions (#4219 - @JakobLichterfeld)
ci: remove branch restriction for check_paths workflow to increase sec (#4219 - @JakobLichterfeld)
build(deps): bump actions/checkout from 4.1.7 to 4.2.1 (#4262)
ci(fix): only run ghcr build in DevOps workflow on own repo (022b173 - @JakobLichterfeld)
ci: pin ubuntu-24.04 as runner OS (40dab3e - @JakobLichterfeld)
ci: cleanup caches when pr is closed (75cfc7c - @JakobLichterfeld)
ci(fix): run ghcr build in DevOps workflow for forks (688147e - @JakobLichterfeld)
ci(fix): correct syntax in ghcr_build workflow for workflow_call (9e6a275 - @JakobLichterfeld)
ci(fix): run ghcr build as separate workflow to fix permission issues with forks (0410593 - @JakobLichterfeld)
build(deps-dev): bump credo from 1.7.1 to 1.7.8 (#4238)
build(deps): bump crate-ci/typos from 1.22.9 to 1.26.0 (#4261)
refactor: Cleanup nix code (#4265 - @scottbot95)
build(deps): bump elixir from 1.16.2-otp-26 to 1.17.2-otp-27 (#4296 - @JakobLichterfeld)
build(deps): bump http-proxy-middleware from 2.0.6 to 2.0.7 in /website (#4303)
feat: update to Phoenix HTML 4.1, bump dependencies (#4277 - sdwalker and @JakobLichterfeld)
Dashboards
Improve Battery Health dashboard estimations on rated range (#4074 - @jheredianet)
Update charges.json: range added per hour (#4089 - @DrMichael)
small visual distinguish between AC & DC charging in charges dashboard and unification of the DC coloring in all dashboards (#4124 - @stauffenberg2020)
Improve drive stats (#4148 - @jheredianet)
Improve drives dashboard (#4146 - @jheredianet)
Odometer in charges (#4144 - @jheredianet)
Update charging-stats for handling suc cost mixed with AC charge on TWC (#4137 - @cyberden)
Fix the issue of failing to restore efficiency dashboard (#4153 - @ghostiee)
Improve rounding to month / weeks / days in Updates "Since Previous Update" column (#4164 - @swiffer)
feat: Improve cost filter on Charges dashboard to show charges with negative cost as well (#4179 - @jheredianet)
feat: display vehicle VIN as a fallback for vehicle name on grafana dashboards (#4198 - @arcastro)
feat: Add Moving Average / Percentiles to Charge Level dashboard & bucket data to support longer periods (#4200 - @swiffer)
increase max battery charge gauge threshold to 101 in case of LFP (#4191 - @neothematrix)
multiple cars, same name, add VIN next to name (#4230 - @swiffer)
json_build_object instead of concat in battery-health (#4229 - @swiffer)
perf: fix skipping streaming data in charging stats (#4252 - @swiffer)
perf: improvements drive stats (#4258 - @swiffer)
fix: for drives not showing if duration < 1 minute (#4284 - @swiffer)
feat: add max speed in drives dashboard (#4284 / #4267 - @js94x)
perf: exclude streaming data when getting battery level (#4286 - @swiffer)
perf: exclude streaming data in visited dashboard (#4287 - @swiffer)
fix: weighted average calculation for consumption in drives dashboard (#4289 - @swiffer)
perf: improvement in charge level (#4301 - @swiffer)
perf: improvement and deprecated syntax removal (#4304 - @swiffer)
Translations
Adding missing Swedish translation (#4097 - @tobiasehlert)
Documentation
doc: Add initial author and list of contributors to README.md (#4084 - @JakobLichterfeld)
doc: add steps to the guide regarding how to switch to Fleet API (#4103 - @yangiak)
doc: align TPMS Pressure naming in sensor config to match UI config for home assistant (#4104 - @helmo)
doc: Update screenshots and rearrange links (#4151 - @jheredianet)
doc: fix markdownlint warnings in fleet API documentation (#4173 - @JakobLichterfeld)
doc: clarify using fleet API has lots of drawbacks (#4173 - @JakobLichterfeld)
docs: fix Home Assistant MQTT sensor JSON templates warnings (#4257 - @longzheng)
docs: add recommended RAM size (#4278 - @JakobLichterfeld)
docs: add best practice section to contribution guide (#4288 - @swiffer)

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 14:11
par Marsupio
J'essaie de passer en Postgres SQL V17.

Pour effacer la base de données actuelle : docker volume rm "$(basename "$PWD")_teslamate-db", ça me renvoie "Error response from daemon: get Teslamate_teslamate-db: no such volume". Vous avez des idées ?

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 14:23
par Thomas
J'ai la même chose, je cherche.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 14:30
par GaryGate
J'ai dû utiliser sudo devant la commande

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 14:55
par Thomas
Cela n'a pas fonctionné chez moi => Formatage et Réinstallation de Teslamate. Pensez à bien sauvegarder votre base de données avant de commencer !

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 15:08
par Tigerbill17
Perso, je ne prends pas la tête
sudo docker compose pull
sudo docker compose up -d

et c'est tout, même pas besoin de redémarrer Teslamate

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 15:45
par Thomas
Réinstallation faite, sauvegarde restaurées, tout fonctionne bien avec la dernière version et j'ai l'impression que la navigation dans Teslamate est bien plus rapide :top:

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 15:48
par Marsupio
Pas envie de tout réinstaller juste pour l'upgrade PostGres... Doit bien y avoir une solution (je suis sur une machine virtuelle Debian sur Freebox Delta).

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 15:54
par Thomas
Si tu as "no such volume" c'est qu'il est peut être déjà supprimé. Essaye de continuer en ignorant cette étape.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 16:16
par Marsupio
Non la database d'origine n'a pas été effacée. J'ai tout relancé et j'ai rien perdu. Par contre pas d'upgrade en PostGres 17.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 16:40
par Thomas
Ce n'est pas très grave. Si tu ne veux pas risquer de tout perdre ou tout réinstaller reste comme cela.

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 17:15
par jpz68
Pour info sous MyTeslaMate c'est toujours la version 1.30.1 (je suppose que le passage à la version 1.31 se fera sous peu).

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 19:08
par Axolotl
j'ai fait la maj postgres et oui il faut supprimer le volume sinon ça ne fonctionne pas, j'ai mis à jour dans le sujet NAS comment faire.

Image

En CLI tu peux faire un volume ls avant pour récupérer le nom puis directement un docker volume rm teslamate_teslamate-db qui est le nom par défaut si tu n'as rien changé

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 19:16
par jpz68
Je vois qu'ils utilisent Mosquitto pour le protocole MQTT :clin:

Re: Teslamate sur Raspberry Pi - Nouveau Tutoriel !

Publié : 27 oct. 2024 19:29
par Axolotl
tu peux le sortir de la stack si tu veux le mutualiser avec un mosquitto qui tourne déjà chez toi ;)
je l'avais fait ça marche