1 Commits

Author SHA1 Message Date
Andreas Doebeli
ed191f28e7 got connection to mqtt broker working again 2020-09-14 03:01:16 +02:00
15 changed files with 164 additions and 270 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
.pioenvs
.piolibdeps
.pio .pio
.vscode .vscode
data/config.json data/config.json

View File

@@ -1,4 +1,4 @@
image: python:3.12.10 image: python:2.7-stretch
variables: variables:
S3_BUCKET_NAME: "wirelos" S3_BUCKET_NAME: "wirelos"
@@ -12,16 +12,16 @@ stages:
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- .pio/ - .pioenvs/
firmware: firmware:
stage: build stage: build
image: python:3.12.10 image: python:2.7-stretch
before_script: before_script:
- pip install -U platformio - pip install -U platformio
script: script:
- pio run -t clean - pio run -t clean
- pio run -e release - pio run
- pio run -t buildfs - pio run -t buildfs
release: release:
@@ -30,11 +30,11 @@ release:
- /^release-.*$/ - /^release-.*$/
image: python:latest image: python:latest
script: script:
#- pip install awscli - pip install awscli
- mkdir -p ${PROJECT_NAME}/${CI_COMMIT_TAG} - mkdir -p ${PROJECT_NAME}/${CI_COMMIT_TAG}
- mv .pio/build/release/firmware.bin ${PROJECT_NAME}/${CI_COMMIT_TAG} - mv .pioenvs/release/firmware.bin ${PROJECT_NAME}/${CI_COMMIT_TAG}
- mv .pio/build/release/spiffs.bin ${PROJECT_NAME}/${CI_COMMIT_TAG} - mv .pioenvs/release/spiffs.bin ${PROJECT_NAME}/${CI_COMMIT_TAG}
#- aws s3 --endpoint-url=https://$DO_SPACE_ENDPOINT cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin" - aws s3 --endpoint-url=https://$DO_SPACE_ENDPOINT cp ./ s3://$S3_BUCKET_NAME/ --recursive --exclude "*" --include "*.bin"
artifacts: artifacts:
paths: paths:
- ${PROJECT_NAME}/${CI_COMMIT_TAG} - ${PROJECT_NAME}/${CI_COMMIT_TAG}

View File

@@ -1,8 +0,0 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: make install

View File

@@ -1,40 +0,0 @@
PIO ?= platformio
flash: upload uploadfs
install:
python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
init:
curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/master/scripts/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
build:
$(PIO) run -e esp01
upload:
$(PIO) run -e esp01 -t upload
uploadfs:
$(PIO) run -e esp01 -t uploadfs
spiffs.bin:
#mkspiffs -c data -p 256 -b 4096 -s 524288 spiffs.bin
mkspiffs -c data -p 256 -b 4096 -s 65536 spiffs.bin
upload-esp01:
#esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size 1MB 0x00000 .pio/build/esp01/firmware.bin
#esptool.py --port /dev/ttyUSB0 --baud 57600 write_flash --flash_size 1MB 0x80000 spiffs.bin
# that almost worked
#esptool.py --port /dev/ttyUSB0 --baud 57600 write_flash --flash_mode dio --flash_size 1MB 0x00000 .pio/build/esp01/firmware.bin 0x80000 spiffs.bin
#pio does this
esptool.py --chip esp8266 --port "/dev/ttyUSB0" --baud 921600 write_flash 0x0 .pio/build/esp01/firmware.bin 0x000eb000 spiffs.bin
esptool.py --port /dev/ttyUSB0 --baud 57600 write_flash 43827 spiffs.bin
# for 4MB Flash Size, 3MB SPIFFS
#spiffs.bin:
# mkspiffs -c data -p 256 -b 4096 -s 3145728 spiffs.bin
#
#upload-spiffs.bin:
# esptool --port /dev/ttyUSB0 write_flash 0x300000 spiffs.bin

2
api.md
View File

@@ -51,7 +51,7 @@ Examples:
curl -v -X POST \ curl -v -X POST \
--data "topic=pixels/colorWheel" \ --data "topic=pixels/colorWheel" \
--data "payload=20" \ --data "payload=20" \
http://192.168.4.1/pixel/api http://illucat/pixel/api
# set color only on current node # set color only on current node
curl -v -X POST \ curl -v -X POST \

9
data/config/mqtt.json Normal file
View File

