CLI tool to switch on/off the wifi module of a Compal cabelmodem (CH7465LG/Ziggo Connect Box)
Project description
Compal-Wifi-Switch
A command line tool to switch on/off the wifi sender of a Compal CH7465LG cablemodem.
Wifi radiation should be turned off if not used (better for your health and for IT security reasons). Unfortunattly the Compal CH7465LG cablemodem does not offer a physical button to switch on/off the wifi module. There is also no configuration possible to switch the wifi module on/off based on a time schedule (e.g. switch off during night).
The compal-wifi-switch tool can switch wifi on/off via a command line interface. The tool can be installed on a server where Python runtime is available (NAS, Raspberry Pi, etc.). To schedule compal-wifi-switch you can use cron or any other scheduling mechanism.
Installation
Using pip
- Install python3.7 or higher
- Install compal-wifi-switch with
pip install compal-wifi-switch
. - Run compal-wifi-switch with
compal-wifi-switch --help
.
Without pip (e.g. on Synology DSM)
- Download package from PyPi (tar.gz) to your server.
- Run the following commands:
# Install
user@dsm:~> tar xfv compal-wifi-switch-<version>.tar.gz
user@dsm:~> cd compal-wifi-switch-<version>
user@dsm:~/compal-wifi-switch> python3 setup.py install --user
# Run
user@dsm:~> python3 ~/compal-wifi-switch-<version>/compal_wifi_switch/main.py --help
Usage
usage: main.py [-h] --host HOST --password PASSWORD --switch {on,off}
[--band {2g,5g,all}] [--guest [GUEST ...]] [--version]
[--verbose]
Compal-Wifi-Switch configuration
optional arguments:
-h, --help show this help message and exit
--host HOST host name or IP of compal cablemodem, or use env
variable COMPAL_WIFI_SWITCH_HOST
--password PASSWORD password of compal cablemodem, or use env variable
COMPAL_WIFI_SWITCH_PASSWORD
--switch {on,off}, -s {on,off}
wifi power state to set
--band {2g,5g,all}, -b {2g,5g,all}
band to switch power state for (default = all)
--guest [GUEST ...], -g [GUEST ...]
list of guest network mac-addresses to activate while
switching ON wifi
--version, -v show program's version number and exit
--verbose verbose logging
Credits
- Using compal_CH7465LG_py by ties to communicate with Compal cable modem.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for compal_wifi_switch-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10cca9009149508833e98e294d1463003de87fc3db675be911c38a4874054441 |
|
MD5 | 82a92c8402c7e8c2e90680e053f23d5f |
|
BLAKE2b-256 | aba2652be72c16f315da821ae3af4b55000348d6a90a96809cd8fc3d6e3b03e3 |