Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alexa App not working on Arduino core 2.4.0 #10

Closed
d-works42 opened this issue Apr 9, 2018 · 7 comments
Closed

Alexa App not working on Arduino core 2.4.0 #10

d-works42 opened this issue Apr 9, 2018 · 7 comments

Comments

@d-works42
Copy link

Hi,
I can succesfully use the webinterface to controll an LED strip and it is found in the Alexa app without any issues. The on/off status and brightness changes in the webinterface also gets updated in the Alexa App. But performing actions like switching off or adjusting the brigness from the app side, doesn´t have any effect.
Am I missing something?
Thank you, David

@Aircoookie
Copy link
Owner

Hey,
I believe this is an issue I already know that happens when you use the ESP8266 core version 2.4.0 and compile the source yourself. There is a bug in the Alexa protocol which the ESP can't handle properly in that Arduino core version.
The "fix" for now is to either use Arduino core 2.3.0 or to apply this workaround: Aircoookie/Espalexa#6 (comment)
Let me know if this solves the problem for you!

@d-works42
Copy link
Author

Thank you,
must have missed this. Works perfect now! =)
Anyway, what would be the benefit of getting a Hue Hub and use the integration? May I use is for color changes on voice commands than?

@Aircoookie
Copy link
Owner

Aircoookie commented Apr 9, 2018

I'm glad that it works for you now! I'll keep the issue open for now so it can help others. :)

The hue integration can only work if you have the hue bridge hub and a hue lamp (preferably color). Due to the limitations of their API it is unfortunately impossible to add non-Hue lights to their system. All WLED can do is request the state of a Hue lamp every second or so (you can set this in the settings) and set itself to the same color. This means you can only control the WLED light together with the hue lamp, not separately. In that case, color changes via Alexa work perfectly! (although there is a small bug in the Hue protocol which can cause the color to be slightly different from the actual color for 30 seconds and then adjusting). Also it is the best way to use WLED with a Google home device, the other one being IFTTT, which is quite a hassle to setup and exposes your ESP to the public net. It would also work to borrow a hue color bulb, pair it to the bridge, and then remove it from the setup. You can then still update the "virtual" bulb without it being actually there and use it to control WLED.
Overall, in my opinion the hue integration feature is more aimed at those who want to cheaply extend their expensive hue setups using WLED and easily sync them. I don't know if it's worth the hassle for you personally to buy a hue setup just to control WLED colors by voice... Unless you always wanted to try out Philips hue itself (it's quite great!). /rant over =)

P.S.: I'd really love to extend the Alexa integration to support colors, but that is not possible with their current implementation of the local API. The only option which would work is to have a cloud based bridge server, which is both totally beyond my current abilities and to be avoided in an open-source project like WLED.

@Aircoookie Aircoookie changed the title Alexa App not working Alexa App not working on Arduino core 2.4.0 Apr 9, 2018
@nbietz
Copy link

nbietz commented Jun 26, 2018

Would it be possible to add each saved preset as a new "device" discoverable by Alexa. Then it could be possible to use Alexa voice control to switch between saved patterns/presets.

@Aircoookie
Copy link
Owner

Yes, this is a great idea! I'll add it soon, but it will take a while as there is a lot to do currently! I might even extend that so you could set the color by saying "Alexa, set hue to 20 percent", where you just roughly need to know, which hue on the 0-100 scale your color is.

@Juanko984
Copy link

I compiled the new code and applied the workaround in Arduino Core 2.4.1. Doesn't seem to work.
With every change I still get : Device 1 changed to ON.

@Aircoookie
Copy link
Owner

@Jakespta thanks for the feedback! I've never tried this workaround with core 2.4.1, just 2.4.0. Did a quick look and in 2.4.1 the line to replace is 192, not 193, but I believe you already figured that out!

Have you tried this with WLED or with Espalexa?

I'll have to install 2.4.1 and see if I can find a new workaround if the 2.4.0 workaround doesn't work anymore.

THATDONFC referenced this issue in atuline/WLED May 4, 2020
huksley pushed a commit to huksley/WLED that referenced this issue May 25, 2020
Merge changes from THATDONFC/master into atuline/master
profporridge pushed a commit to profporridge/WLED that referenced this issue Jan 21, 2023
Analog input seems to sometime have a very strong negative DC offset, when the signal is not centered at 1.8V. The bandpass filter should help to reenter such "off limits" signals.
See discussions in issue Aircoookie#10 .
softhack007 added a commit that referenced this issue Sep 8, 2023
this is a band-aid fix for random crashes when switching between presets with multiple segments - crossfade disabled.

!! adding type initializers fixed it for me on -S3, however I still see (less frequent) crashes on esp32, due to heap corruption.

It took me hours to get a meaningful stackdump:

assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas")

Backtrace: 0x40084ee1:0x3ffb2570 0x4008e341:0x3ffb2590 0x40094709:0x3ffb25b0 0x4008534a:0x3ffb26e0 0x40094739:0x3ffb2700 0x400e9037:0x3ffb2720 0x400e917c:0x3ffb2740 0x400eaeeb:0x3ffb2760 0x40117ec5:0x3ffb27c0 0x401184ea:0x3ffb2800 0x4013509d:0x3ffb2820

  #0  0x40084ee1:0x3ffb2570 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402
  #1  0x4008e341:0x3ffb2590 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128
  #2  0x40094709:0x3ffb25b0 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85
  #3  0x4008534a:0x3ffb26e0 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:360
      (inlined by) heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:345
  #4  0x40094739:0x3ffb2700 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39
  #5  0x400e9037:0x3ffb2720 in Segment::deallocateData() at wled00/FX_fcn.cpp:189
  #6  0x400e917c:0x3ffb2740 in Segment::resetIfRequired() at wled00/FX_fcn.cpp:206
      (inlined by) Segment::resetIfRequired() at wled00/FX_fcn.cpp:203
  #7  0x400eaeeb:0x3ffb2760 in WS2812FX::service() at wled00/FX_fcn.cpp:1216 (discriminator 2)
  #8  0x40117ec5:0x3ffb27c0 in WLED::loop() at wled00/wled.cpp:115 (discriminator 3)
  #9  0x401184ea:0x3ffb2800 in loop() at C:/src/wled00/wled00.ino:20
  #10 0x4013509d:0x3ffb2820 in loopTask(void*) at C:/Users/user/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50

ELF file SHA256: 18c20b536f4c6ef4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants