Skip to content

Commit

Permalink
fix: fix mlat version to correct repo
Browse files Browse the repository at this point in the history
- correctly use wiedehopf version as per e4aec84
- update to latest version of mlat-client
- update to bookworm for mlat-client image
- add readme item for custom mlat-client
  • Loading branch information
shawaj committed Jan 3, 2025
1 parent 98c3ec0 commit 9e054f6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ Software packages downloaded, installed, and configured by the balena-ads-b scri
- [Part 12 – Exploring flight traffic locally on your device](#part-12--exploring-flight-traffic-locally-on-your-device)
- [Part 13 – Advanced configuration](#part-13--advanced-configuration)
* [Disabling specific services](#disabling-specific-services)
* [Using different radio device types](#using-different-radio-device-types)
* [Adaptive gain configuration](#adaptive-gain-configuration)
* [Setting dump1090 antenna gain](#setting-dump1090-antenna-gain)
* [Device reboot on service exit](#device-reboot-on-service-exit)
* [Automatic balenaOS host updates](#automatic-balenaos-host-updates)
* [Custom MLAT client](#custom-mlat-client)
- [Part 14 – Updating to the latest version](#part-14--updating-to-the-latest-version)

# Part 1 – Build the receiver
Expand Down Expand Up @@ -461,11 +465,19 @@ dump978 and dump1090 can restart the device if it hits an error. You can enable

## Automatic balenaOS host updates

Automatically keep your balenaOS host release up-to-date. To enable this service, create a *Device Variables* named `ENABLED_SERVICES` with the value of `autohupr`.
Automatically keep your balenaOS host release up-to-date. To enable this service, create a *Device Variables* named `ENABLED_SERVICES` with the value of `autohupr`. You may also want to set the following *Device Variables*:

- `HUP_CHECK_INTERVAL`: Interval between checking for available updates. Default is 1d.
- `HUP_TARGET_VERSION`: The OS version you want balenaHUP to automatically update your device to. This is a required variable to be specified, otherwise, an update won't be performed by default. Set the variable to 'latest'/'recommended' for your device to always update to the latest OS version or set it to a specific version (e.g '2.107.10').

## Custom MLAT client

In the [docker compose file]([https://github.com/ketilmo/balena-ads-b/blob/shawaj/mlat-version/docker-compose.yml](https://github.com/ketilmo/balena-ads-b/blob/master/docker-compose.yml#L258-L271)) you will notice at the bottom there is a section labelled `Optional: Uncomment to enable custom mlat server.` This allows you to share MLAT data with an MLAT server of your choosing, unrelated to any of the above services.

In order to enable this, you will need to fork the repo and edit the docker-compose.yml file to remove the `#` at the beginning of each line starting with the one that says `mlat-client`. Once done you should save the file, and then you can deploy it to your fleet using the manual method described above in [Part 2 – Setup balena and configure the device](#part-2--setup-balena-and-configure-the-device).

You will also need to add *Device Variables* named `MLAT_CLIENT_USER` with a value of your desired username or UUID and another one named `MLAT_SERVER` with a value or your desired MLAT server address and port. For example you might have an `MLAT_CLIENT_USER` of `0327791e-3777-40a5-addc-aa13408d3b07` and an `MLAT_SERVER` of `feed.mymlatserver.com:31090`.

# Part 14 – Updating to the latest version
Updating to the latest version is trivial. If you installed balena-ads-b using the blue Deploy with balena-button, you can click it again and overwrite your current application. Choose the "Deploy to existing fleet" option, then select the fleet you want to update. All settings will be preserved. For convenience, the button is right here:

Expand Down
7 changes: 4 additions & 3 deletions adsb-exchange/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ FROM base AS buildstep

# renovate: datasource=github-tags depName=wiedehopf/readsb versioning=loose
ARG READSB_VERSION=v3.14.1645
# renovate: datasource=github-tags depName=adsb-related-code/mlat-client versioning=loose
ARG MLAT_VERSION=v0.4.2
# renovate: datasource=git-refs depName=wiedehopf/mlat-client versioning=loose
ARG MLAT_VERSION=3f0bfb8c5202afb3a9a827ec9d2e82cac4f12819
ARG TEMP_INSTALL="git build-essential debhelper libncurses5-dev zlib1g-dev python3-dev libzstd-dev pkg-config"

WORKDIR /tmp

RUN apt update && \
apt install -y $TEMP_INSTALL

RUN git clone --depth 1 --branch $MLAT_VERSION https://github.com/adsb-related-code/mlat-client && \
RUN git clone --single-branch https://github.com/wiedehopf/mlat-client && \
cd mlat-client && \
git checkout ${MLAT_VERSION} && \
python3 -m venv /usr/local/share/adsbexchange/venv/ && \
/usr/local/share/adsbexchange/venv/bin/python3 setup.py build && \
/usr/local/share/adsbexchange/venv/bin/python3 setup.py install
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ services:
# - LON=
# - ALT=
# - MLAT_CLIENT_USER=
# - MLAT_SERVER=
# labels:
# io.balena.features.supervisor-api: '1'

Expand Down
9 changes: 5 additions & 4 deletions mlat-client/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM balenalib/%%BALENA_ARCH%%-debian:bullseye AS base
FROM balenalib/%%BALENA_ARCH%%-debian:bookworm AS base
LABEL maintainer="https://github.com/ketilmo"

ENV LAT=
Expand All @@ -18,17 +18,18 @@ RUN apt update && \

FROM base AS buildstep

# renovate: datasource=github-tags depName=adsb-related-code/mlat-client versioning=loose
ARG MLAT_VERSION=v0.4.2
# renovate: datasource=git-refs depName=wiedehopf/mlat-client versioning=loose
ARG MLAT_VERSION=3f0bfb8c5202afb3a9a827ec9d2e82cac4f12819
ARG TEMP_INSTALL="build-essential debhelper python3-dev git"

RUN apt update && \
apt install -y $TEMP_INSTALL

WORKDIR /tmp

RUN git clone --depth 1 --branch $MLAT_VERSION https://github.com/wiedehopf/mlat-client/ && \
RUN git clone --single-branch https://github.com/wiedehopf/mlat-client && \
cd mlat-client && \
git checkout ${MLAT_VERSION} && \
python3 -m venv /usr/local/share/mlat-client/venv/ && \
/usr/local/share/mlat-client/venv/bin/python3 setup.py build && \
/usr/local/share/mlat-client/venv/bin/python3 setup.py install
Expand Down
9 changes: 9 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@
"matchStrings": ["OPENSKY_VERSION=(?<currentValue>.*?)\\n"],
"depNameTemplate": "opensky",
"datasourceTemplate": "custom.opensky"
},
{
"customType": "regex",
"fileMatch": ["(^|/)Dockerfile\\.[^/]*$"],
"matchStrings": ["MLAT_VERSION=(?<currentDigest>.*?)\\n"],
"currentValueTemplate": "master",
"depNameTemplate": "wiedehopf/mlat-client",
"packageNameTemplate": "https://github.com/wiedehopf/mlat-client",
"datasourceTemplate": "git-refs"
}
],
"customDatasources": {
Expand Down

0 comments on commit 9e054f6

Please sign in to comment.