@@ -0,0 +1,9 @@
{
"mqttClientName": "illucat1",
"mqttBrokerHost": "192.168.88.110",
"mqttBrokerPort": 1883,
"mqttRootTopic": "wirelos/illucat",
"mqttUser": "",
"mqttPass": ""
}

View File

@@ -1,9 +1,9 @@
{ {
"stationMode": 0, "stationMode": 1,
"hostname": "illucat", "hostname": "illucat",
"apSSID": "illucat", "apSSID": "illucat",
"apPassword": "illumination", "apPassword": "illumination",
"connectTimeout": 15000, "connectTimeout": 5000,
"stationSSID": "dis-wifi", "stationSSID": "thobens-416257",
"stationPassword": "dis-wifi-passwort" "stationPassword": "467304645DB5"
} }

View File

@@ -1,6 +1,9 @@
{ {
"mqttClientName": "illucat1", "mqttClientName": "illucat1",
"mqttBrokerHost" : "192.168.1.2", "mqttBrokerHost": "192.168.4.1",
"mqttBrokerPort": 1883, "mqttBrokerPort": 1883,
"mqttRootTopic" : "wirelos/illucat" "mqttRootTopic": "wirelos/illucat",
"mqttUser": "foo",
"mqttPass": ""
} }

View File

@@ -1,7 +1,7 @@
{ {
"pin": 4, "pin": 4,
"length": 8, "length": 8,
"brightness": 50, "brightness": 127,
"updateInterval": 100, "updateInterval": 100,
"defaultColor": 100 "defaultColor": 100
} }

View File

@@ -16,46 +16,23 @@
<span class="heading">Pixels</span> <span class="heading">Pixels</span>
<div class="content"> <div class="content">
<ul> <ul>
<li class="form-row ParamSelect" <li class="form-row ParamSelect" data-label="Hue" data-name="hue" data-topic="pixels/hue" data-default="0"
data-label="Hue"
data-name="hue"
data-topic="pixels/hue"
data-default="0"
data-external="/gradients.json"> data-external="/gradients.json">
</li> </li>
<li class="form-row ParamColor" <li class="form-row ParamColor" data-name="color" data-topic="pixels/color" data-label="Color">
data-name="color"
data-topic="pixels/color"
data-label="Color">
</li> </li>
<li class="form-row ParamColor" <li class="form-row ParamColor" data-name="color" data-topic="pixels/color2" data-label="Color 2">
data-name="color"
data-topic="pixels/color2"
data-label="Color 2">
</li> </li>
<!-- data-entries='[{"text": "Color", "value": "0"}, {"text": "Rainbow", "value": "1"}, {"text": "TheaterChase", "value": "2"}, {"text": "Wipe", "value": "3"}, {"text": "Scanner", "value": "4"}, {"text": "Fade", "value": "5"}]' --> <!-- data-entries='[{"text": "Color", "value": "0"}, {"text": "Rainbow", "value": "1"}, {"text": "TheaterChase", "value": "2"}, {"text": "Wipe", "value": "3"}, {"text": "Scanner", "value": "4"}, {"text": "Fade", "value": "5"}]' -->
<li class="form-row ParamSelect" <li class="form-row ParamSelect" data-label="Pattern" data-name="pattern" data-topic="pixels/pattern"
data-label="Pattern"
data-name="pattern"
data-topic="pixels/pattern"
data-default="0" data-default="0"
data-entries='[{"text": "None", "value": "0"}, {"text": "Rainbow", "value": "1"}, {"text": "TheaterChase", "value": "2"}, {"text": "Color Wipe", "value": "3"}, {"text": "Scanner", "value": "4"}, {"text": "Fade", "value": "5"}, {"text": "Fire", "value": "6"}]' data-entries='[{"text": "None", "value": "0"}, {"text": "Rainbow", "value": "1"}, {"text": "TheaterChase", "value": "2"}, {"text": "Color Wipe", "value": "3"}, {"text": "Scanner", "value": "4"}, {"text": "Fade", "value": "5"}, {"text": "Fire", "value": "6"}]'>
></li>
<li class="form-row ParamSlider"
data-name="brightness"
data-min="0"
data-max="255"
data-value="64"
data-topic="pixels/brightness"
data-label="Brightness">
</li> </li>
<li class="form-row ParamSlider" <li class="form-row ParamSlider" data-name="brightness" data-min="0" data-max="255" data-value="64"
data-name="totalSteps" data-topic="pixels/brightness" data-label="Brightness">
data-min="1" </li>
data-max="255" <li class="form-row ParamSlider" data-name="totalSteps" data-min="1" data-max="255" data-value="16"
data-value="16" data-topic="pixels/totalSteps" data-label="Steps">
data-topic="pixels/totalSteps"
data-label="Steps">
</li> </li>
</ul> </ul>
</div> </div>
@@ -70,12 +47,15 @@
<span class="heading">Settings</span> <span class="heading">Settings</span>
<div class="content"> <div class="content">
<h2>Network</h2> <h2>Network</h2>
<div class="Form" data-fileName="/config/wifi.json" data-name="configForm" data-from="/config/wifi.json" data-endpoint="/config"></div> <div class="Form" data-fileName="/config/wifi.json" data-name="configForm" data-from="/config/wifi.json"
data-endpoint="/config"></div>
<h2>NeoPixel</h2> <h2>NeoPixel</h2>
<div class="Form" data-fileName="/pixelConfig.json" data-name="configForm" data-from="/pixelConfig.json" data-endpoint="/config"></div> <div class="Form" data-fileName="/pixelConfig.json" data-name="configForm" data-from="/pixelConfig.json"
<!-- <h2>MQTT</h2> data-endpoint="/config"></div>
<div class="Form" data-fileName="/mqttConfig.json" data-name="configForm" data-from="/mqttConfig.json" data-endpoint="/config"></div> <h2>MQTT</h2>
<h2>IRC</h2> <div class="Form" data-fileName="/config/mqtt.json" data-name="configForm" data-from="/config/mqtt.json"
data-endpoint="/config"></div>
<!-- <h2>IRC</h2>
<div class="Form" data-fileName="/ircConfig.json" data-name="configForm" data-from="/ircConfig.json" data-endpoint="/config"></div> --> <div class="Form" data-fileName="/ircConfig.json" data-name="configForm" data-from="/ircConfig.json" data-endpoint="/config"></div> -->
</div> </div>
</div> </div>

