Open m50008 opened 3 years ago
The alexa code looks properly setup to me, are you using the latest version of the master branch? as for the ui, you didn't mention uploading the data to the esp, so I assume you're missing that step.
Hi,
can you provide me your platform io ini? Then I can try to get rid of the compile errors.
In the installation instructions it is described how to upload the webinterface files to the ESP. But this involves the Ardione IDE. There are other possibilities to do that but they are currently not implemented. Same here, I would try to fix that.
Platform IO support would be great. 😀
Thanks for the hint with the alexa constant. I have also compiling issues when alexa is not enabled.
My platformio.ini with the data_dir
configuration. Data_dir points to the data folder with the assets.
; platformio.ini
[platformio]
data_dir = src/data
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =
fastled/FastLED@^3.4.0
tzapu/WiFiManager@^2.0.4-beta
aircoookie/Espalexa@0.0.0-alpha+sha.09981160b5
monitor_speed = 115200
To upload the files to the filesystem you must run the task.
Main Menu --> Terminal --> Run Task --> Platformio: Upload Filesystem Image (d1_mini)
Thank you for the input. I will test the setup tomorrow.
I imported the project into platform.io.
Renamed src/esp8266-fastled-iot-webserver.ino
to src/esp8266-fastled-iot-webserver.cpp
Then added following file to source:
src/esp8266-fastled-iot-webserver.h
void sendInt(int);
void broadcastInt(String, int);
void ShiftLeds(int);
void SendLeds(CHSV, int);
void ShiftLedsCenter(int);
void SendLedsCenter(CHSV);
void pride();
void colorWaves();
void rainbow();
void rainbowSolid();
void confetti();
void sinelon();
void bpm();
void juggle();
void fire();
void water();
void strobe();
void rainbow_strobe();
void smooth_rainbow_strobe();
void rainbowRoll();
void rainbowBeat();
void randomPaletteFades();
void rainbowChase();
void randomDots();
void randomFades();
void policeLights();
void glitter();
void snowFlakes();
void lightning();
void vuMeterSolid();
void vuMeterStaticRainbow();
void vuMeterRainbow();
void vuMeterTriColor();
void RefreshingVisualizer();
void CentralVisualizer();
void SolidColorDualTone();
void SolidColorComplementary();
void BluePurpleBullets();
void BulletVisualizer();
void RainbowBassRings();
void RainbowKickRings();
void RainbowBandVisualizer();
void SingleColorBandVisualizer();
void showSolidColor();
void setPattern(int);
void broadcastString(String, String);
void loadConfig();
void setPower(int);
void setSpeed(int);
void sendString(String);
void setPatternName(String);
void setPalette(int);
void setPaletteName(String);
void setBrightness(int);
void setAutoplay(int);
void setAutoplayDuration(int);
void adjustPattern(int);
bool isValidHostname(char*, long);
void addGlitter(int);
void heatMap(CRGBPalette16, int);
void colorwaves(CRGB*, uint16_t, CRGBPalette16&);
bool FadeUp(CRGB, int, int, int, int, int);
CHSV getVisualizerBulletValue(double);
void SendTrailingLeds(CHSV, int);
void kickRingVisualizer(CHSV, int);
void bassRingVisualizer(CHSV, int);
void paintRing(CHSV, int, int, int);
CHSV getFadedColor(CHSV, int, int);
then included it to src/esp8266-fastled-iot-webserver.cpp
after #include "Field.h"
#include "esp8266-fastled-iot-webserver.h"
Used following platformio.ini
[platformio]
data_dir = src/data
[env:d1]
platform = espressif8266
board = d1
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
lib_deps =
fastled/FastLED@^3.4.0
tzapu/WiFiManager@^2.0.4-beta
monitor_speed = 115200
upload_speed = 460800
build_flags =
-Wno-switch
-Wno-deprecated-declarations
-Wno-write-strings
-Wno-unused-variable
-Wno-unused-value
-Wno-sign-compare
-Wno-unused-but-set-variable
-Wno-return-type
-Wno-sequence-point
-Wno-narrowing
It seems to compile without any problems but the linker "ld" has issues to link everything together.
/Users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/d1/src/esp8266-fastled-iot-webserver.cpp.o:(.text._Z5waterv+0x8): undefined reference to `heatMap(CRGBPalette16, int)'
/Users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/d1/src/esp8266-fastled-iot-webserver.cpp.o: in function `water()':
esp8266-fastled-iot-webserver.cpp:(.text._Z5waterv+0x22): undefined reference to `heatMap(CRGBPalette16, int)'
/Users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/d1/src/esp8266-fastled-iot-webserver.cpp.o: in function `fire()':
esp8266-fastled-iot-webserver.cpp:(.text._Z4firev+0x18): undefined reference to `heatMap(CRGBPalette16, int)'
/Users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/d1/src/esp8266-fastled-iot-webserver.cpp.o:(.text._Z13setSolidColorhhhb+0x4): undefined reference to `setPattern(int)'
/Users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/d1/src/esp8266-fastled-iot-webserver.cpp.o:(.text._Z13setSolidColorhhhb+0x4f): undefined reference to `setPattern(int)'
I'm a bit lost here, can someone help?
Hi, i have two main issues. The first one, I can not compile the file if the Espalexa lib is not installed, even if the
#define ENABLE_ALEXA_SUPPORT
is commented out. If the Espalexa lib is installed and#define ENABLE_ALEXA_SUPPORT
is commented out, I get the following error: So when defining AlexaSupport it compiles. But this leades to the secound issue. When uploading, the connecting with the esp workes and i am able to edit my wifi credentials and the esp connects to my wifi. But when I try to connect to the ESP via the Browser, it just loades a page with "Not found". What should i do now? Thanks in advance!I build the code for the 3D-Printed Desk Lamp, so apart from changing the
DEVICE_TYPE
to 3 and enabling#define ENABLE_ALEXA_SUPPORT
to compile the sketch i did not change anything to the code.