Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add amap home 1 #4

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
195433c
Track open/close states for individual doors (#3962)
SaswatPadhi Jun 19, 2024
9df4e7c
doc: update changelog
JakobLichterfeld Jun 19, 2024
2c4639e
feat: allow Fleet API users to change client_id (#3984)
jlestel Jun 26, 2024
533cfd9
doc: update changelog
JakobLichterfeld Jun 26, 2024
c0dd0e2
Improve drive details (#4004)
jheredianet Jun 27, 2024
9540a7c
Update CHANGELOG.md
cwanja Jun 27, 2024
27a6a7e
Improve visualizations on Battery Health dasboard (#4005)
jheredianet Jun 28, 2024
de2b276
doc: update changelog
JakobLichterfeld Jun 28, 2024
e74a124
doc: update changelog
JakobLichterfeld Jun 28, 2024
a0cf824
Update drives.json: show drives with duration=0 but distance>0 (#3867)
DrMichael Jun 30, 2024
8ce39b6
doc: update changelog
JakobLichterfeld Jun 30, 2024
feede9b
doc: update the Contributor's Guide with the latest requirements (#4017)
JakobLichterfeld Jun 30, 2024
56bac89
build(deps): bump crate-ci/typos from 1.21.0 to 1.22.9 (#4021)
dependabot[bot] Jul 2, 2024
f5f9f27
doc: update changelog
JakobLichterfeld Jul 2, 2024
c8159cf
Customize intervals between vehicle_data calls (#3940)
jlestel Jul 2, 2024
0e454f4
doc: update changelog
JakobLichterfeld Jul 2, 2024
25c1611
feat: Create NixOS module (#3998)
scottbot95 Jul 2, 2024
2ca545a
doc: Documentation for new endpoint changes (#3978)
jlestel Jul 2, 2024
8d2ee87
doc: update changelog
JakobLichterfeld Jul 2, 2024
6cbdee9
doc: update changelog
JakobLichterfeld Jul 2, 2024
6f3757f
Grafana & Dashboard improvements (#4019)
swiffer Jul 2, 2024
be00a2e
doc: Add Grafana VS Code extension documentation (#4025)
JakobLichterfeld Jul 2, 2024
734a859
feat: re-enable time picker by default in drive-details, charge-detai…
arter97 Jul 3, 2024
ca164d9
doc: update changelog
JakobLichterfeld Jul 3, 2024
272a99b
Update vehicle.ex with marketing name for Model Y Long Range RWD (#3989)
stefanlange Jul 3, 2024
d2a1371
doc: update changelog
JakobLichterfeld Jul 3, 2024
bae0469
Improve "Charges" dashboard (#4031)
jheredianet Jul 4, 2024
a7e31e8
doc: update changelog
JakobLichterfeld Jul 4, 2024
af6cc35
Improve "Drives" dashboard (#4033)
jheredianet Jul 4, 2024
9ba6fc8
doc: update changelog
JakobLichterfeld Jul 4, 2024
c90cde8
feat: Add ability to enable and disable data collection for cars (#3993)
mark3-dev Jul 5, 2024
ea61136
doc: update changelog
JakobLichterfeld Jul 5, 2024
326017d
Update overview.json: Add Distance (#4034)
DrMichael Jul 5, 2024
a1cdc2a
doc: update changeloge
JakobLichterfeld Jul 5, 2024
21439f1
publish center_display_state to mqtt (#3813)
Atrox Jul 5, 2024
fec0422
doc: update changelog
JakobLichterfeld Jul 5, 2024
00fdadc
feat: add LFP Battery setting for car settings (#4007) -> master
JakobLichterfeld Jul 5, 2024
63b7677
doc: update changelog (#4038)
JakobLichterfeld Jul 5, 2024
16e9089
Update vehicle.ex with marketing name for Model Y SR (#4042)
kolaCZek Jul 6, 2024
c09ff81
doc: update changelog
JakobLichterfeld Jul 6, 2024
7e73f89
Update overview.json: fix Net (#4045)
DrMichael Jul 6, 2024
7f2eb7d
doc: update changelog
JakobLichterfeld Jul 6, 2024
593736e
build(deps): bump express from 4.18.2 to 4.19.2 in /website (#3790)
dependabot[bot] Jul 6, 2024
336ba30
doc: update changelog
JakobLichterfeld Jul 6, 2024
4a32f6e
doc: fix typo in MQTT location JSON format (#4047)
JakobLichterfeld Jul 6, 2024
0c31631
doc: update changelog
JakobLichterfeld Jul 6, 2024
a36610e
build: update website dependencies, doc: fix markdown linter warnings…
JakobLichterfeld Jul 6, 2024
8192f12
Add icon to summary when Sentry Mode is triggered and recording (#4043)
kolaCZek Jul 6, 2024
ad00928
doc: update changelog
JakobLichterfeld Jul 6, 2024
1e1ebff
style: fix single quoted string in car_live (#4049)
JakobLichterfeld Jul 6, 2024
39fd888
update overview dashboard to fix units for energy consumption (#4048)
JakobLichterfeld Jul 6, 2024
a50bc74
use lfp_battery setting in dashboards & speed up updates dashboard (#…
swiffer Jul 7, 2024
aa9ac9e
doc: update changelog
JakobLichterfeld Jul 7, 2024
1ee48c9
feat: update breadcrumb links to use Phoenix path helpers (#4052)
JakobLichterfeld Jul 7, 2024
82ff865
feat: update German translations missing messages (#4054)
JakobLichterfeld Jul 7, 2024
029c53a
build: release v1.30.0
JakobLichterfeld Jul 7, 2024
b935ad8
build: prepare v1.30.1-dev
JakobLichterfeld Jul 7, 2024
188f75b
doc: update changelog
JakobLichterfeld Jul 7, 2024
9be6ade
localized grafana (#4064)
swiffer Jul 8, 2024
b308e28
doc: update changelog
JakobLichterfeld Jul 8, 2024
60135c1
Fix hard coded informations (timezone and orgId) (#4056)
jlestel Jul 8, 2024
45e810b
doc: update changelog
JakobLichterfeld Jul 8, 2024
4c7ec67
doc: update changelog
JakobLichterfeld Jul 8, 2024
57acace
ci: fix coverage report env variable (#4066)
JakobLichterfeld Jul 8, 2024
7d0012e
update zh_hans localized string (#4073)
mrgaolei Jul 10, 2024
4d152a3
downgrade grafana until maps issue in upstream grafana is resolved (#…
swiffer Jul 10, 2024
4f0d5c1
doc: update changelog
JakobLichterfeld Jul 10, 2024
6f201cf
doc: update changelog
JakobLichterfeld Jul 10, 2024
de7c89b
Update default.po for thai (#4072)
tomzt Jul 10, 2024
850579d
doc: update changelog
JakobLichterfeld Jul 10, 2024
df87d93
build: release v1.30.1
JakobLichterfeld Jul 10, 2024
09c815e
Use amap instead of OSM
hipudding Jun 18, 2024
c3d4595
add proc when grafana start
hipudding Jun 23, 2024
dff110b
Create grafana
HZZformGD Jul 16, 2024
bbd0f62
Update and rename grafana to grafana.yml
HZZformGD Jul 16, 2024
3e50f31
Update docker.md
HZZformGD Jul 16, 2024
c159959
Update run_init_sql.sh
HZZformGD Jul 16, 2024
3093c4c
Update battery-health.json
HZZformGD Jul 16, 2024
71275de
Update grafana.yml
HZZformGD Jul 16, 2024
1b5f81a
Update grafana.yml
HZZformGD Jul 16, 2024
beca4fd
Update action.yml
HZZformGD Jul 16, 2024
2adfc32
Update grafana.yml
HZZformGD Jul 16, 2024
c179d2f
Update summary.html.heex
HZZformGD Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions .github/actions/grafana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,29 @@ inputs:
runs:
using: "composite"
steps:
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@v3.2.0
with:
images: ${{ inputs.image }}
tags: ${{ inputs.tags }}
labels: ${{ inputs.labels }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5.0.0
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
with:
context: grafana
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 3 additions & 1 deletion .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
run: mix gettext.extract --check-up-to-date

- name: Spell check
uses: crate-ci/typos@v1.21.0
uses: crate-ci/typos@v1.22.9

- name: Check formatting
run: mix format --check-formatted
Expand Down Expand Up @@ -194,3 +194,5 @@ jobs:
if: github.ref == 'refs/heads/master' && matrix.report_coverage
run: mix coveralls.github
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/grafana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
name: Test Create

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['v1.30.1.amap']

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
grafana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request_target' }}
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/grafana
with:
image: ${{ env.IMAGE_NAME }}/grafana
labels: |
org.opencontainers.image.version=${{ github.ref || github.ref_name }}
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
74 changes: 71 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,90 @@
# Changelog

## [unreleased]
## [1.30.1] - 2024-07-10

This is a hotfix release to work around the map fit problem in the new Upstream Grafana. As soon as a new Grafana version is available, we will update again.

### Improvements and bug fixes

- downgrade grafana until maps issue in upstream grafana is resolved (#4071 - @swiffer)

#### Build, CI, internal

- ci: fix coverage report env variable (#4066 - @JakobLichterfeld)

#### Dashboards

- Configure Grafana to use browser language / date formats (#4064 - @swiffer)
- Fix hard coded information (timezone and orgId) (#4056 - @jlestel)

#### Translations

- update zh_hans localized string (#4073 - @mrgaolei)
- Update default.po for thai (#4072 - @tomzt)

## [1.30.0] - 2024-07-07

As always with many improvements. Cleaner LFP battery handling, 100x speed improvement in dashboards and much, much more. Enjoy it.

### New features

- Track open/close states for individual doors (#3962 - @SaswatPadhi), new MQTT values see [documentation](https://docs.teslamate.org/docs/integrations/mqtt)
- Allow Fleet API users to change client_id (#3984 - @jlestel)
- Customize intervals between vehicle_data calls (#3940 - @jlestel)
- feat: Create NixOS module (#3998 - @scottbot95)
- feat: Add ability to enable and disable data collection for cars (#3993 - @mark3-dev)
- publish center_display_state to mqtt (#3813 - @Atrox), new MQTT values see [documentation](https://docs.teslamate.org/docs/integrations/mqtt)
- feat: add LFP Battery setting for car settings (#4007 -@cwanja)
- Add icon to summary when Sentry Mode is triggered and recording (#4043 -@kolaCZek)

### Improvements and bug fixes

- Update vehicle.ex with marketing name for Model Y Long Range RWD (#3989 - @stefanlange)
- feat: use Grafana 11.1.0 (#4019 - @swiffer)
- Update vehicle.ex with marketing name for Model Y SR (#4042 - @kolaCZek)
- feat: update breadcrumb links to use Phoenix path helpers (#4052 - @JakobLichterfeld)

#### Build, CI, internal

- build(deps): bump crate-ci/typos from 1.21.0 to 1.22.9 (#4021)
- build(deps): bump express from 4.18.2 to 4.19.2 in /website (#3790)
- chore: update @docusaurus/core and @docusaurus/preset-classic dependencies to v3.4.0 and react and react-dom to 18.3.1 (#4046 - @JakobLichterfeld)
- build: specify node.js version for Netlify in base dir as latest lts major version (#4046 - @JakobLichterfeld)
- style: fix single quoted string in car_live (#4049 - @JakobLichterfeld)

#### Dashboards

- Improve drive details (#4004 - @jheredianet)
- Improve visualizations on Battery Health dashboard (#4005 - @jheredianet)
- Update drives.json: show drives with duration=0 but distance>0 (#3867 - @DrMichael)
- Improve performance of timeline dashboard (#4019 - @swiffer)
- Fix detection of missing data (geofence condition) in timeline dashboard (#4019 - @swiffer)
- Fix time filter for links to trip dashboard in timeline dashboard (#4019 - @swiffer)
- Reduce number of queries executed in overview dashboard to increase performance (#4019 - @swiffer)
- Ensure Index usage when getting temperatures in overview dashboard (#4019 - @swiffer)
- re-enable time picker by default in drive-details, charge-details dashboards (#3985)
- Improve "Charges" dashboard (#4031 - @jheredianet)
- Improve "Drives" dashboard (#4033 - @jheredianet)
- Update overview.json: Add Distance (#4034 - @DrMichael)
- Update overview.json: fix Net (#4045 - @DrMichael)
- update overview dashboard to fix units for energy consumption (#4048 - @JakobLichterfeld)
- use lfp_battery setting in dashboards & speed up updates dashboard (#4051 - @swiffer)

#### Translations

- feat: update German translations missing messages (#4054 - @JakobLichterfeld)

#### Documentation

- doc: remove outdated, unsupported, unmaintained portainer doc (#3972 - @JakobLichterfeld)
- doc: fix MMM-Teslamate and ha-addon-teslamate project links (#3973 - @olexs)
- doc: update the Contributor's Guide with the latest requirements (#4017 - @JakobLichterfeld)
- doc: Documentation for new endpoint changes (#3978 - @jlestel)
- doc: Add Grafana VS Code extension documentation (#4025 - @JakobLichterfeld)
- doc: fix markdown linter warnings in faq (#4046 - @JakobLichterfeld)
- doc: fix typo in MQTT location JSON format (#4047 - @JakobLichterfeld)

## [1.29.2]
## [1.29.2] - 2024-06-18

This release improve TeslaMate behavior on Tesla API rate limits, which occur from time to time. We respect the retry-after header on 429 response code to not hammer the API unnecessarily in these cases.

Expand Down Expand Up @@ -1987,7 +2054,8 @@ New users need to sign in via the web interface.

## [1.0.0] - 2019-07-25

[unreleased]: https://github.com/teslamate-org/teslamate/compare/v1.29.2...HEAD
[1.30.1]: https://github.com/teslamate-org/teslamate/compare/v1.30.0...v1.30.1
[1.30.0]: https://github.com/teslamate-org/teslamate/compare/v1.29.2...v1.30.0
[1.29.2]: https://github.com/teslamate-org/teslamate/compare/v1.29.1...v1.29.2
[1.29.1]: https://github.com/teslamate-org/teslamate/compare/v1.29.0...v1.29.1
[1.29.0]: https://github.com/teslamate-org/teslamate/compare/v1.28.5...v1.29.0
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A powerful, self-hosted data logger for your Tesla.

## Documentation

The documentation is available at [docs.teslamate.org](https://docs.teslamate.org/).
The documentation is available at [https://docs.teslamate.org](https://docs.teslamate.org/)

## Features

Expand Down Expand Up @@ -50,9 +50,12 @@ The documentation is available at [docs.teslamate.org](https://docs.teslamate.or

## Screenshots

![Drive Details](/website/static/screenshots/drive.png)
![Web Interface](/website/static/screenshots/web_interface.png)

![Drive Details](/website/static/screenshots/drive.png)

![Battery Health](/website/static/screenshots/battery-health.png)

<p align="center">
<strong><a href="https://docs.teslamate.org/docs/screenshots">MORE SCREENSHOTS</a></strong>
</p>
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.29.3-dev
1.30.1
37 changes: 34 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
};

outputs = inputs@{ self, nixpkgs, flake-utils, devenv }:
flake-utils.lib.eachDefaultSystem (system:
(flake-utils.lib.eachDefaultSystem (system:
let
inherit (pkgs.lib) optional optionals;
pkgs = nixpkgs.legacyPackages.${system};
Expand All @@ -17,7 +17,7 @@
beamPackages = pkgs.beam.packagesWith pkgs.beam.interpreters.erlang;

src = ./.;
version = "0.0.0";
version = builtins.readFile ./VERSION;
pname = "teslamate";

mixFodDeps = beamPackages.fetchMixDeps {
Expand Down Expand Up @@ -79,6 +79,9 @@
mix phx.digest --no-deps-check
'';

meta = {
mainProgram = "teslamate";
};
};

postgres_port = 7000;
Expand Down Expand Up @@ -153,11 +156,39 @@
}];

};

moduleTest = (nixpkgs.lib.nixos.runTest {
hostPkgs = pkgs;
defaults.documentation.enable = false;
imports = [{
name = "teslamate";
nodes.server = {
imports = [ self.nixosModules.default ];
services.teslamate = {
enable = true;
secretsFile = builtins.toFile "teslamate.env" ''
ENCRYPTION_KEY=123456789
DATABASE_PASS=123456789
RELEASE_COOKIE=123456789
'';
postgres.enable = true;
grafana.enable = true;
};
};

testScript = ''
server.wait_for_open_port(4000)
'';
}];
}).config.result;
in {
packages = {
devenv-up = devShell.config.procfileScript;
default = pkg;
};
devShells.default = devShell;
});
checks.default = moduleTest;
})) // {
nixosModules.default = import ./module.nix { inherit self; };
};
}
11 changes: 10 additions & 1 deletion grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ensure selecting a tag that is available for arm/v7, arm64, and amd64
# https://hub.docker.com/r/grafana/grafana/tags
FROM grafana/grafana:11.0.0
FROM grafana/grafana:11.0.1

ENV GF_ANALYTICS_REPORTING_ENABLED=false \
GF_AUTH_ANONYMOUS_ENABLED=false \
Expand All @@ -10,9 +10,14 @@ ENV GF_ANALYTICS_REPORTING_ENABLED=false \
GF_SECURITY_ALLOW_EMBEDDING=true \
GF_SECURITY_DISABLE_GRAVATAR=true \
GF_USERS_ALLOW_SIGN_UP=false \
GF_USERS_DEFAULT_LANGUAGE=detect \
GF_DATE_FORMATS_USE_BROWSER_LOCALE=true \
DATABASE_PORT=5432 \
DATABASE_SSL_MODE=disable

USER root
RUN apk update && apk add --no-cache postgresql-client

USER grafana

COPY logo.svg /usr/share/grafana/public/img/grafana_icon.svg
Expand All @@ -24,5 +29,9 @@ COPY dashboards.yml /etc/grafana/provisioning/dashboards/
COPY dashboards/internal/*.json /dashboards_internal/
COPY dashboards/reports/*.json /dashboards_reports/
COPY dashboards/*.json /dashboards/
COPY proc.sql /proc.sql
COPY run_init_sql.sh /run_init_sql.sh

ENTRYPOINT ["bash", "/run_init_sql.sh"]

EXPOSE 3000
Loading