maximkulkin / esp-homekit-demo

Demo of Apple HomeKit accessory server library
MIT License
803 stars 233 forks source link

Sonoff_PWM Application #368

Closed kalindud closed 2 years ago

kalindud commented 4 years ago

Hi, I used the sonoff PWM with a AC Lightbulb using a ZVC circuit. But i used a different microcontroller IC to drive the ZVC. :D

Is it possible to modify the sonoff_pwm code to do the zvc detection and use just the IoT Device to control it?

Hope its possible... thanx

renandw commented 4 years ago

Based on this discussion, I do not think that is possible. https://github.com/maximkulkin/esp-homekit-demo/issues/345

kalindud commented 4 years ago

Any information on How to use : esp-ac-dimmer with homekit devices?

maximkulkin commented 2 years ago

esp-ac-dimmer is a library to control AC dimmer, the one that usually has Zero-Crossing trigger pin and a PWM pin (google "AC dimmer module"). Just connect Z-C and PWM pins to ESP, pass those to the library and specify AC frequency (needed to calculate duty cycle). You can use it e.g. to control brightness of incandescent light bulbs or dimmable LED bulbs. In HomeKit accessory firmware add BRIGHTNESS characteristic and call esp-ac-dimmer ac_dimmer_set_duty().