Skip to content

Commit

Permalink
Make ESPAlexa work again
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNitek committed May 18, 2020
1 parent 51a5c64 commit b849cff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RfidShelf/ShelfHtml.cpp
Expand Up @@ -2,7 +2,7 @@
#include "ShelfHtml.h"

const char ShelfHtml::INDEX[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x56, 0x92, 0x94, 0x5e, 0x02, 0xff, 0xc5, 0x3c,
0x1f, 0x8b, 0x08, 0x00, 0x6f, 0x89, 0xc2, 0x5e, 0x02, 0xff, 0xc5, 0x3c,
0x69, 0x77, 0xdb, 0xb6, 0x96, 0xdf, 0xe7, 0x9c, 0xf9, 0x0f, 0x08, 0xdb,
0x3e, 0xc9, 0xcf, 0x12, 0x25, 0x79, 0x4b, 0x2c, 0xcb, 0xea, 0xd8, 0x8e,
0x9d, 0xa5, 0xf1, 0x12, 0xcb, 0x71, 0xdb, 0xd7, 0x76, 0x7a, 0x28, 0x12,
Expand Down
5 changes: 3 additions & 2 deletions RfidShelf/ShelfWeb.cpp
Expand Up @@ -9,7 +9,8 @@ void ShelfWeb::begin() {
std::bind(&ShelfWeb::_handleFileUpload, this)
);
_server.onNotFound(defaultCallback);
_server.begin();
// Done by espalexa
//_server.begin();

DeviceCallbackFunction deviceCallback = std::bind(&ShelfWeb::_deviceCallback, this, std::placeholders::_1);
_alexaDevice = new EspalexaDevice(ShelfConfig::config.hostname, deviceCallback, EspalexaDeviceType::dimmable, 50);
Expand Down Expand Up @@ -357,7 +358,7 @@ void ShelfWeb::_handleFileUpload() {
void ShelfWeb::_handleDefault() {
String path = _server.urlDecode(_server.uri());
Sprintf("Request to: %s\n", path.c_str());
if (espalexa.handleAlexaApiCall(_server.uri(), _server.arg(0))) {
if (espalexa.handleAlexaApiCall(_server.uri(), _server.arg("plain"))) {
return;
}
if (_server.method() == HTTP_GET) {
Expand Down
Binary file modified RfidShelf/build/latest.bin
Binary file not shown.
7 changes: 4 additions & 3 deletions RfidShelf/platformio.ini
Expand Up @@ -12,7 +12,7 @@
src_dir = .

[env:nodemcuv2]
platform = espressif8266@2.3.2
platform = espressif8266
board = nodemcuv2
framework = arduino
; using my fork of Adafruit_VS1053 to allow long file names
Expand All @@ -29,9 +29,10 @@ lib_deps =
MFRC522@1.4.6
SPI
WifiManager@0.15.0
TheNitek/Espalexa
Espalexa
extra_scripts = platformio_script.py
monitor_speed = 115200
upload_speed = 921600
build_flags = -Os -Wall -Wl,-Teagle.flash.4m1m.ld
build_flags = -Os -Wall
board_build.ldscript = eagle.flash.4m1m.ld
board_build.f_cpu = 160000000L

0 comments on commit b849cff

Please sign in to comment.