View File

@@ -8,64 +8,28 @@
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html ; http://docs.platformio.org/page/projectconf.html
[platformio] ;[platformio]
env_default = build ;env_default = build
[common] [common]
framework = arduino framework = arduino
platform = platformio/espressif8266@2.3.2 platform = espressif8266@2.0.4
board = esp12e board = esp12e
upload_speed = 115200 upload_speed = 115200
monitor_baud = 115200 monitor_baud = 74880
lib_deps = lib_deps =
Hash Hash
TaskScheduler TaskScheduler
SPIFFS
ArduinoJson@5.13.4 ArduinoJson@5.13.4
adafruit/Adafruit NeoPixel@1.7.0 Adafruit NeoPixel
me-no-dev/ESPAsyncTCP@1.2.0 ESPAsyncTCP
me-no-dev/ESPAsyncWebServer@1.2.3
me-no-dev/AsyncTCP@1.1.1
ESP8266mDNS ESP8266mDNS
;symlink://../../core ESP Async WebServer
;symlink://../../plugins/neopixel https://gitlab.com/wirelos/sprocket-lib.git#develop
https://gitlab.com/wirelos/sprocket-lib.git#master https://gitlab.com/wirelos/sprocket-plugin-neopixel.git
https://gitlab.com/wirelos/sprocket-plugin-neopixel.git#master
[env:esp01]
src_filter = +<*> -<var/> +<var/wifi/>
platform = ${common.platform}
board = esp01_1m
board_build.f_cpu = 80000000L
board_build.flash_mode = qio
board_build.filesystem = spiffs
board_build.ldscript = eagle.flash.1m256.ld
upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
build_flags = -Wl,-Teagle.flash.1m256.ld -DSPROCKET_PRINT=1
lib_deps = ${common.lib_deps}
;symlink://../../network/wifi
;symlink://../../plugins/web
https://gitlab.com/wirelos/sprocket-network-wifi.git#master
https://gitlab.com/wirelos/sprocket-plugin-web.git#master
;[env:build-esp32]
;platform = espressif32
;board = esp32dev
;src_filter = +<*> -<var/> +<var/wifi/>
;upload_speed = ${common.upload_speed}
;monitor_baud = ${common.monitor_baud}
;framework = ${common.framework}
;build_flags = -DSPROCKET_PRINT=1
;lib_deps = ${common.lib_deps}
; symlink://../../network/wifi
; symlink://../../plugins/web
; ;https://gitlab.com/wirelos/sprocket-network-wifi.git#next
; ;https://gitlab.com/wirelos/sprocket-plugin-web.git#next
;
;
[env:build] [env:build]
src_filter = +<*> -<var/> +<var/wifi/> src_filter = +<*> -<var/> +<var/wifi/>
platform = ${common.platform} platform = ${common.platform}
@@ -76,10 +40,22 @@ framework = ${common.framework}
build_flags = -Wl,-Teagle.flash.4m1m.ld build_flags = -Wl,-Teagle.flash.4m1m.ld
-DSPROCKET_PRINT=1 -DSPROCKET_PRINT=1
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
;symlink://../../network/wifi https://gitlab.com/wirelos/sprocket-network-wifi.git#next
;symlink://../../plugins/web https://gitlab.com/wirelos/sprocket-plugin-web.git#next
https://gitlab.com/wirelos/sprocket-network-wifi.git#master
https://gitlab.com/wirelos/sprocket-plugin-web.git#master
[env:build-mesh]
src_filter = +<*> -<var/> +<var/wifiMesh/>
platform = ${common.platform}
board = ${common.board}
upload_speed = ${common.upload_speed}
monitor_baud = ${common.monitor_baud}
framework = ${common.framework}
build_flags = -Wl,-Teagle.flash.4m1m.ld
-DSPROCKET_PRINT=1
lib_deps = ${common.lib_deps}
https://gitlab.com/wirelos/painlessMesh.git
https://gitlab.com/wirelos/sprocket-network-mesh.git#forked-mesh
[env:release] [env:release]
src_filter = +<*> -<var/> +<var/wifi/> src_filter = +<*> -<var/> +<var/wifi/>
@@ -91,69 +67,38 @@ framework = ${common.framework}
build_flags = -Wl,-Teagle.flash.4m1m.ld build_flags = -Wl,-Teagle.flash.4m1m.ld
-DSPROCKET_PRINT=0 -DSPROCKET_PRINT=0
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
;symlink://../../network/wifi https://gitlab.com/wirelos/sprocket-network-wifi.git#next
;symlink://../../plugins/web https://gitlab.com/wirelos/sprocket-plugin-web.git#next
https://gitlab.com/wirelos/sprocket-network-wifi.git#master
https://gitlab.com/wirelos/sprocket-plugin-web.git#master
;[env:build-mesh] [env:mqcatt]
;src_filter = +<*> -<var/> +<var/wifiMesh/> src_filter = +<*> -<var/> +<var/mqcatt/>
;platform = ${common.platform} platform = ${common.platform}
;board = ${common.board} board = ${common.board}
;upload_speed = ${common.upload_speed} upload_speed = ${common.upload_speed}
;monitor_baud = ${common.monitor_baud} monitor_baud = ${common.monitor_baud}
;framework = ${common.framework} framework = ${common.framework}
;build_flags = -Wl,-Teagle.flash.4m1m.ld build_flags = -Wl,-Teagle.flash.4m1m.ld
; -DSPROCKET_PRINT=1 -DSPROCKET_PRINT=1
;lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
; https://gitlab.com/wirelos/painlessMesh.git https://gitlab.com/wirelos/sprocket-network-wifi.git#next
; https://gitlab.com/wirelos/sprocket-network-mesh.git#forked-mesh https://gitlab.com/wirelos/sprocket-plugin-web.git#next
; https://gitlab.com/wirelos/sprocket-plugin-mqtt.git#next
;[env:release] PubSubClient
;src_filter = +<*> -<var/> +<var/wifi/>
;platform = ${common.platform} [env:illuchat]
;board = ${common.board} src_filter = +<*> -<var/> +<var/illuchat/>
;upload_speed = ${common.upload_speed} platform = ${common.platform}
;monitor_baud = ${common.monitor_baud} board = ${common.board}
;framework = ${common.framework} upload_speed = ${common.upload_speed}
;build_flags = -Wl,-Teagle.flash.4m1m.ld monitor_baud = ${common.monitor_baud}
; -DSPROCKET_PRINT=0 framework = ${common.framework}
;lib_deps = ${common.lib_deps} build_flags = -Wl,-Teagle.flash.4m1m.ld
; symlink://../../network/wifi -DSPROCKET_PRINT=1
; symlink://../../plugins/web lib_deps = ${common.lib_deps}
; ;https://gitlab.com/wirelos/sprocket-network-wifi.git#next https://gitlab.com/wirelos/sprocket-network-wifi.git#next
; ;https://gitlab.com/wirelos/sprocket-plugin-web.git#next https://gitlab.com/wirelos/sprocket-plugin-web.git#next
; https://gitlab.com/wirelos/sprocket-plugin-irc.git
;[env:mqcatt] https://gitlab.com/wirelos/sprocket-plugin-mqtt.git#next
;src_filter = +<*> -<var/> +<var/mqcatt/> PubSubClient
;platform = ${common.platform} ArduinoIRC
;board = ${common.board}
;upload_speed = ${common.upload_speed}
;monitor_baud = ${common.monitor_baud}
;framework = ${common.framework}
;build_flags = -Wl,-Teagle.flash.4m1m.ld
; -DSPROCKET_PRINT=1
;lib_deps = ${common.lib_deps}
; https://gitlab.com/wirelos/sprocket-network-wifi.git#next
; https://gitlab.com/wirelos/sprocket-plugin-web.git#next
; https://gitlab.com/wirelos/sprocket-plugin-mqtt.git#next
; PubSubClient
;
;[env:illuchat]
;src_filter = +<*> -<var/> +<var/illuchat/>
;platform = ${common.platform}
;board = ${common.board}
;upload_speed = ${common.upload_speed}
;monitor_baud = ${common.monitor_baud}
;framework = ${common.framework}
;build_flags = -Wl,-Teagle.flash.4m1m.ld
; -DSPROCKET_PRINT=1
;lib_deps = ${common.lib_deps}
; https://gitlab.com/wirelos/sprocket-network-wifi.git#next
; https://gitlab.com/wirelos/sprocket-plugin-web.git#next
; https://gitlab.com/wirelos/sprocket-plugin-irc.git
; https://gitlab.com/wirelos/sprocket-plugin-mqtt.git#next
; PubSubClient
; ArduinoIRC
;

