This is a project that started mainly to find WAN failover configurations on Omada gateway devices.
  • Elixir 79.2%
  • HTML 14.3%
  • CSS 3.6%
  • JavaScript 2.9%
Find a file
2026-07-24 09:12:11 -06:00
assets Initalize Project 2026-07-22 11:23:19 -06:00
config Adding completed project with documentation 2026-07-24 09:12:11 -06:00
lib Adding completed project with documentation 2026-07-24 09:12:11 -06:00
priv Adding completed project with documentation 2026-07-24 09:12:11 -06:00
test Initalize Project 2026-07-22 11:23:19 -06:00
.formatter.exs Adding completed project with documentation 2026-07-24 09:12:11 -06:00
.gitignore Adding completed project with documentation 2026-07-24 09:12:11 -06:00
docker-compose.yml Adding completed project with documentation 2026-07-24 09:12:11 -06:00
mix.exs Adding completed project with documentation 2026-07-24 09:12:11 -06:00
mix.lock Adding completed project with documentation 2026-07-24 09:12:11 -06:00
README.md Adding completed project with documentation 2026-07-24 09:12:11 -06:00

OmadaInspector

How to Run

  1. Ensure that Erlang and Elixir are installed. asdf is a perfect tool for accomplishing this.

    Getting started with asdf

    Installing Erlang with asdf

    Installing Elixir with asdf

  2. Ensure that Postgres is installed and running. This is necessary for Oban to work. Use the provided docker compose to run it.

  3. Ensure you have an .env file configured for your Omada controller, please use the following .env template

export OMADA_CLOUD_ID="omada-cloud-id"
export OMADA_CLIENT_ID="client-id"
export OMADA_CLIENT_SECRET="client-secret"
export OMADA_CONTROLLER_URL="mycontroller.mywebsite.com:8043"
  1. Run mix setup to install and setup dependencies

  2. Start application with iex -S mix phx.server

  3. Issue the following commands to run a report,

# Run this command to populate the SitesServer with Omada sites
OmadaInspector.hydrate_sites_server()

# Run this command to enqueue background workers to get devices from Omada sites
# This takes a while, so please wait for it to finish to get a full report of WAN devices
# This can be monitored by watching `available` status oban jobs in `adminer`
# When the available jobs are 0, proceed to the next command
OmadaInspector.queue_get_devices()

# Run this command to enqueue background workers to get WAN details from Omada devices
# Just like the above command, please watch the available jobs to tick down to 0
# When no more available jobs are running, feel free to proceed to the next command
OmadaInspector.queue_get_wans()

# Produces report on Omada devices with 2 WAN ports configured
OmadaInspector.get_double_wans()

# Produces report on Omada devices with 0 wan ports configured
# These are most likely disconnected devices or devices in an ISP outage
OmadaInspector.get_zero_wans()