The Interlock3 project is the third iteration of of the ESP8266 firmware for HSBNE's access control system.
Each interlock requires a configuration file, which can be uploaded to the device when it is flashed.
For details on configuration please see CONFIG.md.
This project uses VS Code dev containers. The dev container is set up to run only on a Linux/WSL2 environment. There are some quality of life features that prevent it working with Windows:
- The container user is set up with the same GID and UID as the user on the host. This eases issues with file permissions, especially for git.
- The container mounts your ~/.ssh and ~/.gitconfig directories to make git easier to use.
For best results run export HOST_GID=$(id -g) before building the container. The container user will automatically use a GID of 1000 if this is not done.
In the dev container simply run
idf.py build
For a fresh build:
rm -rf build && idf.py build
To flash the firmware first build the project.
idf.py -p (PORT) flash
If you would like to overwrite the existing configuration on the device (see the configuration section) then use the following command.
esptool.py -p /dev/ttyUSB0 -b 460800 --no-stub --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0xf000 build/ota_data_initial.bin 0x32000 build/Interlock3.bin 0x12000 build/littlefs.bin
If you would like to keep the existing configuration then use:
esptool.py -p /dev/ttyUSB0 -b 460800 --no-stub --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0xf000 build/ota_data_initial.bin 0x32000 build/Interlock3.bin
Github actions are used to create releases.
Actions run in the same container as the dev container. The container is hosted on the Github Container registry. Please keep the container up to date.
To update the container:
In ./devcontainer
docker build -t ghcr.io/hsbne/interlock3/esp8266-dev:<version> .
docker login ghcr.io -u <your-github-username>
docker push ghcr.io/hsbne/interlock3/esp8266-dev:<version>
Login using a token with the write:packages scope.
The Interlock3 project is made to be compatible with the MemberMatters membership portals made, kindly, by Jaimyn Mayer. This project is based in part on the BeepBeep firmware by the same author.
The original HSBNE access control project (to the author's knowledge) was created by nog3.