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

Migrating from readsb, remote SDR #20

Closed
FabioEight opened this issue Jun 14, 2023 · 4 comments
Closed

Migrating from readsb, remote SDR #20

FabioEight opened this issue Jun 14, 2023 · 4 comments

Comments

@FabioEight
Copy link

Hello,
My current setup (based on the old readsb gitbook guide), is made by two hosts, 1 PiZero 2W with RTL-SDR dongle doing only ADSB reception and 1 Debian retrieving all the feeder data and pushing it to providers.
Is this setup replicable using Ultrafeeder?
I don't see any parameters that I can use to disable processes not required on the PiZero SDR.
Also, it might be worth to add a section on GitBook, suggesting how to proceed with the upgrade from readsb to Ultrafeeder.
Thank you!

@FabioEight
Copy link
Author

So I tried to replicate my setup.
Here's my docker compose for my Pi Zero 2W (with RTL-SDR dongle):

  ultrafeeder:
    image: ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder
    tty: true
    container_name: ultrafeeder
    hostname: ultrafeeder
    restart: always
    device_cgroup_rules:
      - 'c 189:* rwm'
    ports:
      - 8080:80
      - 30005:30005
    environment:
      # --------------------------------------------------
      # general parameters:
      - LOGLEVEL=error
      - TZ=${FEEDER_TZ}
      # --------------------------------------------------
      # SDR related parameters:
      - READSB_DEVICE_TYPE=rtlsdr
      - READSB_RTLSDR_DEVICE=${ADSB_SDR_SERIAL}
      - READSB_RTLSDR_PPM=${ADSB_SDR_PPM}
      #
      # --------------------------------------------------
      # readsb/decoder parameters:
      - READSB_LAT=${FEEDER_LAT}
      - READSB_LON=${FEEDER_LONG}
      - READSB_ALT=${FEEDER_ALT_M}m
      - READSB_GAIN=${ADSB_SDR_GAIN}
      - READSB_MODEAC=true
      - READSB_RX_LOCATION_ACCURACY=2
      - READSB_STATS_RANGE=true
      #
      # --------------------------------------------------
      # Sources and Aggregator connections:
      # Note - remove the ones you are not using / feeding
      #  Make sure that each line ends with a semicolon ";",  with the
      #  exception of the last line which shouldn't have a ";"
      - ULTRAFEEDER_CONFIG=
          adsb,feed.adsb.fi,30004,beast_reduce_plus_out;
          adsb,in.adsb.lol,30004,beast_reduce_plus_out;
          adsb,feed.adsb.one,64004,beast_reduce_plus_out;
          adsb,feed.planespotters.net,30004,beast_reduce_plus_out;
          adsb,feed.theairtraffic.com,30004,beast_reduce_plus_out;
          adsb,data.avdelphi.com,24999,beast_reduce_plus_out;
          mlat,feed.adsb.fi,31090,39000;
          mlat,in.adsb.lol,31090,39001;
          mlat,feed.adsb.one,64006,39002;
          mlat,mlat.planespotters.net,31090,39003;
          mlat,feed.theairtraffic.com,31090,39004
      # --------------------------------------------------
      - UUID=${ULTRAFEEDER_UUID}
      - READSB_FORWARD_MLAT_SBS=true
      #
      # --------------------------------------------------
      # TAR1090 (Map Web Page) parameters:
      - TAR1090_DISABLE=true
      #
      # --------------------------------------------------
      # GRAPHS1090 (Decoder and System Status Web Page) parameters:
      - GRAPHS1090_DISABLE=true
      #
      # --------------------------------------------------
    volumes:
      - /opt/adsb/ultrafeeder/globe_history:/var/globe_history
      - /opt/adsb/ultrafeeder/graphs1090:/var/lib/collectd
      - /proc/diskstats:/proc/diskstats:ro
      - /dev:/dev:ro
    tmpfs:
      - /run:exec,size=256M
      - /tmp:size=128M
      - /var/log:size=32M

Is this configuration the most optimized for a "headless" setup, just receiving signals from RTL-SDR, no web servers or else?
I had to forward also port 30005 to allow the connection from my other host.
Do I need to configure something further for MLAT?

Below, the docker compose from my "server", the machine that retrieve the data from the PiZero and feeds all the other services:

services:

  ultrafeeder:
    image: ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder
    tty: true
    container_name: ultrafeeder
    hostname: ultrafeeder
    restart: always
    device_cgroup_rules:
      - 'c 189:* rwm'
    ports:
      - 8080:80               # to expose the web interface
    environment:
      # --------------------------------------------------
      # general parameters:
      - LOGLEVEL=error
      - TZ=${FEEDER_TZ}
      # --------------------------------------------------
      # SDR related parameters:
