diff --git a/.gitignore b/.gitignore index 29349c7..d657492 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ .pioenvs .piolibdeps -.vscode/.browse.c_cpp.db* -.vscode/c_cpp_properties.json -.vscode/launch.json +.vscode data/config.json \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5b1aa28..dfc26d9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "terminal.integrated.env.linux": { - "PATH": "/home/master/.platformio/penv/bin:/home/master/.platformio/penv:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl", + "PATH": "/home/master/.platformio/penv/bin:/home/master/.platformio/penv:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl", "PLATFORMIO_CALLER": "vscode" }, "files.associations": { diff --git a/README.md b/README.md index c6e6823..d59cc85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Illumination-Cat This is the brain of the the almighty Illumination-Cat. +## OTA +pio run -e build && \ +curl -v -F file=@.pioenvs/build/firmware.bin http://illucat.lan/update && \ +curl -X POST http://illucat.lan/restart + ## Resources & Documentation [3D Model](https://www.thingiverse.com/thing:2974862) [Installation](https://gitlab.com/0x1d/illucat/blob/master/installation.md) diff --git a/data/config/wifi.json b/data/config/wifi.json new file mode 100644 index 0000000..b80fdf3 --- /dev/null +++ b/data/config/wifi.json @@ -0,0 +1,9 @@ +{ + "stationMode": 1, + "hostname": "illucat", + "apSSID": "illucat", + "apPassword": "illumination", + "connectTimeout": 5000, + "stationSSID": "wirelos", + "stationPassword": "th3r31sn0sp00n" +} \ No newline at end of file diff --git a/data/example.config.json b/data/example.config.json deleted file mode 100644 index b441a17..0000000 --- a/data/example.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "stationMode": 0, - "hostname": "illucat", - "apSSID": "illucat", - "apPassword": "illumination", - "connectTimeout": 20000, - "stationSSID": "MyWifi", - "stationPassword": "myWifiPassword", - "meshSSID": "illucat", - "meshPassword": "illumination", - "meshPort": 5555, - "channel": 5 -} \ No newline at end of file diff --git a/data/ircConfig.json b/data/ircConfig.json index 204359f..a6f3aa2 100644 --- a/data/ircConfig.json +++ b/data/ircConfig.json @@ -1,6 +1,6 @@ { "ircServer": "chat.freenode.net", "ircPort": 6665, - "ircNickname": "biermeter", - "ircUser": "biermeter" + "ircNickname": "illucat", + "ircUser": "illucat" } \ No newline at end of file diff --git a/data/mqttConfig.json b/data/mqttConfig.json index 6ec5b60..36329d9 100644 --- a/data/mqttConfig.json +++ b/data/mqttConfig.json @@ -1,6 +1,6 @@ { - "mqttClientName" : "biermeter", + "mqttClientName" : "illucat1", "mqttBrokerHost" : "192.168.1.2", "mqttBrokerPort" : 1883, - "mqttRootTopic" : "wirelos/led/biermeter" + "mqttRootTopic" : "wirelos/illucat" } \ No newline at end of file diff --git a/data/www/index.html b/data/www/index.html index 019406e..79aaa4b 100644 --- a/data/www/index.html +++ b/data/www/index.html @@ -21,8 +21,8 @@ data-name="hue" data-topic="pixels/hue" data-default="0" - data-external="/gradients.json" - > + data-external="/gradients.json"> +
  • Settings

    Network

    -
    +

    NeoPixel

    \n \n
  • \n \n
    \n \n
    \n \n" - -/***/ }) -/******/ ]); \ No newline at end of file diff --git a/data/www/script.js.gz b/data/www/script.js.gz new file mode 100644 index 0000000..944a7ee Binary files /dev/null and b/data/www/script.js.gz differ diff --git a/platformio.ini b/platformio.ini index 7616473..89d285f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,7 +13,7 @@ [common] framework = arduino -platform = espressif8266 +platform = espressif8266@2.0.4 board = esp12e upload_speed = 921600 monitor_baud = 115200 @@ -21,10 +21,9 @@ lib_deps = Hash TaskScheduler SPIFFS - ArduinoJson + ArduinoJson@5.13.4 Adafruit NeoPixel ESPAsyncTCP - ArduinoOTA ESP8266mDNS ESP Async WebServer https://gitlab.com/wirelos/sprocket-lib.git#develop @@ -41,8 +40,8 @@ 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 - https://gitlab.com/wirelos/sprocket-plugin-web.git + https://gitlab.com/wirelos/sprocket-network-wifi.git#next + https://gitlab.com/wirelos/sprocket-plugin-web.git#next [env:build-mesh] @@ -55,8 +54,8 @@ framework = ${common.framework} build_flags = -Wl,-Teagle.flash.4m1m.ld -DSPROCKET_PRINT=1 lib_deps = ${common.lib_deps} - painlessMesh - https://gitlab.com/wirelos/sprocket-network-mesh.git + https://gitlab.com/wirelos/painlessMesh.git + https://gitlab.com/wirelos/sprocket-network-mesh.git#forked-mesh [env:release] src_filter = +<*> - + @@ -68,8 +67,8 @@ framework = ${common.framework} build_flags = -Wl,-Teagle.flash.4m1m.ld -DSPROCKET_PRINT=0 lib_deps = ${common.lib_deps} - https://gitlab.com/wirelos/sprocket-network-wifi.git - https://gitlab.com/wirelos/sprocket-plugin-web.git + https://gitlab.com/wirelos/sprocket-network-wifi.git#next + https://gitlab.com/wirelos/sprocket-plugin-web.git#next [env:mqcatt] @@ -82,9 +81,9 @@ 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 - https://gitlab.com/wirelos/sprocket-plugin-web.git - https://gitlab.com/wirelos/sprocket-plugin-mqtt.git + 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] @@ -97,9 +96,9 @@ 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 - https://gitlab.com/wirelos/sprocket-plugin-web.git + 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 + https://gitlab.com/wirelos/sprocket-plugin-mqtt.git#next PubSubClient ArduinoIRC diff --git a/src/var/illuchat/main.cpp b/src/var/illuchat/main.cpp index c6ecb61..5dc5227 100644 --- a/src/var/illuchat/main.cpp +++ b/src/var/illuchat/main.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include WiFiNet *network; @@ -18,7 +17,6 @@ WebConfigPlugin *webConfigPlugin; WebApiPlugin *webApiPlugin; PixelPlugin *pixelPlugin; IrcPlugin *ircPlugin; -OtaTcpPlugin *otaTcp; MqttPlugin *mqttPlugin; void setup() @@ -31,13 +29,11 @@ void setup() webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT}); webConfigPlugin = new WebConfigPlugin(webServerPlugin->server); webApiPlugin = new WebApiPlugin(webServerPlugin->server); - otaTcp = new OtaTcpPlugin({OTA_PORT, OTA_PASSWORD}); sprocket->addPlugin(pixelPlugin); sprocket->addPlugin(webServerPlugin); sprocket->addPlugin(webConfigPlugin); sprocket->addPlugin(webApiPlugin); - sprocket->addPlugin(otaTcp); sprocket->addPlugin(ircPlugin); sprocket->addPlugin(mqttPlugin); diff --git a/src/var/mqcatt/main.cpp b/src/var/mqcatt/main.cpp index 4690f56..f01beb5 100644 --- a/src/var/mqcatt/main.cpp +++ b/src/var/mqcatt/main.cpp @@ -8,7 +8,6 @@ #include #include #include -#include WiFiNet *network; Sprocket *sprocket; @@ -17,7 +16,6 @@ WebConfigPlugin *webConfigPlugin; WebApiPlugin *webApiPlugin; PixelPlugin *pixelPlugin; MqttPlugin *mqttPlugin; -OtaTcpPlugin *otaTcp; void setup() { @@ -27,12 +25,10 @@ void setup() webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT}); webConfigPlugin = new WebConfigPlugin(webServerPlugin->server); webApiPlugin = new WebApiPlugin(webServerPlugin->server); - otaTcp = new OtaTcpPlugin({OTA_PORT, OTA_PASSWORD}); sprocket->addPlugin(pixelPlugin); sprocket->addPlugin(webServerPlugin); sprocket->addPlugin(webConfigPlugin); sprocket->addPlugin(webApiPlugin); - sprocket->addPlugin(otaTcp); sprocket->addPlugin(mqttPlugin); network = new WiFiNet(