David Woodhouse

Results 199 comments of David Woodhouse

> I wonder if this series control method can accurately and quickly respond,Because the zero crossing point of alternating current changes too quickly Yes, as I said [above](https://github.com/esphome/esphome/pull/7421#issuecomment-2478511111) you probably...

~~Obviously this just hard-codes the new mode and drops *both* the old behaviours either with or without `idf_send_async`. We'll want to decide if we actually want to do that, or...

> A lock-free **SPSC (Single Producer Single Consumer)** queue using atomics would be a better fit here because: Thanks. Do we have an implementation of this in ESPHome already or...

Converted to LockFreeQueue in commit [ba05cac](https://github.com/esphome/esphome/commit/ba05cac936f9c3f57526425394098ca9184c54b8) but untested as I'm travelling this week. I also now want to double-check that all the subscribe/unsubscribe/publish events *are* coming from the main thread,...

We should also think about making the LockFreeQueue and the EventPool more generic and sharing them...

> If you didn't need to make any changes, it might make sense to make it a core helper I turned the event pool into a *template* but other than...

Sure.. but I'll actually test this first, and make sure it's even going to be useful. As I came to actually write down the part about MQTT messages only being...

Seems to be working nicely now with the lock free queue. Thanks for the help!

``` [11:16:24][D][sensor:104]: 'StallGuard result': Sending state 128.00000 with 0 decimals of accuracy [11:16:24][I][main:369]: Reed switch off at -561073.000000 in direction 0, travel IDLE! [11:16:24][D][binary_sensor:026]: 'Reed Switch': New state is OFF...

``` [11:36:29][W][component:255]: Component mqtt cleared Warning flag [11:36:29][D][status_led:030]: Restoring light state ON [11:36:31][D][sensor:104]: 'VBUS Voltage': Sending state 5.22209 V with 2 decimals of accuracy [11:36:33][D][esp-idf:000][esphome_mqtt]: W (106997) mqtt_client: Publish: Losing...