ESPHome client for the Duplo Train Pusher backend
Table of Contents
Activate Python virtualenv and install required packages. At least Python 3.10 is required:
python3.10 -m pip install virtualenv
python3.10 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txtTo deactivate Python virtualenv run deactivate
NOTE: Python virtualenv MUST be activated with
source venv/bin/activateeach time before usingesphome
NOTE: First time upload should be performed via cable, all subsequent uploads could be performed Over-The-Air (OTA upload)
To build and upload firmware activate Python virtualenv and install packages from the requirements.txt as described in the Project configuration section above and then run ESPHome:
esphome run train-pusher-client.yamlIn order to check device logs run:
esphome logs train-pusher-client.yamlMore details on ESPHome usage could be found via esphome -h command and on the official website
| Button | TLC5947 pin | D1mini pin |
|---|---|---|
| Green Backward | 22 | 5 |
| Green Forward | 23 | 12 |
| White | 19 | 4 |
| Yellow | 14 | 5 |
| Blue | 17 | 2 |
| Red | 20 | 0 |