#      - READSB_DEVICE_TYPE=rtlsdr
#      - READSB_RTLSDR_DEVICE=${ADSB_SDR_SERIAL}
#      - READSB_RTLSDR_PPM=${ADSB_SDR_PPM}
      #
      # --------------------------------------------------
      # readsb/decoder parameters:
      - READSB_LAT=${FEEDER_LAT}
      - READSB_LON=${FEEDER_LONG}
      - READSB_ALT=${FEEDER_ALT_M}m
      - READSB_GAIN=${ADSB_SDR_GAIN}
      - READSB_MODEAC=true
      - READSB_RX_LOCATION_ACCURACY=2
      - READSB_STATS_RANGE=true
      #
      # --------------------------------------------------
      # Sources and Aggregator connections:
      - ULTRAFEEDER_CONFIG=
        adsb,192.168.1.9,30005,beast_in;
        mlathub,piaware,30105,beast_in;
        mlathub,rbfeeder,30105,beast_in;
        mlathub,radarvirtuel,30105,beast_in;
        adsb,feed1.adsbexchange.com,30004,beast_reduce_plus_out;
        mlat,feed.adsbexchange.com,31090,39005;

      # --------------------------------------------------
      - UUID=${ULTRAFEEDER_UUID}
      - READSB_FORWARD_MLAT_SBS=true
      #
      # --------------------------------------------------
      # TAR1090 (Map Web Page) parameters:
      - UPDATE_TAR1090=true
      - TAR1090_DEFAULTCENTERLAT=${FEEDER_LAT}
      - TAR1090_DEFAULTCENTERLON=${FEEDER_LONG}
      - TAR1090_MESSAGERATEINTITLE=true
      - TAR1090_PAGETITLE=${FEEDER_NAME}
      - TAR1090_PLANECOUNTINTITLE=true
      - TAR1090_ENABLE_AC_DB=true
      - TAR1090_FLIGHTAWARELINKS=true
      - HEYWHATSTHAT_PANORAMA_ID=${FEEDER_HEYWHATSTHAT_ID}
      - HEYWHATSTHAT_ALTS=${FEEDER_HEYWHATSTHAT_ALTS}
      - TAR1090_SITESHOW=true
      - TAR1090_RANGE_OUTLINE_COLORED_BY_ALTITUDE=true
      - TAR1090_RANGE_OUTLINE_WIDTH=2.0
      - TAR1090_RANGERINGSDISTANCES=50,100,150,200
      - TAR1090_RANGERINGSCOLORS='#1A237E','#0D47A1','#42A5F5','#64B5F6'
      - TAR1090_USEROUTEAPI=true
      #
      # --------------------------------------------------
      # GRAPHS1090 (Decoder and System Status Web Page) parameters:
      - GRAPHS1090_DARKMODE=true
      - GRAPHS1090_DISABLE_CHART_TEMP=true
      #
      # --------------------------------------------------
    volumes:
      - /opt/adsb/ultrafeeder/globe_history:/var/globe_history
      - /opt/adsb/ultrafeeder/graphs1090:/var/lib/collectd
      - /proc/diskstats:/proc/diskstats:ro
      - /dev:/dev:ro
    tmpfs:
      - /run:exec,size=256M
      - /tmp:size=128M
      - /var/log:size=32M

  planewatch:
    image: ghcr.io/plane-watch/docker-plane-watch:latest
    tty: true
    container_name: planewatch
    restart: always
    environment:
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}m
      - TZ=${FEEDER_TZ}
      - API_KEY=${PW_API_KEY}
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  fr24:
    image: ghcr.io/sdr-enthusiasts/docker-flightradar24:latest
    tty: true
    container_name: fr24
    restart: always
    depends_on:
      - ultrafeeder
    ports:
      - 8754:8754
    environment:
      - BEASTHOST=ultrafeeder
      - TZ=${FEEDER_TZ}
      - FR24KEY=${FR24_SHARING_KEY}
      - VERBOSE_LOGGING=true
    tmpfs:
      - /var/log

  piaware:
    image: ghcr.io/sdr-enthusiasts/docker-piaware:latest
    tty: true
    container_name: piaware
    restart: always
    depends_on:
      - ultrafeeder
    ports:
      - 18083:8080
    environment:
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - TZ=${FEEDER_TZ}
      - FEEDER_ID=${PIAWARE_FEEDER_ID}
      - ALLOW_MLAT=yes
      - MLAT_RESULTS=yes
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  rbfeeder:
    image: ghcr.io/sdr-enthusiasts/docker-radarbox:latest
    tty: true
    container_name: rbfeeder
    restart: always
    depends_on:
      - ultrafeeder
    environment:
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}
      - TZ=${FEEDER_TZ}
      - SHARING_KEY=${RADARBOX_SHARING_KEY}
    tmpfs:
      - /run:exec,size=64M
      - /var/log
    volumes:
      - /root/docker/rb/faketemp:/sys/class/thermal:ro

  pfclient:
    image: ghcr.io/sdr-enthusiasts/docker-planefinder:latest
    tty: true
    container_name: pfclient
    restart: always
    ports:
      - 30053:30053
    environment:
      - TZ=${FEEDER_TZ}
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - SHARECODE=${PLANEFINDER_SHARECODE}
    tmpfs:
      - /run:exec,size=64M
      - /var/log/pfclient

  adsbx:
    image: ghcr.io/sdr-enthusiasts/docker-adsbexchange:latest
    tty: true
    container_name: adsbx
    restart: always
    depends_on:
      - ultrafeeder
    environment:
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}m
      - SITENAME=${ADSBX_SITENAME}
      - UUID=${ADSBX_UUID}
      - TZ=${FEEDER_TZ}
    tmpfs:
      - /run:rw,nosuid,nodev,exec,relatime,size=64M,uid=1000,gid=1000
      - /var/log

  adsbhub:
    image: ghcr.io/sdr-enthusiasts/docker-adsbhub:latest
    tty: true
    container_name: adsbhub
    restart: always
    environment:
      - TZ=${FEEDER_TZ}
      - SBSHOST=ultrafeeder
      - CLIENTKEY=${ADSBHUB_STATION_KEY}

  opensky:
    image: ghcr.io/sdr-enthusiasts/docker-opensky-network:latest
    tty: true
    container_name: opensky
    restart: always
    environment:
      - TZ=${FEEDER_TZ}
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}
      - OPENSKY_USERNAME=${OPENSKY_USERNAME}
      - OPENSKY_SERIAL=${OPENSKY_SERIAL}
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  radarvirtuel:
    image: ghcr.io/sdr-enthusiasts/docker-radarvirtuel:latest
    tty: true
    container_name: radarvirtuel
    hostname: radarvirtuel
    restart: always
    environment:
      - FEEDER_KEY=${RV_FEEDER_KEY}
      - SOURCE_HOST=ultrafeeder:30002
      - RV_SERVER=mg22.adsbnetwork.com:50050
      - VERBOSE=OFF
      - MLAT_SERVER=mlat.adsbnetwork.com:50000
      - MLAT_HOST=ultrafeeder:30005
      - LAT=${FEEDER_LAT}
      - LON=${FEEDER_LONG}
      - ALT=${FEEDER_ALT_M}
    depends_on:
      - ultrafeeder
    tmpfs:
      - /tmp:rw,nosuid,nodev,noexec,relatime,size=128M
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"

  tar1090:
    image: ghcr.io/sdr-enthusiasts/docker-tar1090:latest
    tty: true
    container_name: tar1090
    restart: always
    environment:
      - UPDATE_TAR1090=false
      - TZ=${FEEDER_TZ}
      - BEASTHOST=ultrafeeder
      - LAT=${FEEDER_LAT}
      - LONG=${FEEDER_LONG}
      - TAR1090_DEFAULTCENTERLAT=${FEEDER_LAT}
      - TAR1090_DEFAULTCENTERLON=${FEEDER_LONG}
    ports:
      - 8082:80
    volumes:
      - "tar1090_heatmap:/var/globe_history"
    tmpfs:
      - /run:exec,size=64M
      - /var/log

