ソースを参照

Merge branch 'master' of github.com:sidoh/esp8266_milight_hub into new_protocol

Chris Mullins 8 年 前
コミット
757a5d2e12
共有7 個のファイルを変更した36 個の追加68 個の削除を含む
  1. 12 62
      .travis.yml
  2. 1 1
      PROTOCOL.md
  3. 2 2
      README.md
  4. BIN
      dist/firmware-esp07.bin
  5. 1 1
      lib/WebServer/MiLightHttpServer.cpp
  6. 19 1
      platformio.ini
  7. 1 1
      src/main.cpp

+ 12 - 62
.travis.yml

@@ -1,65 +1,15 @@
-# Continuous Integration (CI) is the practice, in software
-# engineering, of merging all developer working copies with a shared mainline
-# several times a day < http://docs.platformio.org/page/ci/index.html >
-#
-# Documentation:
-#
-# * Travis CI Embedded Builds with PlatformIO
-#   < https://docs.travis-ci.com/user/integration/platformio/ >
-#
-# * PlatformIO integration with Travis CI
-#   < http://docs.platformio.org/page/ci/travis.html >
-#
-# * User Guide for `platformio ci` command
-#   < http://docs.platformio.org/page/userguide/cmd_ci.html >
-#
-#
-# Please choice one of the following templates (proposed below) and uncomment
-# it (remove "# " before each line) or use own configuration according to the
-# Travis CI documentation (see above).
-#
+language: python
+python:
+    - "2.7"
 
+sudo: false
+cache:
+    directories:
+        - "~/.platformio"
 
-#
-# Template #1: General project. Test it using existing `platformio.ini`.
-#
+install:
+    - pip install -U platformio
+    - platformio lib install
 
-# language: python
-# python:
-#     - "2.7"
-#
-# sudo: false
-# cache:
-#     directories:
-#         - "~/.platformio"
-#
-# install:
-#     - pip install -U platformio
-#
-# script:
-#     - platformio run
-
-
-#
-# Template #2: The project is intended to by used as a library with examples
-#
-
-# language: python
-# python:
-#     - "2.7"
-#
-# sudo: false
-# cache:
-#     directories:
-#         - "~/.platformio"
-#
-# env:
-#     - PLATFORMIO_CI_SRC=path/to/test/file.c
-#     - PLATFORMIO_CI_SRC=examples/file.ino
-#     - PLATFORMIO_CI_SRC=path/to/test/directory
-#
-# install:
-#     - pip install -U platformio
-#
-# script:
-#     - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
+script:
+    - platformio run

+ 1 - 1
PROTOCOL.md

@@ -1,6 +1,6 @@
 # Protocol
 
-Here are some sloppy notes on the 2.4GHz protocol. Borrows from [Henryk's work](https://hackaday.io/project/5888-reverse-engineering-the-milight-on-air-protocol).
+Here are some sloppy notes on the 2.4GHz protocols. Borrows from [Henryk's work](https://hackaday.io/project/5888-reverse-engineering-the-milight-on-air-protocol).
 
 ## Structure
 

+ 2 - 2
README.md

@@ -77,14 +77,14 @@ Route (6) suports the `command`s `all_on` and `all_off`, which do as you'd expec
 Turn on group 2 for device ID 0xCD86, set hue to 100, and brightness to 50%:
 
 ```
-$ curl --data-binary '{"status":"on","hue":100,"level":50}' -X PUT http://esp8266/gateways/0xCD86/2
+$ curl --data-binary '{"status":"on","hue":100,"level":50}' -X PUT http://esp8266/gateways/0xCD86/rgbw/2
 true%
 ```
 
 Set color to white (disable RGB):
 
 ```
-$ curl --data-binary '{"command":"set_white"}' -X PUT http://esp8266/gateways/0xCD86/2
+$ curl --data-binary '{"command":"set_white"}' -X PUT http://esp8266/gateways/0xCD86/rgbw/2
 true%
 ```
 

BIN
dist/firmware-esp07.bin


+ 1 - 1
lib/WebServer/MiLightHttpServer.cpp

@@ -1,4 +1,4 @@
-#include <fs.h>
+#include <FS.h>
 #include <WiFiUdp.h>
 #include <IntParsing.h>
 #include <Settings.h>

+ 19 - 1
platformio.ini

@@ -21,14 +21,32 @@ lib_deps_external =
 platform = espressif8266
 framework = arduino
 board = nodemcuv2
+lib_deps =
+  ${common.lib_deps_builtin}
+  ${common.lib_deps_external}
 
 [env:d1_mini]
 platform = espressif8266
 framework = arduino
 board = d1_mini
+lib_deps =
+  ${common.lib_deps_builtin}
+  ${common.lib_deps_external}
 
 [env:esp12]
 platform = espressif8266
 board = esp12e
 framework = arduino
-build_flags = -Wl,-Tesp8266.flash.4m1m.ld
+build_flags = -Wl,-Tesp8266.flash.4m1m.ld
+lib_deps =
+  ${common.lib_deps_builtin}
+  ${common.lib_deps_external}
+
+[env:esp07]
+platform = espressif8266
+board = esp07
+framework = arduino
+build_flags = -Wl,-Tesp8266.flash.1m64.ld
+lib_deps =
+  ${common.lib_deps_builtin}
+  ${common.lib_deps_external}

+ 1 - 1
src/main.cpp

@@ -2,7 +2,7 @@
 #include <WiFiManager.h>
 #include <ArduinoJson.h>
 #include <stdlib.h>
-#include <fs.h>
+#include <FS.h>
 #include <IntParsing.h>
 #include <MiLightClient.h>
 #include <MiLightRadioConfig.h>