Aircoookie / Espalexa

Alexa voice control for ESP8266/ESP32 (including brightness and color!)
MIT License
548 stars 137 forks source link

increase & decrease voice commands destroy onoff device operation #187

Open blopa1961 opened 3 years ago

blopa1961 commented 3 years ago

I integrated espalexa into an ESP8266 relay control. "Alexa turn on device" or turn off device work as expected, but software must be bullet proof when exposed to users (even my family)... if I say "Alexa increase device" I get a non zero and non-255 value. My device is not a dimmer. Echo dot (4th gen) remembers last state and a second increase command will increase the value (as if the device were a dimmer), still not zero and not 255, so, a decrease command will not turn the light off. In some cases (still investigating) if the relay is OFF (parameter == 0), an increase command will make it flash (turn on, then immediately off). I did declare the device as onoff in addDevice using EspalexaDeviceType::onoff which I understand is deprecated. How should I declare an onoff device; is there a workaround for this problem? Thank you.