Note: This is work in progress, not guaranteed to be fully usable. If you want a minimal example, see esp32-huello-world repo.
This will be a firmware for my Hue White Ambiance replacement driver suitable for my "Beng Ceiling Light" from Philips.
For background info see Reversing Philips Hue light driver, and Introducing e32: firmware for esp32-c6 based White Ambiance light in particular.
The latter link explains a bit of the architecture of this firmware.
GPLv3 (mainly for stuff in main/), unless stated otherwise
- No OTA support
- Transitions (fades) aren't γ-corrected
See the blog post for background.
To compile:
cp main/trust_center_key.h.in main/trust_center_key.h
# edit main/trust_center_key.h to set correct tc key
./in-docker.sh idf.py set-target esp32-c6 buildTo flash:
# pipx install esptool
cd build
esptool.py --chip esp32c6 -b 460800 \
--before default_reset --after hard_reset \
write_flash "@flash_args"To clean up:
./in-docker.sh rm -rf build dependencies.lock managed_components/ sdkconfigTo change your board's MAC (or other ZB parameters):
./in-docker.sh python3 esp_zb_mfg_tool.py \
--manufacturer_name Espressif --manufacturer_code 0x131B \
--channel_mask 0x07FFF800 \
--mac_address CAFEBEEF50C0FFA0
esptool.py write_flash 0x1d8000 ./bin/CAFEBEEF50C0FFA0.binNote: 0x1d8000 is the location of your zb_fct in partitions.csv.
And the other possible parameters (for esp_zb_mfg_tool) can be figured
out easily from its source.