View File

@@ -8,8 +8,8 @@
// Chip config // Chip config
#define SPROCKET_TYPE "ILLUCAT" #define SPROCKET_TYPE "ILLUCAT"
#define SERIAL_BAUD_RATE 115200 #define SERIAL_BAUD_RATE 74880
#define STARTUP_DELAY 1000 #define STARTUP_DELAY 5000
// Mesh config // Mesh config
#define SPROCKET_MODE 0 #define SPROCKET_MODE 0
@@ -19,8 +19,8 @@
#define AP_PASSWORD "illumination" #define AP_PASSWORD "illumination"
#define MESH_PREFIX "illucat-mesh" #define MESH_PREFIX "illucat-mesh"
#define MESH_PASSWORD "th3r31sn0sp00n" #define MESH_PASSWORD "th3r31sn0sp00n"
#define STATION_SSID "MyAP" #define STATION_SSID "thobens-416257"
#define STATION_PASSWORD "th3r31sn0sp00n" #define STATION_PASSWORD "467304645DB5"
#define HOSTNAME "illucat" #define HOSTNAME "illucat"
#define CONNECT_TIMEOUT 10000 #define CONNECT_TIMEOUT 10000
#define MESH_DEBUG_TYPES ERROR | STARTUP | CONNECTION #define MESH_DEBUG_TYPES ERROR | STARTUP | CONNECTION
@@ -46,5 +46,6 @@
#define LED_STRIP_DEFAULT_COLOR 100 #define LED_STRIP_DEFAULT_COLOR 100
#define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR #define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR
#define COLOR_NOT_CONNECTED 255 #define COLOR_NOT_CONNECTED 255
#define LED_STRIP_DEFAULT_PATTERN 1
#endif #endif

View File

@@ -1,6 +1,7 @@
#include "mqcatt_config.h" #include "mqcatt_config.h"
#include <WiFiNet.h> #include <WiFiNet.h>
#include <Sprocket.h> #include <Sprocket.h>
#include "../../IlluCat.h"
#include <ESPAsyncWebServer.h> #include <ESPAsyncWebServer.h>
#include <WebServerConfig.h> #include <WebServerConfig.h>
#include <WebServerPlugin.h> #include <WebServerPlugin.h>
@@ -21,7 +22,7 @@ void setup()
{ {
sprocket = new Sprocket({STARTUP_DELAY, SERIAL_BAUD_RATE}); sprocket = new Sprocket({STARTUP_DELAY, SERIAL_BAUD_RATE});
pixelPlugin = new PixelPlugin({LED_STRIP_PIN, LED_STRIP_LENGTH, LED_STRIP_BRIGHTNESS, LED_STRIP_UPDATE_INTERVAL}); pixelPlugin = new PixelPlugin({LED_STRIP_PIN, LED_STRIP_LENGTH, LED_STRIP_BRIGHTNESS, LED_STRIP_UPDATE_INTERVAL});
mqttPlugin = new MqttPlugin({MQTT_CLIENT_NAME, MQTT_HOST, MQTT_PORT, MQTT_ROOT_TOPIC}); mqttPlugin = new MqttPlugin({MQTT_CLIENT_NAME, MQTT_HOST, MQTT_PORT, MQTT_ROOT_TOPIC, MQTT_USER, MQTT_PASS});
webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT}); webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT});
webConfigPlugin = new WebConfigPlugin(webServerPlugin->server); webConfigPlugin = new WebConfigPlugin(webServerPlugin->server);
webApiPlugin = new WebApiPlugin(webServerPlugin->server); webApiPlugin = new WebApiPlugin(webServerPlugin->server);
@@ -42,7 +43,7 @@ void setup()
network->connect(); network->connect();
webServerPlugin->server->serveStatic(PIXEL_CONFIG_FILE, SPIFFS, "pixelConfig.json"); webServerPlugin->server->serveStatic(PIXEL_CONFIG_FILE, SPIFFS, "pixelConfig.json");
webServerPlugin->server->serveStatic(MQTT_CONFIG_FILE, SPIFFS, "mqttConfig.json"); webServerPlugin->server->serveStatic(MQTT_CONFIG_FILE, SPIFFS, "config/mqtt.json");
sprocket->activate(); sprocket->activate();
sprocket->publish("pixels/pattern", "1"); sprocket->publish("pixels/pattern", "1");

View File

@@ -8,8 +8,8 @@
// Chip config // Chip config
#define SPROCKET_TYPE "ILLUCAT" #define SPROCKET_TYPE "ILLUCAT"
#define SERIAL_BAUD_RATE 115200 #define SERIAL_BAUD_RATE 74880
#define STARTUP_DELAY 1000 #define STARTUP_DELAY 5000
// Network config // Network config
#define WIFI_MODE 0 #define WIFI_MODE 0
@@ -18,14 +18,14 @@
#define AP_PASSWORD "illumination" #define AP_PASSWORD "illumination"
#define MESH_PREFIX "illucat-mesh" #define MESH_PREFIX "illucat-mesh"
#define MESH_PASSWORD "th3r31sn0sp00n" #define MESH_PASSWORD "th3r31sn0sp00n"
#define STATION_SSID "MyAP" #define STATION_SSID "thobens-416257"
#define STATION_PASSWORD "th3r31sn0sp00n" #define STATION_PASSWORD "467304645DB5"
#define HOSTNAME "illucat" #define HOSTNAME "illucat"
#define CONNECT_TIMEOUT 10000 #define CONNECT_TIMEOUT 10000
// config files // config files
#define PIXEL_CONFIG_FILE "/pixelConfig.json" #define PIXEL_CONFIG_FILE "/pixelConfig.json"
#define MQTT_CONFIG_FILE "/mqttConfig.json" #define MQTT_CONFIG_FILE "/config/mqtt.json"
// NeoPixel // NeoPixel
#define LED_STRIP_PIN D2 #define LED_STRIP_PIN D2
@@ -35,7 +35,7 @@
#define LED_STRIP_DEFAULT_COLOR 100 #define LED_STRIP_DEFAULT_COLOR 100
#define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR #define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR
#define COLOR_NOT_CONNECTED 255 #define COLOR_NOT_CONNECTED 255
#define LED_STRIP_DEFAULT_PATTERN 1
// OTA config // OTA config
#define OTA_PORT 8266 #define OTA_PORT 8266
@@ -43,9 +43,11 @@
// mqtt config // mqtt config
#define MQTT_CLIENT_NAME "illucat" #define MQTT_CLIENT_NAME "illucat"
#define MQTT_HOST "192.168.1.2" #define MQTT_HOST "192.168.88.110"
#define MQTT_PORT 1883 #define MQTT_PORT 1883
#define MQTT_ROOT_TOPIC "wirelos/illucat" #define MQTT_ROOT_TOPIC "wirelos/illucat"
#define MQTT_USER ""
#define MQTT_PASS ""
// WebServer // WebServer
#define WEB_CONTEXT_PATH "/" #define WEB_CONTEXT_PATH "/"
@@ -53,5 +55,4 @@
#define WEB_DEFAULT_FILE "index.html" #define WEB_DEFAULT_FILE "index.html"
#define WEB_PORT 80 #define WEB_PORT 80
#endif #endif