How to monitor GPIO status with python
You can monitor the status of GPIOs (buttons, discrete inputs) on JetHome controllers using the utility: https://github.com /adeepn/gpio-polling
Download this utility:
git clone https://github.com/adeepn/gpio-polling.git
Gpiod must be installed for the utility to work:
cd gpio-polling pip3 install -r requirements.txt
Example of monitoring the status of the user button on the JetHome D1 controller and turning on the green LED when the button is pressed:
python3 main.py 0 10 'echo 1>/sys/class/gpio/gpio453/value'