Sign inSign up

audxiusgithub/peplinkwifitogglev2

By audxiusgithub

•Updated 7 months ago

updated version with bug fixed

Image
0

363

audxiusgithub/peplinkwifitogglev2 repository overview

Automatically enables/disables Peplink Wi-Fi AP based on GPS speed.

  • Enables Wi-Fi when speed stays below STOP_THRESHOLD for STOP_SAMPLES checks.
  • Disables Wi-Fi when speed stays at/above MOVE_THRESHOLD for MOVE_SAMPLES checks.


Updated version of audriuspeplink/peplinkgpswifishutdown with cleaner code and major bug fixes.


⁠Quick Start

Bare minimum:

docker run -d 
  --name peplinkgps 
  -e USERNAME=[INSERT USERNAME]
  -e PASSWORD=[INSERT PASSWORD]
  audxiusgithub/peplinkwifitogglev2:stable

Full example:

docker run -d 
  --name peplinkgps 
  -e ROUTER_URL=https://192.168.50.1 
  -e USERNAME=[INSERT USERNAME]
  -e PASSWORD=[INSERT PASSWORD]
  -e HTTP_TIMEOUT=8 
  -e POLL_INTERVAL=10 
  -e STOP_THRESHOLD=1.0 
  -e MOVE_THRESHOLD=1.0 
  -e STOP_SAMPLES=5 
  -e MOVE_SAMPLES=3 
  audxiusgithub/peplinkwifitogglev2:stable

⁠Environment Variables

Required:

  • USERNAME - Router's admin username (default "admin")
  • PASSWORD - Router's admin password

Optional:

  • ROUTER_URL - Base URL of the router's web interface (default "https://192.168.50.1⁠")
  • HTTP_TIMEOUT - Maximum time (seconds) to wait for router API responses
  • POLL_INTERVAL - Seconds between GPS checks (default 10)
  • STOP_THRESHOLD - Speed below this enables WiFi (default 1.0)
  • MOVE_THRESHOLD - Speed at/above this disables WiFi (default 1.0)
  • STOP_SAMPLES - How many stationary readings before enabling (default 5)
  • MOVE_SAMPLES - How many movement readings before disabling (default 3)

⁠Container Management

docker ps -a - Docker container list
docker stop peplinkgps - Stop the docker container
docker start peplinkgps - Start the docker container
docker rm -f peplinkgps - Remove the docker container
docker logs -t peplinkgps - See the logs of the docker container

Tag summary

Content type

Image

Digest

sha256:7dc2dd76e…

Size

51.4 MB

Last updated

7 months ago

docker pull audxiusgithub/peplinkwifitogglev2:stable