Giter VIP home page Giter VIP logo

sdr-enthusiasts / docker-acarshub Goto Github PK

View Code? Open in Web Editor NEW
60.0 7.0 17.0 11.13 MB

Docker container to utilize RTLSDR dongle(s) to view/stream ACARS/VDLM2 aircraft data transmissions

License: GNU General Public License v3.0

Shell 4.91% Python 24.33% JavaScript 28.66% CSS 4.17% TypeScript 37.21% Dockerfile 0.71%
acars docker-container docker rtlsdr libacars acarsdec vdlm2 aircraft planes stream-acars rtlsdr-dongle airframes vdlm2dec

docker-acarshub's Introduction

sdr-enthusiasts/acarshub

Banner

GitHub Workflow Status Discord

Docker container to view ACARS, VDLM2 and HFDL messages.

We make extensive use of the airframes work to make the messages more 'human-readable' as well as provide more detail for each of the messages.

Builds and runs on amd64, arm64, arm/v7, arm/v6 and 386 architectures.

Table of Contents

Users of v2 that need to migrate to v3

Please see this for an example docker-compose.yaml file to get you started. You should be able to copy/paste values quickly over in to the new config and be up and running very quickly.

IMPORTANT NOTE FOR BUSTER USERS

Please see this if you encounter RTC/Real Time Clock issues.

Pre-requisites/Totally new to docker but you think this looks cool

Welcome! New to docker but you love the idea of monitoring ACARS and/or ADSB data? You will to prepare your system to run this, but it's super easy!

You will need the following:

  • A Linux computer capable of running docker with the system installed and running. I personally recommend a raspberry Pi
  • At least one RTL-SDR Dongle. Two if you want to listen to both ACARS and VDLM. Something like this, although other kinds do work.
  • Docker and docker-compose installed. Please see installing docker and docker compose for help with that, and come back here when you're ready.