My old readsb compose used these parameters:

#  readsb:
#    image: ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest
#    tty: true
#    container_name: readsb
#    hostname: readsb
#    restart: always
#    devices:
#      - /dev/bus/usb:/dev/bus/usb
#    ports:
#      - 18082:8080
#      - 30005:30005
#    environment:
#      - TZ=${FEEDER_TZ}
#      - READSB_STATS_RANGE=true
#      - READSB_NET_ENABLE=true
#      - READSB_NET_CONNECTOR=192.168.1.9,30005,beast_in
#      - READSB_NET_ONLY=true
#    volumes:
#      - readsbpb_rrd:/run/collectd
#      - readsbpb_autogain:/run/autogain
#    tmpfs:
#      - /run/readsb
#      - /var/log

As you can see, it was a bit cleaner as there was the READSB_NET_ONLY parameter.
My current configuration is proper for my setup?
I'm currently unable to provide MLAT to the services.

Many thanks for your support.

@kx1t
Copy link
Member

kx1t commented Jun 18, 2023

Since you disabled graphs1090 and tar1090 on your pi zero receiver, ultrafeeder will run with minimum CPU footprint. You could probably make the startup time and memory footprint a bit better so by disabling things that really don’t matter on the Pi Zero, for example:

  • no need to map port 8080:80 as there’s no web service
  • Set UPDATE _TAR1090=false
  • Set TAR1090_ENABLE_AC_DB=false
  • No need to map any of these volumes as there’s no need to keep persistent data on the pi zero:
      - /opt/adsb/ultrafeeder/globe_history:/var/globe_history
      - /opt/adsb/ultrafeeder/graphs1090:/var/lib/collectd
      - /proc/diskstats:/proc/diskstats:ro

for the rest, things look good at first sight

@kx1t kx1t closed this as completed Jun 18, 2023
@FabioEight
Copy link
Author

Thank you @kx1t .
It might be worth including these infos in the documentation, I remember that these configurations were shown as use case of readsb.
I'll check again for the MLAT issue and eventually raise a new issue.
Thanks!

@emes
Copy link

emes commented Nov 15, 2023

@FabioEight

Other than wanting to use the same image, what was the motivation to change the Pi Zero? Couldn't you continue to feed everything from the Debian server and just switch that to use Ultrafeeder? Just curious...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants