Commit Graph
23 Commits
Author SHA1 Message Date
Brian May 2f68de0e7b fix: update dependancy hash in nix build (#4469) 2025-01-04 11:08:49 +11:00
Brian MayandJakob Lichterfeld e68893befc feat: improve logging messages (#4467)
changes from @micves from #3262

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2025-01-03 08:32:51 +01:00
Brian May 7a96e31910 build(nix): switch to nixos-24.11 (#4420) 2024-12-05 07:37:09 +11:00
Brian May 3c69df8412 fix(nix): wait for mosquitto to start before starting teslamate (#4419)
After reboot, I noticed a number of errors from teslamate, because it
started before mosquitto started.
2024-12-04 15:39:41 +01:00
Brian May ddfc979fbd ci: create PR to udpate flake.lock every saturday (#4372) 2024-11-13 09:00:12 +01:00
Brian May 93cc34437c fix(nix): bump hash for dependencies (#4371) 2024-11-11 08:34:18 +11:00
Brian May a4f47518d8 fix: Avoid the need for impure for devenv (#4245)
Based on https://github.com/cachix/devenv/pull/1018/files
2024-10-06 08:35:54 +02:00
Brian May 4f58d2ff14 fix: add nix module option to specify postgres package (#4227)
Without this upgrading postgres - which must be done manually - is
likely to be painful.

For postgresql upgrade instructions see
https://nixos.org/manual/nixos/stable/#module-services-postgres-upgrading
2024-10-01 07:39:17 +10:00
Brian May ea154d6fa4 chore: update mix dependancy hash in nix flake (#4223) 2024-09-23 11:20:58 +10:00
Brian May c684252940 Publish extra active_route fields to mqtt output (#3789)
This refactors the existing code to make it more maintainable.

Nil values are published as "nil" string. This ensures that they will
get published, and ensures that MQTT doesn't drop the retained data.

Fixes #3748
2024-04-05 17:29:00 +11:00
Brian May cd9c9c80d4 Fix broken link from Docker page to upgrading page (#3794)
I think this was broken in dbf23faa31.

Also remove link from header, seems redundant.
2024-03-30 15:40:31 +01:00
Brian May e5b2c12449 Update to latest devenv in nix flake (#3760)
Latest version - after rewrite in Rust - just released yesterday is much
nicer and has fewer bugs.

For example, it now uses process-compose which is full screen interface
for showing running processes.

Blog post: https://devenv.sh/blog/2024/03/20/devenv-10-rewrite-in-rust/
2024-03-22 09:16:47 +11:00
Brian May 2b5cdbdffd Add nix flake (#3485)
This will add support for nix flakes. Which really helps with my
development on nixos. This has two basic parts:

1. DEVELOPMENT

After this you can use the following commands on computer with nix and a
patched version of direnv:

direnv allow
devenv up

And it will automatically start and instance of postgresql and mosquitto
for development.

And the environment variables are already configured for teslamate.

So then can start teslamate with:

npm install --prefix ./assets && npm run deploy --prefix ./assets
iex -S mix phx.server

This part is all working as designed. And pretty simple and straight
forward.

2. NIX PACKAGE OF TESLA

This is 99% complete, but some pain points I haven't addressed yet.
Because I don't yet know of good solutions.

* There are two checksums in flake.nix that needs to be updated whenever
  mix.lock or package-lock.json changes.
2024-03-19 09:37:17 +01:00
Brian MayandJakob Lichterfeld b5285d2ace Add location topic (lat and long in one json blob) (#3729)
* Add location topic

Fixes #3660.

* doc: update mqtt topics with new location topic

---------

Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-03-18 08:36:21 +01:00
Brian May cdd6298f55 Replace tortoise library with tortoise311 (#3697) 2024-03-16 11:55:04 +01:00
Brian May 8353b8e988 Make tests non-async (#3738)
It appears to fix most of the random test errors.

Fixes: #3736
2024-03-15 09:09:05 +11:00
Brian May b643b45ca0 Add charging_state to VehicleSummary (#3471)
* Add charging_state to VehicleSummary

Fixes: #3078

* WIP
2023-11-23 09:06:51 +01:00
Brian May 40fcda6ccb Add credo lint support (#3452) 2023-11-22 12:49:28 +01:00
Brian May 6d0405dbff Add charging_state to VehicleSummary (#3087)
Fixes: #3078
2023-11-16 16:20:11 +01:00
Brian May 96b836e2e3 Update pr0ps-trackmap-panel version in docs (#3385)
Fixes #3383
2023-11-13 07:12:43 -06:00
Brian May 4a11ef8421 If no geofence is found map then use default value (#2564)
This is required because the default value is "" which tells the mqtt
server to delete the retained value.

This in turn means that applications that care about when the car is in
a unknown location will not get the retained value.

This is a bit different from all of the other values in
`@always_published`. For them "" is only published if the value is
unknown or an error occurred. So it makes sense to delete the retained
value.

In this case however, a value of "" generally means "the car is outside
any known geofence" which is a valid condition it itself, and it should
be retained.

There was speculation this might affect the shift_state, but
unfortunately this was not followed up with any evidence or details. #1912

There are any number of solutions that could be deployed here. The
advantage of this solution however is it is not going to break anything
unless you specifically define the TESLAMATE_DEFAULT_GEOFENCE variable.

Fixes: #1336
2022-07-15 10:59:46 +02:00
Brian May 4f1d998f41 Simplify plugged_in check (#1423)
Avoid false disconnected events.

Fixes #1221
2021-03-13 11:32:57 +01:00
Brian May 3cd19f1ac3 Add health check (#1422)
See https://blog.jola.dev/health-checks-for-plug-and-phoenix
2021-03-10 19:51:26 +01:00