NOTE: I have given up and went to use nordic nrf52840 dongle I found it is significant easier to program and the usuage is around 30ua which I am still trying to lower the best that I could get with esp32 was 300ua. Which is too high.
This is cpp file for creating matter with two endpoints. I wanted to create a low water level sensor and a high water sensor. How it works when the water is low turn on water and when it fills up the other sensor stops the water.
I have done this using ESP-IDF 5.5.2 and ESP-Matter 1.4 branch. I am using matter over thread.
I have put a prerequisities file that should pull up all the requirements for building.
This is info is from espressif website.
I am using ESP32H2 device.
I am using cr123 battery 470k resistors from minus and plus to gpio0
To run the prerequisities file you will likely need to do this chmod + Prerequisities.sh sed -i 's/\r//' ./Prerequisities.sh
I have also added this in bash.rc so that later on I can activate by calling get_idf etc
alias get_idf=' . ~/esp-idf/export.sh' alias get_matter=' . ~/esp-matter/export.sh' alias set_cache='export IDF_CCACHE_ENABLE=1'