esp-homekit-demo
esp-homekit-demo copied to clipboard
Add example for irrigation system
Hey I did my best to implement an irrigation homekit service. It is similar to the dynamic_services
example.
Feedback is welcome 🙂
I improved some points you mentioned.
Over the last weeks I improved my code a lot. As far I can see these points are not fixed right now:
1. Pre-cache characteristics
Or even pre-cache it inside
gate
structure for improved performance.
I don't quite understand how to implement this.
2. Use vTaskGetInfo()
instead of storing task state in a variable
I use task_running
to determine if the task is suspended or running. I saw vTaskGetInfo()
in the freertos docs, but the compiler warned me:
type undefined reference to vTaskGetInfo
3. Create characteristics first
How about saving some CPU cycles and creating characteristics first.
I don't quite understand how to implement this.
4. Use valve_count
instead of hard coding array length
This might be a no-brainer but I am quite lost at this one 🙈