esp-homekit-demo icon indicating copy to clipboard operation
esp-homekit-demo copied to clipboard

Add example for irrigation system

Open buschco opened this issue 5 years ago • 2 comments

Hey I did my best to implement an irrigation homekit service. It is similar to the dynamic_services example. Feedback is welcome 🙂

buschco avatar Sep 21 '19 10:09 buschco

I improved some points you mentioned.

buschco avatar Oct 19 '19 14:10 buschco

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 🙈

buschco avatar Jun 12 '20 08:06 buschco