mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-19 11:15:51 +01:00
Compare commits
1 Commits
master
...
bugfix/mqt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed191f28e7 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
.pio
|
||||
.vscode
|
||||
data/config.json
|
||||
@@ -1,4 +1,4 @@
|
||||
image: python:3.12.10
|
||||
image: python:2.7-stretch
|
||||
|
||||
variables:
|
||||
S3_BUCKET_NAME: "wirelos"
|
||||
@@ -12,16 +12,16 @@ stages:
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- .pio/
|
||||
- .pioenvs/
|
||||
|
||||
firmware:
|
||||
stage: build
|
||||
image: python:3.12.10
|
||||
image: python:2.7-stretch
|
||||
before_script:
|
||||
- pip install -U platformio
|
||||
script:
|
||||
- pio run -t clean
|
||||
- pio run -e release
|
||||
- pio run
|
||||
- pio run -t buildfs
|
||||
|
||||
release:
|
||||
@@ -30,11 +30,11 @@ release:
|
||||
- /^release-.*$/
|
||||
image: python:latest
|
||||
script:
|
||||
#- pip install awscli
|
||||
- pip install awscli
|
||||
- mkdir -p ${PROJECT_NAME}/${CI_COMMIT_TAG}
|
||||
- mv .pio/build/release/firmware.bin ${PROJECT_NAME}/${CI_COMMIT_TAG}
|
||||
- mv .pio/build/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"
|
||||
- mv .pioenvs/release/firmware.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"
|
||||
artifacts:
|
||||
paths:
|
||||
- ${PROJECT_NAME}/${CI_COMMIT_TAG}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
40
Makefile
40
Makefile
@@ -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
2
api.md
@@ -51,7 +51,7 @@ Examples:
|
||||
curl -v -X POST \
|
||||
--data "topic=pixels/colorWheel" \
|
||||
--data "payload=20" \
|
||||
http://192.168.4.1/pixel/api
|
||||
http://illucat/pixel/api
|
||||
|
||||
# set color only on current node
|
||||
curl -v -X POST \
|
||||
|
||||
9
data/config/mqtt.json
Normal file
9
data/config/mqtt.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"mqttClientName": "illucat1",
|
||||
"mqttBrokerHost": "192.168.88.110",
|
||||
"mqttBrokerPort": 1883,
|
||||
"mqttRootTopic": "wirelos/illucat",
|
||||
"mqttUser": "",
|
||||
"mqttPass": ""
|
||||
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"stationMode": 0,
|
||||
"stationMode": 1,
|
||||
"hostname": "illucat",
|
||||
"apSSID": "illucat",
|
||||
"apPassword": "illumination",
|
||||
"connectTimeout": 15000,
|
||||
"stationSSID": "dis-wifi",
|
||||
"stationPassword": "dis-wifi-passwort"
|
||||
}
|
||||
"connectTimeout": 5000,
|
||||
"stationSSID": "thobens-416257",
|
||||
"stationPassword": "467304645DB5"
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"mqttClientName" : "illucat1",
|
||||
"mqttBrokerHost" : "192.168.1.2",
|
||||
"mqttBrokerPort" : 1883,
|
||||
"mqttRootTopic" : "wirelos/illucat"
|
||||
"mqttClientName": "illucat1",
|
||||
"mqttBrokerHost": "192.168.4.1",
|
||||
"mqttBrokerPort": 1883,
|
||||
"mqttRootTopic": "wirelos/illucat",
|
||||
"mqttUser": "foo",
|
||||
"mqttPass": ""
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pin": 4,
|
||||
"length": 8,
|
||||
"brightness": 50,
|
||||
"brightness": 127,
|
||||
"updateInterval": 100,
|
||||
"defaultColor": 100
|
||||
}
|
||||
@@ -16,47 +16,24 @@
|
||||
<span class="heading">Pixels</span>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li class="form-row ParamSelect"
|
||||
data-label="Hue"
|
||||
data-name="hue"
|
||||
data-topic="pixels/hue"
|
||||
data-default="0"
|
||||
<li class="form-row ParamSelect" data-label="Hue" data-name="hue" data-topic="pixels/hue" data-default="0"
|
||||
data-external="/gradients.json">
|
||||
</li>
|
||||
<li class="form-row ParamColor"
|
||||
data-name="color"
|
||||
data-topic="pixels/color"
|
||||
data-label="Color">
|
||||
<li class="form-row ParamColor" data-name="color" data-topic="pixels/color" data-label="Color">
|
||||
</li>
|
||||
<li class="form-row ParamColor"
|
||||
data-name="color"
|
||||
data-topic="pixels/color2"
|
||||
data-label="Color 2">
|
||||
<li class="form-row ParamColor" data-name="color" data-topic="pixels/color2" data-label="Color 2">
|
||||
</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"}]' -->
|
||||
<li class="form-row ParamSelect"
|
||||
data-label="Pattern"
|
||||
data-name="pattern"
|
||||
data-topic="pixels/pattern"
|
||||
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"}]'
|
||||
></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 class="form-row ParamSelect" data-label="Pattern" data-name="pattern" data-topic="pixels/pattern"
|
||||
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"}]'>
|
||||
</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 class="form-row ParamSlider" data-name="totalSteps" data-min="1" data-max="255" data-value="16"
|
||||
data-topic="pixels/totalSteps" data-label="Steps">
|
||||
</li>
|
||||
<li class="form-row ParamSlider"
|
||||
data-name="totalSteps"
|
||||
data-min="1"
|
||||
data-max="255"
|
||||
data-value="16"
|
||||
data-topic="pixels/totalSteps"
|
||||
data-label="Steps">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
@@ -69,27 +46,30 @@
|
||||
<div class="settings container collapsible">
|
||||
<span class="heading">Settings</span>
|
||||
<div class="content">
|
||||
<h2>Network</h2>
|
||||
<div class="Form" data-fileName="/config/wifi.json" data-name="configForm" data-from="/config/wifi.json" data-endpoint="/config"></div>
|
||||
<h2>NeoPixel</h2>
|
||||
<div class="Form" data-fileName="/pixelConfig.json" data-name="configForm" data-from="/pixelConfig.json" data-endpoint="/config"></div>
|
||||
<!-- <h2>MQTT</h2>
|
||||
<div class="Form" data-fileName="/mqttConfig.json" data-name="configForm" data-from="/mqttConfig.json" data-endpoint="/config"></div>
|
||||
<h2>IRC</h2>
|
||||
<h2>Network</h2>
|
||||
<div class="Form" data-fileName="/config/wifi.json" data-name="configForm" data-from="/config/wifi.json"
|
||||
data-endpoint="/config"></div>
|
||||
<h2>NeoPixel</h2>
|
||||
<div class="Form" data-fileName="/pixelConfig.json" data-name="configForm" data-from="/pixelConfig.json"
|
||||
data-endpoint="/config"></div>
|
||||
<h2>MQTT</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>
|
||||
</div>
|
||||
<div class="settings container collapsible">
|
||||
<span class="heading">System</span>
|
||||
<div class="content">
|
||||
<div><label>Free Heap: </label><span class="js-heap"></span><span> bytes</span><br><br></div>
|
||||
<form method='POST' action='/update' enctype='multipart/form-data'>
|
||||
<input type='file' name='update'><input type='submit' value='Update'>
|
||||
</form>
|
||||
<br>
|
||||
<button class="js-restart">Restart</button>
|
||||
</div>
|
||||
<span class="heading">System</span>
|
||||
<div class="content">
|
||||
<div><label>Free Heap: </label><span class="js-heap"></span><span> bytes</span><br><br></div>
|
||||
<form method='POST' action='/update' enctype='multipart/form-data'>
|
||||
<input type='file' name='update'><input type='submit' value='Update'>
|
||||
</form>
|
||||
<br>
|
||||
<button class="js-restart">Restart</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
175
platformio.ini
175
platformio.ini
@@ -8,64 +8,28 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
env_default = build
|
||||
;[platformio]
|
||||
;env_default = build
|
||||
|
||||
[common]
|
||||
framework = arduino
|
||||
platform = platformio/espressif8266@2.3.2
|
||||
platform = espressif8266@2.0.4
|
||||
board = esp12e
|
||||
upload_speed = 115200
|
||||
monitor_baud = 115200
|
||||
monitor_baud = 74880
|
||||
lib_deps =
|
||||
Hash
|
||||
TaskScheduler
|
||||
SPIFFS
|
||||
ArduinoJson@5.13.4
|
||||
adafruit/Adafruit NeoPixel@1.7.0
|
||||
me-no-dev/ESPAsyncTCP@1.2.0
|
||||
me-no-dev/ESPAsyncWebServer@1.2.3
|
||||
me-no-dev/AsyncTCP@1.1.1
|
||||
Adafruit NeoPixel
|
||||
ESPAsyncTCP
|
||||
ESP8266mDNS
|
||||
;symlink://../../core
|
||||
;symlink://../../plugins/neopixel
|
||||
https://gitlab.com/wirelos/sprocket-lib.git#master
|
||||
https://gitlab.com/wirelos/sprocket-plugin-neopixel.git#master
|
||||
ESP Async WebServer
|
||||
https://gitlab.com/wirelos/sprocket-lib.git#develop
|
||||
https://gitlab.com/wirelos/sprocket-plugin-neopixel.git
|
||||
|
||||
|
||||
[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]
|
||||
src_filter = +<*> -<var/> +<var/wifi/>
|
||||
platform = ${common.platform}
|
||||
@@ -76,10 +40,22 @@ framework = ${common.framework}
|
||||
build_flags = -Wl,-Teagle.flash.4m1m.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
|
||||
https://gitlab.com/wirelos/sprocket-network-wifi.git#next
|
||||
https://gitlab.com/wirelos/sprocket-plugin-web.git#next
|
||||
|
||||
|
||||
[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]
|
||||
src_filter = +<*> -<var/> +<var/wifi/>
|
||||
@@ -91,69 +67,38 @@ framework = ${common.framework}
|
||||
build_flags = -Wl,-Teagle.flash.4m1m.ld
|
||||
-DSPROCKET_PRINT=0
|
||||
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
|
||||
https://gitlab.com/wirelos/sprocket-network-wifi.git#next
|
||||
https://gitlab.com/wirelos/sprocket-plugin-web.git#next
|
||||
|
||||
|
||||
;[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]
|
||||
;src_filter = +<*> -<var/> +<var/wifi/>
|
||||
;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=0
|
||||
;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:mqcatt]
|
||||
;src_filter = +<*> -<var/> +<var/mqcatt/>
|
||||
;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-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
|
||||
;
|
||||
|
||||
[env:mqcatt]
|
||||
src_filter = +<*> -<var/> +<var/mqcatt/>
|
||||
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-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
|
||||
|
||||
31
src/config.h
31
src/config.h
@@ -7,23 +7,23 @@
|
||||
#define _TASK_PRIORITY
|
||||
|
||||
// Chip config
|
||||
#define SPROCKET_TYPE "ILLUCAT"
|
||||
#define SERIAL_BAUD_RATE 115200
|
||||
#define STARTUP_DELAY 1000
|
||||
#define SPROCKET_TYPE "ILLUCAT"
|
||||
#define SERIAL_BAUD_RATE 74880
|
||||
#define STARTUP_DELAY 5000
|
||||
|
||||
// Mesh config
|
||||
#define SPROCKET_MODE 0
|
||||
#define WIFI_CHANNEL 11
|
||||
#define MESH_PORT 5555
|
||||
#define AP_SSID "illucat"
|
||||
#define AP_PASSWORD "illumination"
|
||||
#define MESH_PREFIX "illucat-mesh"
|
||||
#define MESH_PASSWORD "th3r31sn0sp00n"
|
||||
#define STATION_SSID "MyAP"
|
||||
#define STATION_PASSWORD "th3r31sn0sp00n"
|
||||
#define HOSTNAME "illucat"
|
||||
#define CONNECT_TIMEOUT 10000
|
||||
#define MESH_DEBUG_TYPES ERROR | STARTUP | CONNECTION
|
||||
#define SPROCKET_MODE 0
|
||||
#define WIFI_CHANNEL 11
|
||||
#define MESH_PORT 5555
|
||||
#define AP_SSID "illucat"
|
||||
#define AP_PASSWORD "illumination"
|
||||
#define MESH_PREFIX "illucat-mesh"
|
||||
#define MESH_PASSWORD "th3r31sn0sp00n"
|
||||
#define STATION_SSID "thobens-416257"
|
||||
#define STATION_PASSWORD "467304645DB5"
|
||||
#define HOSTNAME "illucat"
|
||||
#define CONNECT_TIMEOUT 10000
|
||||
#define MESH_DEBUG_TYPES ERROR | STARTUP | CONNECTION
|
||||
//#define MESH_DEBUG_TYPES ERROR | MESH_STATUS | CONNECTION | SYNC | COMMUNICATION | GENERAL | MSG_TYPES | REMOTE
|
||||
|
||||
#define PIXEL_CONFIG_FILE "/pixelConfig.json"
|
||||
@@ -46,5 +46,6 @@
|
||||
#define LED_STRIP_DEFAULT_COLOR 100
|
||||
#define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR
|
||||
#define COLOR_NOT_CONNECTED 255
|
||||
#define LED_STRIP_DEFAULT_PATTERN 1
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "mqcatt_config.h"
|
||||
#include <WiFiNet.h>
|
||||
#include <Sprocket.h>
|
||||
#include "../../IlluCat.h"
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <WebServerConfig.h>
|
||||
#include <WebServerPlugin.h>
|
||||
@@ -21,7 +22,7 @@ void setup()
|
||||
{
|
||||
sprocket = new Sprocket({STARTUP_DELAY, SERIAL_BAUD_RATE});
|
||||
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});
|
||||
webConfigPlugin = new WebConfigPlugin(webServerPlugin->server);
|
||||
webApiPlugin = new WebApiPlugin(webServerPlugin->server);
|
||||
@@ -42,7 +43,7 @@ void setup()
|
||||
network->connect();
|
||||
|
||||
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->publish("pixels/pattern", "1");
|
||||
|
||||
@@ -7,25 +7,25 @@
|
||||
#define _TASK_PRIORITY
|
||||
|
||||
// Chip config
|
||||
#define SPROCKET_TYPE "ILLUCAT"
|
||||
#define SERIAL_BAUD_RATE 115200
|
||||
#define STARTUP_DELAY 1000
|
||||
#define SPROCKET_TYPE "ILLUCAT"
|
||||
#define SERIAL_BAUD_RATE 74880
|
||||
#define STARTUP_DELAY 5000
|
||||
|
||||
// Network config
|
||||
#define WIFI_MODE 0
|
||||
#define WIFI_CHANNEL 11
|
||||
#define AP_SSID "illucat"
|
||||
#define AP_PASSWORD "illumination"
|
||||
#define MESH_PREFIX "illucat-mesh"
|
||||
#define MESH_PASSWORD "th3r31sn0sp00n"
|
||||
#define STATION_SSID "MyAP"
|
||||
#define STATION_PASSWORD "th3r31sn0sp00n"
|
||||
#define HOSTNAME "illucat"
|
||||
#define CONNECT_TIMEOUT 10000
|
||||
#define WIFI_MODE 0
|
||||
#define WIFI_CHANNEL 11
|
||||
#define AP_SSID "illucat"
|
||||
#define AP_PASSWORD "illumination"
|
||||
#define MESH_PREFIX "illucat-mesh"
|
||||
#define MESH_PASSWORD "th3r31sn0sp00n"
|
||||
#define STATION_SSID "thobens-416257"
|
||||
#define STATION_PASSWORD "467304645DB5"
|
||||
#define HOSTNAME "illucat"
|
||||
#define CONNECT_TIMEOUT 10000
|
||||
|
||||
// config files
|
||||
#define PIXEL_CONFIG_FILE "/pixelConfig.json"
|
||||
#define MQTT_CONFIG_FILE "/mqttConfig.json"
|
||||
#define MQTT_CONFIG_FILE "/config/mqtt.json"
|
||||
|
||||
// NeoPixel
|
||||
#define LED_STRIP_PIN D2
|
||||
@@ -35,17 +35,19 @@
|
||||
#define LED_STRIP_DEFAULT_COLOR 100
|
||||
#define COLOR_CONNECTED LED_STRIP_DEFAULT_COLOR
|
||||
#define COLOR_NOT_CONNECTED 255
|
||||
|
||||
#define LED_STRIP_DEFAULT_PATTERN 1
|
||||
|
||||
// OTA config
|
||||
#define OTA_PORT 8266
|
||||
#define OTA_PASSWORD ""
|
||||
|
||||
// mqtt config
|
||||
#define MQTT_CLIENT_NAME "illucat"
|
||||
#define MQTT_HOST "192.168.1.2"
|
||||
#define MQTT_PORT 1883
|
||||
#define MQTT_ROOT_TOPIC "wirelos/illucat"
|
||||
#define MQTT_CLIENT_NAME "illucat"
|
||||
#define MQTT_HOST "192.168.88.110"
|
||||
#define MQTT_PORT 1883
|
||||
#define MQTT_ROOT_TOPIC "wirelos/illucat"
|
||||
#define MQTT_USER ""
|
||||
#define MQTT_PASS ""
|
||||
|
||||
// WebServer
|
||||
#define WEB_CONTEXT_PATH "/"
|
||||
@@ -53,5 +55,4 @@
|
||||
#define WEB_DEFAULT_FILE "index.html"
|
||||
#define WEB_PORT 80
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user