vintlabs / fauxmoESP

Add voice control of your ESP32 and ESP8266 devices using Amazon Alexa
MIT License
386 stars 69 forks source link

How To use fauxmo.setState #256

Open artekdrzyzga opened 8 months ago

artekdrzyzga commented 8 months ago

I use fauxmoESP_Color.ino from Colour branch as an example. Everything works correctly.

I added a button to change the state.

if (digitalRead(Switch1) == LOW) { delay(200); fauxmo.setState("LED Test", true, 0, 0); while (digitalRead(Switch1) == LOW); } can you tell me how to use fauxmo.setState correctly??

regards
Arthur

ddweber456 commented 7 months ago

It looks like you might have 1 to many parameters in you call statement

fauxmo.setState(ID_YELLOW, true, 255); I'm sure you already caught that.

What would "correctly" look like for your example. A toggle switch on/off/on/off or a momentary where the light is off or on while the button is pressed.