Supported tags and respective Dockerfiles

  • latest (master branch, Dockerfile.acarshub)
  • latest_nohealthcheck (masterbranch,Dockerfile.acarshub` patched to remove Heathcheck)
  • version specific (master branch at the time of build, Dockerfile.acarshub)
  • version specific no healthcheck (master branch at the time of build, Dockerfile.acarshub)

Thanks

Thanks to mikenye for his excellent ADSB docker containers from which I shamelessly copied a lot of the ideas for setting up the docker container, as well as his excellent work to move this project from its humble beginnings to what it is now.

Additional thanks goes to the folks over at airframes.io for their tireless work in figuring out what all of these ACARS messages mean and making their work available in usable packages.

I am missing a boat load of people who have provided feed back as this project has progressed, as well as contributed ideas or let me bounce thoughts off of them. You've all molded this project and made it better than I could have done on my own.

Getting valid ACARS/VDLM2 data

External to ACARS Hub you need to be running an ACARS, VDLM2, HFDL, Inmarsat L-Band and/or Iridium decoder for ACARS Hub, and have that decoder connect to ACARS Hub to send over the messages for processing.

The following decoders are supported:

  • acarsdec or one of the forks of acarsdec. I suggest the airframes fork. Run the decoder with the option -j youracarshubip:5550, ensuring that port 5550 is mapped to the container if the source is external to your docker network.
  • dumpvdl2. Run the decoder with the option --output decoded:json:udp:address=<youracarshubip>,port=5555, ensuring that port 5555 is mapped to the container if your source is external to the docker network.
  • vdlm2dec. Run the decoder with the option -j youracarshubip:5555, ensuring that port 5555 is mapped to the container if the source is external to the docker network.
  • dumphfdl. Run the decoder with the option --output decoded:json:udp:address=<youracarshubip>,port=5556, ensuring that port 5556 is mapped to the container if the source is external to the docker network.
  • satdump. Run the decoder with the Inmarsat.json options for udp_sinks set to "address": "127.0.0.1" and "port": "5557" , ensuring that port 5557 is mapped to the container.
  • JAERO. Run the decoder with the JSONdump format for UDP output.
  • gr-iridium and iridium-toolkit. Pipe the output of reassembler.py into something like nc -u acarshub 5558.

For VDLM decoding dumpvdl2 is preferred as the decoder provides richer data and is more modern than vdlm2dec.

For ease of use I have provided docker images set up to work with ACARS Hub. This is the preferred way to get data in to ACARS Hub.

  • docker-acarsdec for ACARS decoding.
  • docker-dumpvdl2 for VDLM decoding. This is the preferred decoder.
  • docker-vdlm2dec as an alternative for VDLM decoding. This decoder is far less feature-rich compared to dumpvdl2 and is provided only as an alternative if you have a strong preference for using this over dumpvdl2.
  • docker-dumphfdl for HFDL decoding.
  • docker-satdump for Inmarsat L-Band decoding.
  • docker-jaero for Inamrsat L-Band decoding.
  • docker-gr-iridium-toolkit for Iridium decoding.
  • acars_router for routing ACARS messages from one source to another. This is useful if you have a decoder that can only send messages to one destination, but you want to send messages to multiple destinations. This is the preferred way to get data in to ACARS Hub.

Up-and-Running

The document below covers a lot of configuration options, however, most of them are not needed to get started. Please see this for an example docker-compose.yaml file that should get you off the ground.

Ports

Port Description
80 Port used for the web interface
5550/udp Port used for pushing ACARS JSON data to
5555/udp Port used for pushing VDLM2 JSON data to
5556/udp Port used for pushing HFDL JSON data to
5557/udp Port used for pushing Inmarsat L-Band JSON data to
5558/udp Port used for pushing Iridium JSON data to
15550 Port used for exposing JSON ACARS data
15555 Port used for exposing JSON VDLM2 data
15556 Port used for exposing JSON HFDL data
15557 Port used for exposing JSON Inmarsat L-Band data
15558 Port used for exposing JSON Iridium data

Volumes / Database

It is recommended to give the container a volume so that database and message data is persisted between container restarts/upgrade. If you wish to persist this database between container restarts, mount a volume to /run/acars/.

The database is used on the website for various functions. It is automatically pruned of data older than 7 days old.

The reality of running any kind of database on a Pi is that database performance can be lacking. I have found that a database that has seven days worth of data, on a moderately busy site like mine, can reach file sizes of 17Mb and have 112,000+ rows of data. In other words, an awful lot of data, and with database sizes that large you will see a degradation in search performance. Queries might take a few seconds to execute after you type your search terms on the search page.

If you set DB_SAVEALL to a blank value you will gain back a lot of performance because messages with no informational value won't be stored. The trade-off in disabling saving all messages means you won't have all messages logged which may or may not be important to you.

It is also recommended you use a tmpfs mount to reduce SD card writes.

Environment variables

There are quite a few configuration options this container can accept.

General

Variable Description Required Default
FEED Used to toggle feeding to ACARS.io. Set to true to enable feeding. No false
ENABLE_WEB Enable the web server. true to enable, any other value will disable it. No true
DB_SAVEALL By default the container will save all received messages in to a database, even if the message is a blank message. If you want to increase performance/decrease database size, set this option to false to only save messages with at least one informationial field. No true
DB_SAVE_DAYS By default the container will save message data for 7 days. If you wish to over-ride this behavior, set this to the number of days you wish to have retained. No 7
DB_ALERT_SAVE_DAYS By default the container will save message data for 120 days. If you wish to over-ride this behavior, set this to the number of days you wish to have retained. No 120
DB_BACKUP If you want to run a second database for backup purposes set this value to a SQL Alchemy formatted URL. See the link for supported DB types. This database will have to be managed by you, as ACARS Hub will only ever write incoming data to it. No Blank
IATA_OVERRIDE Override or add any custom IATA codes. Used for the web front end to show proper callsigns; See below on formatting and more details why this might be necessary. No Blank
TAR1090_URL Flights where the container is able to, it will generate a link to a tar1090 instance so that you can see the position of the aircraft that generated the message. By default, it will link to ADSB Exchange, but if desired, you can set the URL to be a local tar1090 instance. No Blank
AUTO_VACUUM If you find your database size to be too large you can temporarily enable this and on the next container startup the database will attempt to reduce itself in size. When you do this startup time will take a few minutes. It is recommended to leave this flag disabled and only enable it temporarily. No False
ALLOW_REMOTE_UPDATES If you do not want to allow users to update the alert terms (and potentially other things in the future) via the web interface, set this to False No True
FLIGHT_TRACKING_URL If you want to link to a flight tracking site other than Flight Aware, set this to the URL of the site you want to link to. The url should be formatted to accept tail numbers at the end of the URL. No Blank

Please note that for TAR1090_URL the required format is http[s]://**HOSTNAME** only. So if your tar1090 instance is at IP address 192.168.31.10 with no SSL, the TAR1090_URL would look like http://192.168.31.10

Logging

By default ACARS Hub will only show errors, warnings, and other kinds of critical messages in the logs. This can be changed by setting MIN_LOG_LEVEL to a higher number.

All processes are logged to the container's stdout. General logging can be viewed with docker logs [-f] container.

Variable Description Required Default
MIN_LOG_LEVEL Acceptable values are 3-5. 3 is Warnings/Critical/Errors, 4 adds Informational messages and 5 adds everything previous plus debug messages. No 3
QUIET_MESSAGES By default the decoders will not output their received messages to the container logs. If you want to see these messages in the logs set QUIET_MESSAGES to false. No true

ADSB

The ACARS Hub website contains the ability to display ADSB targets along side ACARS messages. To enable this feature you need to have an available aircraft.json file generated from readsb and available on tar1090webserverurl/data/aircraft.json. Mike Nye's tar1090 is the recommended container to run to easily get this data. By turning this on you will get a map that shows the ADSB targets picked up by your readsb instance and enable you to click on planes to see what messages they've sent.

The following options will set the options for ADSB

Variable Description Required Default
ENABLE_ADSB Turns on ADSB in ACARS Hub Yes, if you want to monitor ADSB false
ADSB_URL The IP address or URL for your tar1090 instance No (see note below) http://tar1090/data/aircraft.json
ADSB_LAT The latitude of your ADSB site No, but recommended 0
ADSB_LON The longitude of your ADSB site No, but recommended 0
DISABLE_RANGE_RINGS Turn off range rings on your map. Set to true to disable range rings. No false

If you run Mike's tar1090 container on the same machine as ACARS Hub then the default value for ADSB_URL is fine. If you don't, the formatting for ADSB_URL should be the full URL path to aircraft.json from your readsb source.

If you desire enhanced ADSB and ACARS message matching and thus show coloured aircraft icons on Live Map, and are running Mike's tar1090 container, you can enable the following option:

- TAR1090_ENABLE_AC_DB=true

In the configuration options for tar1090. Setting this will include additional aircraft information in the aircraft.json file that is not normally part of the ADSB broadcast, such as the aircraft's tail number and aircraft type. Please enable this with caution: there is increased memory usage in the tar1090 container so RAM constrained systems should be cautious enabling this.

ACARS

Variable Description Required Default
ENABLE_ACARS Toggle ACARS decoding on. If set to external this will enable ACARS processing in the container. Push valid ACARS json data to UDP port 5550 (needs port mapping 5550:5550/udp). No false

VDLM2

Variable Description Required Default
ENABLE_VDLM Toggle VDLM decoding on. If set to external this will enable VDLM processing in the container. Push valid VDLM2 data to UDP port 5555 (needs port mapping 5555:5555/udp). No false

HFDL

Variable Description Required Default
ENABLE_HFDL Toggle HFDL decoding on. If set to external this will enable HFDL processing in the container. Push valid HFDL data to UDP port 5556 (needs port mapping 5556:5556/udp). No false

Inmarsat L-Band

Variable Description Required Default
ENABLE_IMSL Toggle Inmarsat L-Band decoding on. If set to external this will enable IMSL processing in the container. Push valid IMSL data to UDP port 5557 (needs port mapping 5557:5557/udp). No false

Iridium

Variable Description Required Default
ENABLE_IRDM Toggle Iridium decoding on. If set to external this will enable IRDM processing in the container. Push valid IRDM data to UDP port 5558 (needs port mapping 5558:5558/udp). No false

Viewing the messages

The container implements a basic web interface, listening on port 80, which will show messages as they are received.

If QUIET_MESSAGESis disabled, received messages are also logged to the container log.

Which frequencies should you monitor

The ACARS.io/Airframes.io website has a great list of community derived frequencies that aircraft typically will broadcast ACARS/VDLM on, and what regions those are applicable to. The values provided in the example docker-compose/docker run example above are frequencies I have found to be good in the United States, with a decent level of traffic. I imagine the list is not complete, and could be refined better.

Some notes about frequencies:

  • acarsdec is limited to monitoring 16 frequencies apiece, while dumpvdl2 has no limit besides your available processing power
  • The spread of frequencies for each decoder has to be within 2 Mhz.

A note about data sources used for the web site

A brief primer on some terms:

  • All ACARS/VDLM broadcasts that have a callsign appended to the message will use a two letter airline code

  • IATA is a two letter airline identification code. Many airlines don't actually have an IATA code and use their own internal code.

  • ICAO is an international standard, unique-across-the-world three letter airline code.

In order to make the website more usable, I have included a database used by the container to convert the two airline codes used in the messages from IATA to ICAO codes, and to show their long-form name. This data was found from public, free sources. The data had some errors in it, some of which was due to the age of the data, and some of it is due to airlines not always using the correct IATA codes in their broadcoast messages.

My observations are US centric, but from what I have seen there are "errors" you might notice in the converted callsigns.

  • US Airlines that have acquired airlines as part of mergers (for instance, American Airlines/AA/AAL, who has, among others, merged with America West/US/AWE) would show up as their legacy callsign if the aircraft being picked up was part of the airline that was merged in to the bigger airline. I've selectively fixed some of these errors because the IATA code of the legacy airline was not in use by anyone else.

  • Some airlines (UPS and FedEx, particularlly, among others) don't use their designated IATA callsigns period, or seem to be using contracted planes which are using an alternative two letter airline code in their message.

  • There are three IATA code regions that cover the world. If an airline flies only in one region, and another flies in a separate region, those airlines are allowed to use the same IATA code. The airline code generated from the database might use the wrong IATA code because of this.

So what this means is you will occasionally see callsigns on the web front end that are wrong. The above mentioned UPS will show up BHSxxxx/BahamasAir which is obviously not right, at least for my part of the world. I am hesitant to "fix" too many of these "errors" in the database because this container is being used all around the world.

The end result of this is that in messages where the airline code is improperly mapped the Flight Aware link generated will lead to the wrong flight. The TAIL link generated should be correct.

The Fix

If you add in the ENV variable IATA_OVERRIDE you can change your local web site to display the correct airline for your region.

Formatting is as follows: IATA|ICAO|Airline Name

If you have multiple airlines you wish to override, you add in a ; between them, such as the following: UP|UPS|United Parcel Service;US|AAL|American Airlines

For anyone in the US, I suggest adding IATA_OVERRIDE=UP|UPS|United Parcel Service to start out with.

If there are airlines you notice that are wrong because the data used is wrong (IATA codes do change over time as airlines come and go), or airlines that are missing from the database that do have an IATA code, submit a PR above and I'll get it in there!

Accessing ACARS/VDLM data with external programs

If you wish to access the JSON data that the decoders acarsdec and dumpvdl2 generate with an external program expose the following ports in your docker-compose configuration:

  • Port 80 for the web site
  • Port 15558 for UDP Iridium JSON
  • Port 15557 for UDP Inmarsat L-Band JSON
  • Port 15556 for UDP HFDL JSON
  • Port 15555 for UDP VDLM2 JSON
  • Port 15550 for UDP ACARS JSON

YAML Configuration for Ports

ports:
  - 80:80
  - 5550:5550/udp
  - 5555:5555/udp
  - 5556:5556/udp
  - 5557:5557/udp
  - 5558:5558/udp
  - 15550:15550
  - 15555:15555
  - 15556:15556
  - 15557:15557
  - 15558:15558

And then you will be able to connect to yourpisipaddress:15555 or yourpisipaddress:15550 respectively, in whatever program can decode ACARS/VDLM JSON.

Website tips and tricks

  • On the Live Message page pressing the p key on your keyboard will pause the message updates so you can catch up. Pressing p again will cause the page to refresh again and display messages as they come in.
  • On the search page enter your search terms and then press enter to start the search.

Future improvements

ACARS decoding appears to be in active development, and as such, I expect a lot of movement in data-visualization and presentation to happen. This container will follow those developments and add in functionality as it appears.

The following features are in active development:

  • A fresh new look to the website
  • Desktop application to view the data

Getting Help

You can log an issue on the project's GitHub or visit the discord server.

docker-acarshub's People

Contributors

dependabot[bot] avatar dziban303 avatar fredclausen avatar iakat avatar kuupaork avatar kx1t avatar mikenye avatar phaeton avatar rpatel3001 avatar wiedehopf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-acarshub's Issues

Welcome to Version 2.0

Welcome to Version 2.0 :)

Rather than a super-long discord message I thought it would be easier to just put this on GitHub. I've been hard at work on version 2 and it is finally time to let it out of the nest for testing. I expect, considering the huge amount of code that has been changed on the website that this will be a little buggy and require some time to get back to the stable standard that we've enjoyed with 1.x. If you find you have too many issues there are no breaking changes that will preclude you from jumping back to :latest.

The main goal for v2.0 has been to make the website more cohesive, usable on mobile, within the limits of my abilities improve the appearance, and implement "Project Eagle". More on that below.

New features that everyone will care about

  • Site is now single page. No loading as you switch tabs.
  • Mobile should now be a much better experience.
  • Page settings / interactions are now in a pop up box, accessed via the "Page Settings" link on the banner.
  • Tool tips are now actually good and not ugly! (I am way too excited about this)
  • If a message matches your alert terms you will get a notification on screen
  • Message tabs now dynamically size themselves to your screen width

New features, but for nerds

  • Javascript has been moved over to typescript
  • New build setup, including pre-commit hooks to enforce language norms and using npm
  • Moved base image from debian-slim to debian-sid, which means we have Python 3.9 and newer packages all around
  • Updates all 3rd party code libraries (CSS/JS) to more recent versions. Before final release I will go through again and make sure we're all up to date.
  • There is now a "testing" build target and a "production" build target. Right now the only difference is that the ACARS Hub web JS and CSS is "minified", but before final release I will move all of the code in to a single JS file to improve site loading time.
  • 404s are now redirected to a good page
  • Backend support for Project Eagle

Requesting Feedback

  • The search and stats page are in an incomplete status. Basically I moved what was in the side bar in to the main content area, but didn't really think much past that. What is everyone's thoughts on how to display that information?
  • I've tested this on a Mac, iPad (12 whatever inch), iPhone 12 Pro Max for hardware, and Safari/Chrome/Firefox on the same. I'd love feedback on Windows, Android devices, and phones with smaller/bigger screens than I have access to.

KNOWN ISSUES

  • If you access the site and use a "bad" URL the server redirects you (woo no more 404s :) ) the "page setting" link for Live Messages doesn't show up. As a work-around click live-messages link to fix (Build 1019)
  • Live Map page cannot be directly accessed via url/adsb (Build 1019)
  • There are lots of little "pixel misalignments" with some of the page elements so things might look....weird. If you see them, please report them.
  • System status is going to show unhealthy. Visual bug, everything under the hood is fine. Probably. (Build 1019)
  • Live Map messages may get a bit squished if there is decoded text (Build 1024)
  • You may see JSON errors in your docker logs. Investigating (Build 1020)
  • Browser back button doesn't take you back to previous pages (Build 1024)
  • ADSB may partially display. Javascript console will show errors. Investigating. (Build 1021)
  • If your ADSB_URL is malformed nginx won't start up and ACARS Hub web interface won't be accessible. (Build 1023)

TODOS

  • Implement nginx (Build 1021)
  • gzip server responses w/ nginx with the goal of reducing load time (Build 1021)
  • Single JS file production build target for ACARS Hub web code (Build 1019)
  • Finish TS optimizations (Build 1019)
  • Update readme.md to include Project Eagle stuff
  • Update the help page to include Project Eagle stuff and remove references to the old site layout (Build 1020)
  • Move alert database search from main table to the special alert table (Build 1023)
  • Smart message box sizing (resizable manually?) on live map (Build 1020)
  • Chattiness/alerts in the live message marker (Deferring until v2.1)
  • De Bounce alerts if page is active (Build 1019)
  • Improve mouse hover information for ADSB targets (Build 1020)
  • Move to using aircraft.json from external source (Build 1020)
  • ADSB status (from fetch errors) in system status (Build 1021)

Project Eagle

Now that you've made it this far....lets talk about Project Eagle. Why that name...dunno, just liked it and went with it :)

Project Eagle is the start of adding in ADSB and message paring with ADSB targets. This is NOT meant to be a tar1090 replacement, and as such may feel a little...bare, compared to tar1090. There will be more stuff added to it, but keep in mind the goal here.

To enable this feature

      - ENABLE_ADSB=true
      - ADSB_URL=http://tar1090/data/aircraft.json
      - ADSB_LAT=0
      - ADSB_LON=0

Default values for each variable are

  • ENABLE_ADSB: False
  • ADSB_URL: URL where aircraft.json is located.

Please make sure you set the appropriate IP address and port for ADSB_URL. Most users should be fine with setting ENABLE_ADSB ADSB_LAT ADSB_LON provided you are running ACARS Hub on the same machine as you are running tar1090. If not, set ADSB_URL to the aircraft.json file from your tar1090 and ACARS Hub takes care of the rest.

You can hover over a plane and get some basic information such as the callsign. If a plane has ACARS Messages the plane is shown with a circle around it, and if you click on the target you'll get a popup that shows those messages.

ADSB Source

A valid source of readsb aircraft.json ADSB data is required. I recommend using Mike Nye's tar1090 to make it easy, although other methods of providing that are possible.

In order to make ACARS Hub ADSB matching with ACARS Messages the best it can be, your aircraft.json source needs to include tail numbers for planes, which it doesn't by default. If you do see a registration number in the callsign of an ADSB target right now it's because that is the "callsign" the plane is using. If the plane is operating under a company callsign or anything else, the registration will not be included by default in the ADSB data. To change this, please ensure your aircraft.json source has this information.

To configure Mike's tar1090 to provide this extra information, please make sure you are using an up-to-date version of his container (anything after 17 June 21 should do), and add the following to your tar1090 env variables:

      - TAR1090_ENABLE_AC_DB=true

There is a downside to enabling this feature, though, you need to keep in mind. tar1090 will use more RAM, so on RAM constrained systems you will not want to turn this on.

Where are we going from here

The main focus for v2.0 is to take what has been done and "de-bug" it. I am more than happy to log down feature requests (and I imagine there is going to be a boat load of them for Project Eagle) but it's super important to take what we've got here and make it stable before moving on.

Change Log

v2.0 Build 1018

11 June 21

  • All the stuff above

v2.0 Build 1019

13 June 21

  • All pages in TS/JS are now objects
  • Page settings link in banner now works on page load
  • ACARS Hub is now minified into a single JS file, reducing the number of times the server has to send a file, and reducing the file size of the javascript by 50%
  • Can now refresh/load site from the Live Map page
  • System status will now show status correctly, minus ADSB status

v2.0 Build 1020

15 June 21

  • Unread alert counter now shows correctly on page load
  • Moved to requiring aircraft.json from readsb. Use Mike Nye's tar1090
  • Changed ADSB configuration options. See the config above.
  • Mouse hover on Live Map now shows more things
  • Live Map message box can be repositioned
  • Live Map message box resizes itself based on screen size
  • Live Map message box now remembers where you put it on screen after moved
  • Live Map message box doesn't grey out background

v2.0 Build 1021

Internal Build

v2.0 Build 1022

17 June 21

  • ADSB_URL formatting changed again. Sorry. Last time. If you are running tar1090 on the same machine as ACARS Hub you can remove ADSB_URL from your docker-compose file entirely. If you are not running tar1090 on the same machine as you are running ACARS Hub on you need to format the URL like a normal http URL in your browser, and it should be the full path to aircraft.json. http://192.168.31.28/data/aircraft.json for instance.
  • nginx is now installed in the container. What that means is server responses should be faster because all of the files are compressed before being sent from the server.
  • nginx now proxies aircraft.json requests from the browser to tar1090
  • No more partial ADSB displaying
  • Better ADSB pairing with ACARS Messages based on tail numbers. Please see ADSB Source above.
  • ADSB status now reflected in the system status.

v2.0 Build 1023

17 June 21

  • Alert page message population should now use a more efficient method for getting text matches
  • Database alert table now prunes after 120 days
  • Server now sends cache headers for js/css meaning quicker load times
  • Fix for feeders never starting
  • Startup sanity check now done in python
  • ADSB_URL is checked early in startup and if malformed will cause container startup failure

v2.0 Build 1024

17 June 21

  • Container will not fail on docker restart acarshub
  • Browser back button now works
  • Live Map message box will only show not show non-decoded text if decoded text is present
  • Live Map message box will close if open and you click another page link

v2.0 Build 1025

18 June 21

  • Reverted docker image to debian:stable-slim to fix Raspbian 32 Bit issues
  • Updated SQLAlchemy
  • Updated JS/CSS libraries to most recent minor versions

v2.0 Build 1026

18 June 21

  • Fixed searches being run if all search boxes are blank
  • TS code cleanup regarding some // @ts-expect-error
  • Cleaned up commented out old code

Traceback errors in web app

[vdlm2dec] 2020/12/08 17:01:58 {"timestamp":1607446918.0912049,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10580652,"toaddr":1057098,"is_response":1,"is_onground":2}
[webapp] 2020/12/08 17:01:58 [vdlm2 data] b'{"timestamp":1607446918.0912049,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10580652,"toaddr":1057098,"is_response":1,"is_onground":2}\n'
[webapp] 2020/12/08 17:02:00 Exception in thread Thread-4:
[webapp] 2020/12/08 17:02:00 Traceback (most recent call last):
[webapp] 2020/12/08 17:02:00   File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
[webapp] 2020/12/08 17:02:00     self.run()
[webapp] 2020/12/08 17:02:00   File "/usr/lib/python3.7/threading.py", line 865, in run
[webapp] 2020/12/08 17:02:00     self._target(*self._args, **self._kwargs)
[webapp] 2020/12/08 17:02:00   File "/webapp/application.py", line 333, in acarsGenerator
[webapp] 2020/12/08 17:02:00     acars_json = json.loads(data)
[webapp] 2020/12/08 17:02:00   File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
[webapp] 2020/12/08 17:02:00     return _default_decoder.decode(s)
[webapp] 2020/12/08 17:02:00   File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
[webapp] 2020/12/08 17:02:00     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[webapp] 2020/12/08 17:02:00   File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
[webapp] 2020/12/08 17:02:00     obj, end = self.scan_once(s, idx)
[webapp] 2020/12/08 17:02:00 json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 218 (char 217)
[webapp] 2020/12/08 17:02:00 Invalid session 52a6914f421048ceb70871b73bca5779 (further occurrences of this error will be logged with level INFO)
[vdlm2dec] 2020/12/08 17:02:01 {"timestamp":1607446921.0073659,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"fromaddr":2132536,"icao":16777215,"is_response":0,"is_onground":2}
[webapp] 2020/12/08 19:37:36 [vdlm2 data] b'{"timestamp":1607456256.529736,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11269048,"toaddr":1053386,"is_response":0,"is_onground":0,"mode":"2","label":"H1","block_id":"5","ack":"!","tail":"N8698B","flight":"WN3630","msgno":"F03A","text":"#M1B/B6 QXHADS2.ADS.N8698B034E07193B5D963A8762633C0FD553"}\n'
[vdlm2dec] 2020/12/08 19:37:38 {"timestamp":1607456258.4958191,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11269048,"toaddr":1053386,"is_response":1,"is_onground":0}
[webapp] 2020/12/08 19:37:38 [vdlm2 data] b'{"timestamp":1607456258.4958191,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11269048,"toaddr":1053386,"is_response":1,"is_onground":0}\n'
[vdlm2dec] 2020/12/08 19:37:41 {"timestamp":1607456261.020283,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10618714,"toaddr":1057098,"is_response":1,"is_onground":0}
[webapp] 2020/12/08 19:37:41 [vdlm2 data] b'{"timestamp":1607456261.020283,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10618714,"toaddr":1057098,"is_response":1,"is_onground":0}\n'
[webapp] 2020/12/08 19:37:45 Exception in thread Thread-4:
[webapp] 2020/12/08 19:37:45 Traceback (most recent call last):
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
[webapp] 2020/12/08 19:37:45     self.run()
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3.7/threading.py", line 865, in run
[webapp] 2020/12/08 19:37:45     self._target(*self._args, **self._kwargs)
[webapp] 2020/12/08 19:37:45   File "/webapp/application.py", line 358, in acarsGenerator
[webapp] 2020/12/08 19:37:45     acars_json = json.loads(data)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
[webapp] 2020/12/08 19:37:45     return _default_decoder.decode(s)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
[webapp] 2020/12/08 19:37:45     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
[webapp] 2020/12/08 19:37:45     obj, end = self.scan_once(s, idx)
[webapp] 2020/12/08 19:37:45 json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 217 (char 216)
[webapp] 2020/12/08 19:37:45 [2020-12-08 19:37:45 +0000] [370] [ERROR] Socket error processing request.
[webapp] 2020/12/08 19:37:45 Traceback (most recent call last):
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/workers/sync.py", line 134, in handle
[webapp] 2020/12/08 19:37:45     req = six.next(parser)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/http/parser.py", line 41, in __next__
[webapp] 2020/12/08 19:37:45     self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/http/message.py", line 181, in __init__
[webapp] 2020/12/08 19:37:45     super(Request, self).__init__(cfg, unreader)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/http/message.py", line 54, in __init__
[webapp] 2020/12/08 19:37:45     unused = self.parse(self.unreader)
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/http/message.py", line 230, in parse
[webapp] 2020/12/08 19:37:45     self.headers = self.parse_headers(data[:idx])
[webapp] 2020/12/08 19:37:45   File "/usr/lib/python3/dist-packages/gunicorn/http/message.py", line 74, in parse_headers
[webapp] 2020/12/08 19:37:45     remote_addr = self.unreader.sock.getpeername()
[webapp] 2020/12/08 19:37:45 OSError: [Errno 107] Transport endpoint is not connected
[vdlm2dec] 2020/12/08 19:37:55 {"timestamp":1607456275.2244761,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11264117,"toaddr":1066154,"is_response":0,"is_onground":0,"mode":"2","label":"_d","block_id":"2","ack":"C","tail":"N8643A","flight":"WN4667","msgno":"S35A"}
[webapp] 2020/12/08 19:37:55 [vdlm2 data] b'{"timestamp":1607456275.2244761,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11264117,"toaddr":1066154,"is_response":0,"is_onground":0,"mode":"2","label":"_d","block_id":"2","ack":"C","tail":"N8643A","flight":"WN4667","msgno":"S35A"}\n'
[vdlm2dec] 2020/12/08 21:05:16 {"timestamp":1607461516.184175,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10512364,"toaddr":1053386,"is_response":1,"is_onground":0}
[webapp] 2020/12/08 21:05:16 [vdlm2 data] b'{"timestamp":1607461516.184175,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10512364,"toaddr":1053386,"is_response":1,"is_onground":0}\n'
[vdlm2dec] 2020/12/08 21:05:17 {"timestamp":1607461517.118571,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11269048,"toaddr":1053386,"is_response":1,"is_onground":0}
[webapp] 2020/12/08 21:05:17 [2020-12-08 21:05:17 +0000] [370] [ERROR] Error handling request /socket.io/?EIO=3&transport=polling&t=1607461517079-11&sid=e813bbeb08cc4fa9b29eb19d95b2b817
[webapp] 2020/12/08 21:05:17 Traceback (most recent call last):
[webapp] 2020/12/08 21:05:17   File "/usr/lib/python3/dist-packages/gunicorn/workers/sync.py", line 135, in handle
[webapp] 2020/12/08 21:05:17     self.handle_request(listener, req, client, addr)
[webapp] 2020/12/08 21:05:17   File "/usr/lib/python3/dist-packages/gunicorn/workers/sync.py", line 176, in handle_request
[webapp] 2020/12/08 21:05:17     respiter = self.wsgi(environ, resp.start_response)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2464, in __call__
[webapp] 2020/12/08 21:05:17     return self.wsgi_app(environ, start_response)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/flask_socketio/__init__.py", line 46, in __call__
[webapp] 2020/12/08 21:05:17     start_response)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/engineio/middleware.py", line 60, in __call__
[webapp] 2020/12/08 21:05:17     return self.engineio_app.handle_request(environ, start_response)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/socketio/server.py", line 563, in handle_request
[webapp] 2020/12/08 21:05:17     return self.eio.handle_request(environ, start_response)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/engineio/server.py", line 416, in handle_request
[webapp] 2020/12/08 21:05:17     socket = self._get_socket(sid)
[webapp] 2020/12/08 21:05:17   File "/usr/local/lib/python3.7/dist-packages/engineio/server.py", line 609, in _get_socket
[webapp] 2020/12/08 21:05:17     raise KeyError('Session is disconnected')
[webapp] 2020/12/08 21:05:17 KeyError: 'Session is disconnected'
[webapp] 2020/12/08 21:05:17 [vdlm2 data] b'{"timestamp":1607461517.118571,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11269048,"toaddr":1053386,"is_response":1,"is_onground":0}\n'
[webapp] 2020/12/08 21:05:17 Invalid session e813bbeb08cc4fa9b29eb19d95b2b817 (further occurrences of this error will be logged with level INFO)
[vdlm2dec] 2020/12/08 21:05:17 {"timestamp":1607461517.5771129,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11261371,"toaddr":1066154,"is_response":0,"is_onground":0,"mode":"2","label":"H1","block_id":"3","ack":"!","tail":"N8616C","flight":"WN2395","msgno":"F42A","text":"#M1B/BA USADCXA.DR1.N8616C9CD9"}
[webapp] 2020/12/08 22:05:05 [vdlm2 data] b'{"timestamp":1607465105.8807731,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":11139997,"toaddr":1053386,"is_response":1,"is_onground":0}\n'
[webapp] 2020/12/08 22:05:07 [2020-12-08 22:05:07 +0000] [370] [ERROR] Error handling request /socket.io/?EIO=3&transport=polling&t=1607465107061-19826&sid=0aa97f0859f544418608c01dde259875
[webapp] 2020/12/08 22:05:07 Traceback (most recent call last):
[webapp] 2020/12/08 22:05:07   File "/usr/lib/python3/dist-packages/gunicorn/workers/sync.py", line 135, in handle
[webapp] 2020/12/08 22:05:07     self.handle_request(listener, req, client, addr)
[webapp] 2020/12/08 22:05:07   File "/usr/lib/python3/dist-packages/gunicorn/workers/sync.py", line 176, in handle_request
[webapp] 2020/12/08 22:05:07     respiter = self.wsgi(environ, resp.start_response)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2464, in __call__
[webapp] 2020/12/08 22:05:07     return self.wsgi_app(environ, start_response)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/flask_socketio/__init__.py", line 46, in __call__
[webapp] 2020/12/08 22:05:07     start_response)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/engineio/middleware.py", line 60, in __call__
[webapp] 2020/12/08 22:05:07     return self.engineio_app.handle_request(environ, start_response)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/socketio/server.py", line 563, in handle_request
[webapp] 2020/12/08 22:05:07     return self.eio.handle_request(environ, start_response)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/engineio/server.py", line 396, in handle_request
[webapp] 2020/12/08 22:05:07     socket = self._get_socket(sid)
[webapp] 2020/12/08 22:05:07   File "/usr/local/lib/python3.7/dist-packages/engineio/server.py", line 609, in _get_socket
[webapp] 2020/12/08 22:05:07     raise KeyError('Session is disconnected')
[webapp] 2020/12/08 22:05:07 KeyError: 'Session is disconnected'
[vdlm2dec] 2020/12/08 22:05:12 {"timestamp":1607465112.33723,"station_id":"CS-KABQ-VDLM","channel":2,"freq":136.975,"icao":10758676,"toaddr":1057098,"is_response":0,"is_onground":0,"mode":"2","label":"_d","block_id":"8","ack":"D","tail":"N368AR","flight":"AM0659","msgno":"S75A"}

ACARS Hub NextGen

Introduction

This issue will be the roadmap and discussion area for ACARS Hub NextGen and it is a living document as the idea fully materializes. The current state of ACARS Hub, version v2, is a bit of a mixed bag. Functionally, it works well, but the code-base is very messy and difficult to continue improving the code and adding new features. Additionally, container setup is exceptionally difficult for new users and even experienced users re-setting up their system. Finally, development for anyone playing in the code is very slow because (re)building the container takes a very long time because of the non-layered approach under-taken so far.

At the very beginning of this project none of what it has morphed in to was envisioned. I had no idea so many people would download and enjoy ACARS Hub. I was a novice programmer (well, still am mostly, but I'm less green I suppose), and combined with the massive feature increase, design decisions were not thought out in a way that ensured it was "future proof". By having a "clean-slate" approach all of the above issues can be addressed.

At the conclusion of this project ACARS Hub v2 and prior will be End of Life with no further support or bug fixes.

The plan, in high level terms

  • Have containers for each individual aspect of ACARS Hub NG (VDLM decoding, ACARS decoding, and the server)
  • Rewrite the front end to fully encapsulate a more modular approach
  • Create Electron or similar desktop app for viewing of ACARS Hub data

The Plan, in detail

Create docker images of common components

  • Create the "SDR Common" base image
  • Create a base image with common components for each SDR

Separate Containers

  • acarsdec container
  • vdlm2dec container
  • dumpvdl2 container
  • vdlm2dec container
  • Remove decoders from main ACARS Hub container
    • Remove dumpvdl2
    • Remove acarsdec
    • Remove build deps of those containers
    • Remove startup scripts
    • Update Dockerfile
    • Update documentation

Back end updates

  • Move database code to using "finally" and ensuring all sessions are closed
  • Move DB pruning to in-code and not separate process (note: presently pruning in sep process may cause the DB to fail to write incoming messages, or fail to run a query, because the DB is locked outside of the main app. SQLite is not meant to deal with multiple processes accessing/writing data so we have to move this back under the watch of SQLAlchemy to avoid issues)
  • Move FTS creation to in code and not a separate startup process
  • Remove cont-init DB processing

Front end rewrite

Application

Misc

  • Update GitHub Actions to use new acarshub-ng tag
  • Set up linters for both pre-commit hooks and the CI on GitHub to be in sync
  • Contributors/dev document

Search for tail number fails

I'm running on ACARS Hub Version: v2.0 Build 1027 and it seems, that searching for tail numbers does not work as expected. I wanted to look for all messages originating from Tail A7-BFS. So I went to search-database -> search for mesages and c&p the tail number at the corresponding field.
That yielded no results - but there must be something, as I got an alert from this tail. Entering the tail manually into the field indicated, that the selector works until I enter the dash. That means, I get everything on A or A7 but nothing for A7-
There are no results for A7BFS as well but: A7 BFS does work (space instead of -).

Segfault / Coredump from github built image on x86_64

Hi @fredclausen,

Just FYI, I've found that there's a problem with the x86_64 version of the image when built by GitHub.

acarsdec and vdlm2dec both segfault when started.

I think that this is due to compiler optimisations being too aggressive, and I'm experimenting with reducing them.

I've created the branch troubleshoot_segfault for the troubleshooting works.

-Mike

RRD Graphs

12 and 24 hour graphs are identical, I think it is in /docker-acarshub-main/rootfs/etc/services.d/rrd-images/

Under regular graphs should the line be:

rrdtool graph "${OUTPUT_DIR}/12hour.png" --title "12 Hours" --start "-12h" "${ARGS_ALL[@]}" >/dev/null 2>&1

Not a dev so I have no idea how to change it in my local container.

Fritz

Update bootstrap

We are currently using bootstrap version 3.4.1 but the current public version is 5.1.3. Currently if we update to v5 it breaks all of the CSS in considerable ways and will require a complete re-think of all of the CSS used in the site.css file.

It would be nice to be on current versions of all dependencies so that dependabot:

a) doesn't bug us about outdated packages
b) incorporate feature enhancements and security issues (not that CSS has security issues, but, as a general rule) are included

Tasks for v2.0

This is for #33

New features

  • Project Eagle
    • Add to system status
    • Health check
    • Websocket feature
  • Single socket
  • Single page
  • Mobile
    • Footer
    • Footer in main body
    • Footer main body text expanded
    • Message tabs scale to display
  • jBox
    • Modal for all pages
    • Tooltips
    • Tooltip CSS
  • Search page finish modal integration
  • Stat page move old sidebar to graphs
  • Redirect 404s

Nerd stuff

  • CSS cleanup
  • HTML cleanup
  • CSS lint/standards
  • HTML lint/standards
  • Python 3.9
  • Debian sid-slim image
  • Minify JS
  • Minify CSS
  • Turn on cache
  • MD5 file names
  • Move all static/template files out of web app and move them in during build
  • nginx proxy/gzip
  • single JS file in prod mode

Bug fixes

  • Highlight alert terms on load and even if dups detected
  • Cookie live message page showing correct in modal box
  • Alert page modal show correct status
  • Fix GitHub docker build
  • Fix local docker build
  • Fit GitHub ES lint (do we still need this?)

rrd database resolution is fairly coarse

Current ACARS/VDLM stats are displayed in the web_improvement branch. I find the generated graphs to be good, but the resolution on it is fairly blocky. Before officially merging this looking at the RRD database setup and how we feed it data should probably be improved:

  • I think we need more steps per time interval
  • I think we need to feed it data more frequently. Perhaps once a minute?

Right now I am grabbing the data from the acars/vdlm_stats scripts, which run at five minute intervals, and updating the appropriate rrd database. There is a timing issue where (at least on my pis) the script that runs to generate the image tends to run just before the most recent stats are fed in to the database, which causes the generated images to lag by five minutes.

I am considering using python and application.py to update the data. The python rrdtool looks like the ticket, but I had trouble getting it installed in the container. I didn't look in to it hard but it was causing me grief which is why I went down the road of using shell scripts. We could count messages/minute, update the rrd databases, and then generate new images.

Before bothering though, the real issue I haven't fully wrapped my mind around is the resolution in the database needed, and if more frequent updates really solve anything. Before merging to main the database resolution/setup should be finalized so we don't run in to needed to deal with an upgraded db at some point.

v2.1 Tasks

Cool Stuff

  • Move all of the stats page to graphs
  • Map options
    • Toggle ACARS only targets
    • Show aircraft callsign on live map, with ability to toggle on/off
    • Show extended data block for target
  • Side bar
    • Show planes
    • Sort by column
  • Smartly position live map tool tips so they don't get cut off by edge of map
  • Show decoder serial in acars/vdlm_decoder log messages
  • Smooth zoom
  • More zoom steps
  • Dark map tile set
  • Icons from tar1090
  • ADSB now populates quicker on page refresh if page was active on the refresh, or clicked within 5 seconds of page load
  • Legend for map colors
  • Live map page now updates everything when a new message comes in, so if you have a window up showing a plane's messages it'll show up there.

Nerd stuff

  • jquery all the things
  • Remove all typescript expect errors (sort of...)
  • Don't load live map if ADSB disabled
  • Convert msg_received to object
  • Save svg icon to airplane object
  • stat page image test assets
  • buildtest no longer minifies the code
  • Handle reconnect events more smarter
  • SVG to own file

Bug Fixes:

  • Tooltips on live map msg box missing, search page, and alert page missing
  • ACARS Hub Logo as SVG
  • ADSB disabled fix nginx url
  • ADSB refresh gets magically faster on web client reconnect
  • Search won't fail if you include a dash in a search field, among other characters that count as a 'word boundary'
  • Message total count on live map page is wrong
  • Message matching (re bug above) is buggered, has been for a long time...including live messages page.
  • Live Map view port size is wonky

Live Map Sidebar - Sort Issues

  • Ground as altitude causes weird sort
  • For items that could have the same value, need to apply a secondary sort to determine correct order

Startup is Slow

Version 2.2.0

Version 2.2.0 changes the database structure slightly in two ways:

  1. The time stamp of ACARS messages are no longer stored as strings and instead are stored as numbers
  2. The first startup, as it completes the migration to the new database structure, will take a while. Log messages may be slow trickling out as it completes the tasks. THIS IS OKAY! Please let it do it's thing.

These changes are part of a process necessary to improve database and startup performance.

PLEASE READ THE FOLLOWING CLOSELY!!!

Please read the intro :)

By upgrading to 2.2.0 or later you will NOT be able to downgrade to any ACARS Hub build lower than 1045 or version 2.1.4. If the upgrade fails and you back up the database (method below) we can recover the data and give it another try. Otherwise, nuking the database and starting fresh will be your only option.

I've tested this out to ensure it works but there is a possibility I've messed up somewhere and your database will be corrupted. If you want to ensure continuity of data in case it doesn't work, like your saved messages, alert counts, frequency counts, etc, please do one or both of the following:

Add the following to your ACARS Hub docker-compose.yaml configuration

    environment:
      - BACKUP_THE_DB=True

This will cause the container to create a backup of your current database file before modifying it. Additionally, or if you prefer a manual backup instead of letting the container do it:

sudo su -
cd /var/lib/docker/volumes/ubuntu_acars_data/_data
cp messages.db messages-backup.db

You might need to change the path to the docker volume containing your ACARS Hub data, but it will be in /var/lib/docker/volumes/.

Upgrading the database

docker pull fredclausen/acarshub:test-pr
docker-compose up -d
docker logs -f acarshub

Please watch the logs. This process may take more than 10 minutes depending on different factors. You are looking for something like the following:

[cont-init.d] 02-database: executing... 
[02-database] 2021/07/10 20:48:01 Checking to see if database needs upgrades
[02-database] 2021/07/10 20:48:02 Converting time from string to number
[02-database] 2021/07/10 20:48:02 Renaming current tables
[02-database] 2021/07/10 20:48:02 Creating new tables
[02-database] 2021/07/10 20:48:02 Copying old data
[02-database] 2021/07/10 20:48:04 Dropping old tables
[02-database] 2021/07/10 20:54:38 Updating FTS cache. May take a while
[02-database] 2021/07/10 20:58:31 Ensuring no columns contain NULL values
[02-database] 2021/07/10 20:58:33 done with de-nulling
[02-database] 2021/07/10 20:58:33 Adding text index
[02-database] 2021/07/10 20:58:46 Adding icao index
[02-database] 2021/07/10 20:58:47 Adding flight index
[02-database] 2021/07/10 20:58:49 Adding tail index
[02-database] 2021/07/10 20:58:50 Adding depa index
[02-database] 2021/07/10 20:58:55 Adding dsta index
[02-database] 2021/07/10 20:58:56 Adding msgno index
[02-database] 2021/07/10 20:58:58 Adding freq index
[02-database] 2021/07/10 20:59:00 Adding label index
[02-database] 2021/07/10 21:00:52 Completed upgrading database structure
[cont-init.d] 02-database: exited 0.

Once you see the completed message that means the upgrade was successful. Please wait until you see

[webapp] 2021/07/10 21:03:23 [database]: Pruned main database of x records
[webapp] 2021/07/10 21:03:23 [database]: Pruned alerts database of x records

You might see a couple of CRITICAL WORKER TIMEOUTS. I think I've figured out the cause, but in case you do see them PLEASE BE PATIENT; it will start up. Also, please copy the startup log with the critical worker timeouts and open an issue here on GitHub or let me know about it on Discord.

Once you see the Pruned messages that means everything started up properly. If you added BACKUP_THE_DB to your yaml file, please remove it at this time.

Subsequent restarts of the container should not do any upgrading of the database and should be very quick. My test container went from more than a minute from the time the container started up until the startup process was done to doing it in less than 15 seconds with these (and other) improvements made to the startup sequence.

IF YOU USE DB_BACKUP

Most users this will not apply to. If you don't know what DB_BACKUP is you can skip this.

You will need to manually update your backup database BEFORE running the update in your container. Update the msg_time column type to INTEGER or whatever is appropriate for your type of database. SQLite, used in the container, is using INTEGER.

Tweak ADSB part of readme for clarity.

Could possibly tweak the ADSB part of readme??

from:

"If you desire enhanced ADSB and ACARS message matching, and are running Mike's tar1090 container, you can enable the following option:"

to

"If you desire enhanced ADSB and ACARS message matching and thus show coloured aircraft icons on Live Map, and are running Mike's tar1090 container, you can enable the following option:"

Spent a while wondering why I had a lot of only Blue a/c and messages coming in. Queried and followed wiedehopf's polite R.T.F.M. suggestion. Having originally read over that I section I figured that it would only enhance the info displayed when hovering over the a/c and did not realise it would also link in the ACARS messages.

Just a suggestion.

Expose acarsdec -n, -N and -j options

Will it be possible to to expose acarsdec options to send acars messages to addr:port via UDP?

This would allow docker-acarshub to send acars messages to programs like FlightAirMap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.