Added button handler

This commit is contained in:
2018-01-27 15:51:57 +01:00
parent 649b9e0729
commit 85cdbbf42d
10 changed files with 180 additions and 32 deletions

28
mos.yml
View File

@@ -14,15 +14,21 @@ arch: esp8266
filesystem:
- fs
sources:
- src
libs:
- origin: https://github.com/mongoose-os-libs/ca-bundle
- origin: https://github.com/mongoose-os-libs/i2c
- origin: https://github.com/mongoose-os-libs/cron
- origin: https://github.com/mongoose-os-libs/crontab
# - origin: https://github.com/mongoose-os-libs/i2c
- origin: https://github.com/mongoose-os-libs/http-server
- origin: https://github.com/mongoose-os-libs/ota-http-server
- origin: https://github.com/mongoose-os-libs/mqtt
- origin: https://github.com/mongoose-os-libs/rpc-service-config
- origin: https://github.com/mongoose-os-libs/rpc-service-fs
# - origin: https://github.com/mongoose-os-libs/rpc-uart
- origin: https://github.com/mongoose-os-libs/rpc-service-cron
- origin: https://github.com/mongoose-os-libs/rpc-uart
- origin: https://github.com/mongoose-os-libs/rpc-mqtt
- origin: https://github.com/mongoose-os-libs/wifi
# - origin: https://github.com/mongoose-os-libs/mjs
@@ -34,21 +40,27 @@ cdefs:
MGOS_ENABLE_TUNNEL: 0
config_schema:
- ["http.enable", true]
- ["debug.level", 3]
- ["device.id", "sonoff_??????"]
# - ["http.document_root", "/"]
# - ["http.hidden_files", "s_*"]
# - ["http.auth_file", "s_pass"]
- ["wifi.ap.enable", true]
- ["wifi.ap.ssid", "SONOFF_??????"]
- ["wifi.ap.pass", "MySonoff"]
# - ["wifi.sta.enable", false]
# - ["wifi.ap.enable", true]
# - ["wifi.ap.ssid", "SONOFF_??????"]
# - ["wifi.ap.pass", "MySonoff"]
- ["wifi.sta.enable", true]
- ["wifi.sta.ssid", "Pinguin"]
- ["wifi.sta.pass", "PaulchenAufmKlo34"]
- ["mqtt.server", "192.168.89.12:21883"]
- ["mqtt.client_id", "SONOFFSwitch_1516965632"]
- ["mqtt.pass", "r:fa6d6a2834aaabaa88529444c9564ffd"]
- ["sonoff", "o", {title: "Sonoff specific parameters"}]
- ["sonoff.switch_status_pub_topic", "s", "sonoff/??????/switch", {title: "Topic to publish switch status, ?????? is the device ID of this device"}]
- ["sonoff.command_sub_topic", "s", "sonoff/??????/command", {title: "Topic to subscribe to receive commands for this device"}]
build_vars:
# sonoff basic has 1MBytes flash only
FLASH_SIZE: 1048576
# FLASH_SIZE: 1048576
tags:
- c