Provides custom methodes for usbmux (original repo)
- Python >= 3.9
- pyserial lib
Mux Connector Api uses Mux Finder to discover and automaticly hook itself to Mux (you can obviously direct it to desired Mux in configuration if you dont want this feature)- Those two files by default need to be in the same directory. If you want to want to change it, you need to change path in 7th line of mux_connector_api.py:
sys.path.insert(0, './')
It points to a directory that contains mux_finder.api
import sys
sys.path.insert(0, '/api_directory/')
from API import mux_connector_api
example = mux_connector_api.MuxConnectorApi()
print(example.<METHODE>)
reboot()
Reboots MUXcheck_relay_state(relay_id: int)
Checks state of relayshow_inf()
Returns info messagechange_name(mux_name: str)
Changes MUX nameswitch_relay(relay_id: int, relay_state: off_on)
Switches relay state(on/off)get_name()
Returns name of MUX