Closed ivanvieirasalles closed 4 years ago
Please see switch example for how to send events to SinricPro server.
Also please check full documentation for all device types and their functions. All devices have the capability to send device specific events.
Thank you. worked properly.
I would like the following help: I am mounting with the ESP-12 a module with light. I felt the need to put the button on / off manually, but could not get the command to update the light state (on or off) in the Alexa application. NOTE: I have assembled other modules like Plugs and I was able to do it, but I didn't find a command that would update when it comes to light.
void ManualCommand () { unsigned long TempoNow = millis ();
if (digitalRead (PinKey_1) == LOW && TimeNow - TimeButton> 1000) {// This prevents button replication if (device_state.powerState) {// Invert the current value device_state.powerState = false; } else { device_state.powerState = true; }
// Here I turn on the light onPowerState (LIGHT_ID, device_state.powerState);
// The following command does not update the Alexa application. setupSinricPro ();
} }
Thanks to anyone who can help.