Replies: 6 comments 2 replies
-
Addendum: I used the LEDs to blink the high and low nibbles of value, and both seem to be 0 - also value must be 0 all the time. Do I need to tell Alexa or the Fauxmo lib that it is a dimmable device? |
Beta Was this translation helpful? Give feedback.
-
Just did a quick test with the following in my sketch: fauxmo.addDevice(DEVICE_NAME);
fauxmo.onSetState([](unsigned char device_id, const char * device_name, bool state, unsigned char value) {
Serial.printf("[MAIN] Device #%d (%s) state: %s value: %d\n", device_id, device_name, state ? "ON" : "OFF", value);
}); Gave Alexa the following commands, and my serial output follows: "Set light to zero":
"Set light to 100":
"Dim light":
"Set light to 50":
*Edit: Note that |
Beta Was this translation helpful? Give feedback.
-
Well, thank you for the quick reply, but no, does not work for me. I let the Alexa app detect the device as Philips Hue device, no Bluetooth enabled and a V1 hub. After the search the device is displayed in the app as a small house icon with a WiFi symbol on it - no light bulb icon. If I tell Alexa to dim the device, it is switche on regardless and value obviously is zero. Is there another recommended procedure? |
Beta Was this translation helpful? Give feedback.
-
This is normal, sadly. Perhaps try having it flash the LED |
Beta Was this translation helpful? Give feedback.
-
You might be getting into trouble because it's spending too long in the callback function. Rather than doing the |
Beta Was this translation helpful? Give feedback.
-
Found it by logging to a telnet session.... The problem partly was in front of the keyboard, as ever. I did not realize that Alexa keeps sending the same value when switching the device on and off, so my program always reacted as if the dim value had been set anew. Looks like my idea to use different dim values to trigger different reactions was not that bright; it relies on new dim values for on and off commands, that simply are not given. I now am disregarding the value if the iswitch state has changed, which mostly is solving the issue for me. Thank you for your thoughts. |
Beta Was this translation helpful? Give feedback.
-
I seem not to have understood yet the
value
parameter for the SetState callback.I tried to catch a certain percentage by
if (value >= 40 && value <= 49)
, but it seems never to get these values when called from Alexa.Unfortunately I cannot print the value received, since the device sits in a power plug with just two LEDs and no Serial available.
Is someone able to enlighten me?
Beta Was this translation helpful? Give feedback.
All reactions