Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream develop #5

Merged
merged 80 commits into from
Mar 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
13e1cfd
:fire: Remove hardcoded keepalive - fix #301 (#314)
bertmelis Mar 10, 2017
2564160
:racehorse: Improve uptime accuracy (#315)
bertmelis Mar 10, 2017
ad58871
:bug: Fix truncated IP (#318)
bertmelis Mar 10, 2017
11d7876
:art: Fix warning with parenthesis
marvinroger Mar 22, 2017
bf7188e
:bug: Fix pio library.json bad dependency name
marvinroger Mar 28, 2017
590ed4f
:sparkles: Add support for static IP and BSSID/MAC, channel of AP (#327)
benzino77 Apr 19, 2017
e3b0713
:racehorse: Pass all callbacks by reference
marvinroger Apr 19, 2017
9ef6a3a
:art: Rename globalInputHandler argument to be the same as in hpp
marvinroger Apr 19, 2017
23a7e37
:racehorse: Make isActive const
marvinroger Apr 19, 2017
a3fd195
:art: Add custom settings value to initial log
marvinroger Apr 19, 2017
ed9ea1b
:sparkles: Abort if default setting value does not pass validator fun…
marvinroger Apr 19, 2017
efff143
:memo: Clarify ISSUE_TEMPLATE docs location for #331
marvinroger May 4, 2017
c7db527
:memo: Implement new versioned Git docs (#341)
marvinroger May 30, 2017
f8e569d
:memo: Update all URLs to new docs
marvinroger May 30, 2017
6653dc7
:art: Fix broken doc link in README
marvinroger May 30, 2017
243dd9c
:memo: Add edit link to docs
marvinroger May 31, 2017
105ac05
:memo: Move firmware_parser.py to scripts folder
marvinroger Jun 1, 2017
b3020a1
:bug: Fix out of limits abort message not showing
marvinroger Jun 1, 2017
ce56c22
:shirt: Be less strict on whitespace in comments
marvinroger Jun 2, 2017
113c3e8
:memo: Add dummy OTA updater script (TODO)
marvinroger Jun 2, 2017
0bcf2bb
:art: :racehorse: Use CircleCi instead of Travis CI (#348)
marvinroger Jun 2, 2017
c091e4f
:art: Add SonoffDualShutters example
marvinroger Jun 2, 2017
4af701c
:bug: Install current lib to platformio
marvinroger Jun 2, 2017
34541aa
:bug: Actually ignore gh-pages in CI
marvinroger Jun 2, 2017
65c7944
:bug: Add missing SonoffDual dep
marvinroger Jun 2, 2017
d9a2760
:bug: Fix ArduinoJSON 5.11.0 (#363)
kylegordon Jul 1, 2017
83abe47
:arrow_up: Update pio dependencies
marvinroger Jun 1, 2017
38933b6
:art: Cleanup code a bit
marvinroger Jun 1, 2017
182f15d
:bug: Make sure every announcements packet are sent - closes #345
marvinroger Jun 6, 2017
98ffc1f
:art: Refactor code and implement new OTA system
marvinroger Jun 7, 2017
a897bdd
:shirt: Fix lint
marvinroger Jul 23, 2017
221f209
:white_check_mark: Use new workflow feature from Circle
marvinroger Jul 23, 2017
a51848e
:white_check_mark: Ignore gh-pages at workflow level
marvinroger Jul 23, 2017
bff53d4
:sparkles: Add OTA_PROGRESS event
marvinroger Jul 23, 2017
bb8941a
:memo: Update docs for new OTA system
marvinroger Jul 23, 2017
cd2fa9f
:arrow_up: Upgrade AsyncMqttClient dependency to 0.8.0
marvinroger Jul 23, 2017
bb7fbc9
:bug: IHomieSetting::settings first, HomieNode-settings second! (#335)
euphi Aug 2, 2017
c116da4
:bug: Fix not returning a value in setConfigurationApPassword (#378)
euphi Aug 3, 2017
57cb4d0
:bug: Fix crash when starting up without any defined node (#379)
jbliesener Aug 4, 2017
4ae67a6
:bug: Fix topic check for OTA upload (#375)
Aug 4, 2017
ec03fd5
:bug: Rename last OTA topic instance
marvinroger Aug 4, 2017
e11b456
:sparkles: Add OTA updater script (#384)
LiyouZhou Aug 20, 2017
5470b1b
:memo: Add details on how to interact with range property (#393)
LiyouZhou Sep 7, 2017
bec8c46
:memo: Add warning to input-handlers.md about concurrency (#400)
euphi Sep 22, 2017
d4d48e0
:bug: Interpret firmware file as an bytearray (#403)
LiyouZhou Sep 24, 2017
715ad3f
:memo: Update input-handlers.md (#401)
euphi Nov 15, 2017
e9fbf46
:sparkles: Use AsyncWebServer + Refactoring (#425)
timpur Nov 16, 2017
9859c0c
:art: Update BootNormal.cpp (#426)
scharph Nov 17, 2017
76e00a0
:arrow_up: Update dependency to "ESP Async WebServer" (#434)
ivankravets Nov 28, 2017
5f2576f
:memo: Add instruction for @PlatformIO (#435)
ivankravets Nov 28, 2017
1dc38e0
:bug: Use v2.0.0-beta.2 as a working tagged example for @PlatformIO (…
ivankravets Nov 28, 2017
1209ba6
:art: Simplify CI with @PlatformIO (#438)
ivankravets Nov 28, 2017
8e94d9e
:bug: Install library via @PlatformIO with all dependencies (#439)
ivankravets Nov 29, 2017
d3fc66d
:green_heart: CI: Install staging version of Arduino Core for ESP8266…
ivankravets Nov 29, 2017
48fa76d
:bug: Pin Shutters dep version
marvinroger Nov 29, 2017
f024c6d
:fire: Don't fail on CI docs step when testing a fork
marvinroger Nov 30, 2017
e41bb9c
:art: More Refactoring + Deep Sleep + Prevent WiFi Reconnect when reb…
timpur Nov 30, 2017
ad876b2
:art: First pass to fix linting
marvinroger Nov 30, 2017
65b89fa
:art: Second pass of lint
marvinroger Nov 30, 2017
93a00e9
:art: Final lint fix
marvinroger Nov 30, 2017
3dd1829
:memo: Update docs deps
marvinroger Dec 1, 2017
aa8e233
:memo: :art: Update docs manifest
marvinroger Dec 1, 2017
7f932c3
:memo: :art: Adjust HTTP JSON API doc
marvinroger Dec 1, 2017
f9f0232
:memo: Add configurators on website
marvinroger Dec 1, 2017
f605adf
:memo: Update links to configurator
marvinroger Dec 1, 2017
999959a
Fix links under Features (#452)
ashmckenzie Dec 21, 2017
89991d4
Set Device Stats Interval (#451) (#455)
timpur Dec 21, 2017
cd3c6e7
Add last step to uibundle README (#460)
Dec 26, 2017
63fb96d
Update updater script addressing quirks (#461)
Dec 26, 2017
9f05e09
Update API for /wifi/connect from GET to PUT (#468)
tripflex Jan 3, 2018
28469e4
Proposal to optionally run HomieNode::loop() also in disconnected state
euphi Feb 13, 2018
b5e8926
Show Homie version
timpur Mar 12, 2018
95d9566
Fix #446 #477 (#501)
timpur Mar 18, 2018
b7b6776
Fix Safari not displaying the config bundle HTML page (Fix #476) (#502)
timpur Mar 19, 2018
03938e1
Update Readme Homie Version
timpur Mar 19, 2018
901076f
Fix Warnings (#503)
timpur Mar 19, 2018
bfba03d
Update Readme - Homie Convention
timpur Mar 20, 2018
99161ce
Update to Homie Convention v2.0.1 (#507)
timpur Mar 30, 2018
2ce7192
Merge branch 'develop' of https://github.com/marvinroger/homie-esp826…
euphi Mar 31, 2018
4e1cfe5
Merge branch 'develop' into upstream-develop
euphi Mar 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .circleci/assets/circleci.ignore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/python:2.7
branches:
ignore:
- gh-pages
steps:
- checkout
33 changes: 33 additions & 0 deletions .circleci/assets/configurator_v1.html

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions .circleci/assets/docs_index_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!doctype html>
<html lang="en">
<head>
<title>Homie for ESP8266 docs</title>

<meta charset="utf-8">

<style>
body {
background-color: #ef5350;
}

#content {
width: 512px;

margin: auto;

text-align: center;
}

h1, h2, a {
font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

h1, h2 {
color: white;
}

ul {
list-style-type: none;
}

li {
width: 100%;
height: 50px;

margin-bottom: 10px;

background-color: #ecf0f1;
border-bottom: 3px solid #bdc3c7;

line-height: 50px;
}

a {
display: block;
width: 100%;
height: 100%;

font-size: 30px;
text-decoration: none;
color: #2c3e50;
}

.description {
font-size: 15px;
color: #34495e;
}
</style>
</head>

<body>
<div id="content">
<h1>Homie for ESP8266 docs</h1>

<h2>Configurators</h2>

$configurators_html

<h2>Documentation</h2>

$documentation_html
</div>
</body>
</html>
130 changes: 130 additions & 0 deletions .circleci/assets/generate_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json
import urllib
import urllib2
import tempfile
import zipfile
import glob
import subprocess
import getopt
import sys
import shutil
import os
import string

FIRST_RELEASE_ID=3084382
DOCS_PATH = 'docs'
DOCS_BRANCHES = [
{ 'tag': 'develop', 'description': 'develop branch (development)', 'path': 'develop' },
{ 'tag': 'master', 'description': 'master branch (stable)', 'path': 'stable' }
]
CONFIGURATORS_PATH = 'configurators'
CONFIGURATORS_VERSIONS = [
{ 'title': 'v2', 'description': 'For Homie v2.x.x', 'path': 'v2', 'url': 'https://github.com/marvinroger/homie-esp8266-setup/raw/gh-pages/ui_bundle.html' },
{ 'title': 'v1', 'description': 'For Homie v1.x.x', 'path': 'v1', 'file': '/configurator_v1.html' }
]

current_dir = os.path.dirname(__file__)
output_dir = getopt.getopt(sys.argv[1:], 'o:')[0][0][1]
github_releases = json.load(urllib2.urlopen('https://api.github.com/repos/marvinroger/homie-esp8266/releases'))

def generate_docs(data):
print('Generating docs for ' + data['tag'] + ' (' + data['description'] + ') at /' + data['path'] + '...')
zip_url = 'https://github.com/marvinroger/homie-esp8266/archive/' + data['tag'] + '.zip'
zip_path = tempfile.mkstemp()[1]
urllib.urlretrieve(zip_url, zip_path)

zip_file = zipfile.ZipFile(zip_path, 'r')
unzip_path = tempfile.mkdtemp()
zip_file.extractall(unzip_path)
src_path = glob.glob(unzip_path + '/*')[0]

if not os.path.isfile(src_path + '/mkdocs.yml'): shutil.copy(current_dir + '/mkdocs.default.yml', src_path + '/mkdocs.yml')

subprocess.call(['mkdocs', 'build'], cwd=src_path)
shutil.copytree(src_path + '/site', output_dir + '/' + DOCS_PATH + '/' + data['path'])
print('Done.')

def generate_configurators(data):
print('Generating configurator for ' + data['title'] + ' (' + data['description'] + ') at /' + data['path'] + '...')
file_path = None
if 'file' in data:
file_path = current_dir + data['file']
else: # url
file_path = tempfile.mkstemp()[1]
urllib.urlretrieve(data['url'], file_path)

prefix_output = output_dir + '/' + CONFIGURATORS_PATH + '/' + data['path']
try:
os.makedirs(prefix_output)
except:
pass

shutil.copy(file_path, prefix_output + '/index.html')

print('Done.')

shutil.rmtree(output_dir, ignore_errors=True)

# Generate docs

generated_docs = []

# Generate docs for branches

for branch in DOCS_BRANCHES:
generated_docs.append(branch)
generate_docs(branch)

# Generate docs for releases

for release in github_releases:
if (release['id'] < FIRST_RELEASE_ID): continue

tag_name = release['tag_name']
version = tag_name[1:]
description = 'release ' + version

data = {
'tag': tag_name,
'description': description,
'path': version
}

generated_docs.append(data)
generate_docs(data)

# Generate documentation html

documentation_html = '<ul>'
for documentation_data in generated_docs:
documentation_html += '<li><a href="' + DOCS_PATH + '/' + documentation_data['path'] + '"># ' + documentation_data['tag'] + ' <span class="description">' + documentation_data['description'] + '</span></a></li>'
documentation_html += '</ul>'

# Generate configurators

generated_configurators = []

for version in CONFIGURATORS_VERSIONS:
generated_configurators.append(version)
generate_configurators(version)

# Generate configurators html

configurators_html = '<ul>'
for configurator_data in generated_configurators:
configurators_html += '<li><a href="' + CONFIGURATORS_PATH + '/' + configurator_data['path'] + '"># ' + configurator_data['title'] + ' <span class="description">' + configurator_data['description'] + '</span></a></li>'
configurators_html += '</ul>'

# Generate index

docs_index_template_file = open(current_dir + '/docs_index_template.html')
docs_index_template_html = docs_index_template_file.read()
docs_index_template = string.Template(docs_index_template_html)
docs_index = docs_index_template.substitute(documentation_html=documentation_html, configurators_html=configurators_html)

docs_index_file = open(output_dir + '/index.html', 'w')
docs_index_file.write(docs_index)
docs_index_file.close()
Binary file added .circleci/assets/id_rsa.enc
Binary file not shown.
29 changes: 29 additions & 0 deletions .circleci/assets/mkdocs.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
site_name: Homie for ESP8266
repo_name: 'marvinroger/homie-esp8266'
repo_url: 'https://github.com/marvinroger/homie-esp8266'

theme:
name: material
palette:
primary: red
accent: red

markdown_extensions:
- meta
- footnotes
- codehilite
- admonition
- toc(permalink=true)
- pymdownx.arithmatex
- pymdownx.betterem(smart_enable=all)
- pymdownx.caret
- pymdownx.critic
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist(custom_checkbox=true)
- pymdownx.tilde
101 changes: 101 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/python:2.7
steps:
- checkout
- run:
name: install PlatformIO
command: sudo pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
- run:
name: install current code as a PlatformIO library with all dependencies
command: platformio lib -g install file://.
- run:
name: install staging version of Arduino Core for ESP8266
command: platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage
- run:
name: install exemples dependencies
command: platformio lib -g install Shutters@2.1.1 SonoffDual@1.1.0
- run: platformio ci ./examples/CustomSettings --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/DoorSensor --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/HookToEvents --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/IteadSonoff --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/LightOnOff --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/TemperatureSensor --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/LedStrip --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/Broadcast --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/GlobalInputHandler --board=esp01 --board=nodemcuv2
- run: platformio ci ./examples/SonoffDualShutters --board=esp01 --board=nodemcuv2

lint:
working_directory: ~/code
docker:
- image: circleci/python:2.7
steps:
- checkout
- run:
name: install cpplint
command: sudo pip install cpplint
- run: make cpplint

generate_docs:
working_directory: ~/code
docker:
- image: circleci/python:2.7
steps:
- checkout
- run:
name: install dependencies
command: sudo pip install mkdocs==0.17.2 mkdocs-material==2.2.0 pygments==2.2.0 pymdown-extensions==4.5.1
- run:
name: generate and publish docs
command: |
if [ -z ${PRIVATE_KEY_ENCRYPT_KEY+x} ]
then
echo "Fork detected. Ignoring..."
exit 0
fi

openssl aes-256-cbc -d -in ./.circleci/assets/id_rsa.enc -k "${PRIVATE_KEY_ENCRYPT_KEY}" >> /tmp/deploy_rsa
eval "$(ssh-agent -s)"
chmod 600 /tmp/deploy_rsa
ssh-add /tmp/deploy_rsa

chmod +x ./.circleci/assets/generate_docs.py
./.circleci/assets/generate_docs.py -o /tmp/site

# make sure we ignore the gh-pages branch
mkdir /tmp/site/.circleci
cp ./.circleci/assets/circleci.ignore.yml /tmp/site/.circleci/config.yml

pushd /tmp/site
git init
git config --global user.name "circleci"
git config --global user.email "sayhi@circleci.com"
git remote add origin git@github.com:marvinroger/homie-esp8266.git
git add .
git commit -m ":package: Result of CircleCI build ${CIRCLE_BUILD_URL}"
git push -f origin master:gh-pages
popd

workflows:
version: 2
lint_build_generatedocs:
jobs:
- lint:
filters:
branches:
ignore:
- gh-pages
- build:
filters:
branches:
ignore:
- gh-pages
- generate_docs:
filters:
branches:
ignore:
- gh-pages
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ If you have some questions or if you need help, some people might help you on th

Before submitting your issue, make sure:

- [ ] You've read the documentation for *your* release (in the `docs/` folder for the v1, at https://homie-esp8266.readme.io) which contains some answsers to the most common problems (notably the `Limitations and know issues` and `Troubleshooting` pages)
- [ ] You've read the documentation for *your* release (in the `docs/` folder or at http://marvinroger.github.io/homie-esp8266/) which contains some answsers to the most common problems (notably the `Limitations and know issues` and `Troubleshooting` pages)
- [ ] You're using the examples bundled in *your* release, which are in the `examples/` folder of the `.zip` of the release you're using. Examples might not be backward-compatible

Thanks!
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Output of mkdocs
/site/

/config.json
*.filters
*.vcxitems
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cpplint:
cpplint --repository=. --recursive --filter=-whitespace/line_length,-legal/copyright,-runtime/printf,-build/include,-build/namespace,-runtime/int ./src
cpplint --repository=. --recursive --filter=-whitespace/line_length,-legal/copyright,-runtime/printf,-build/include,-build/namespace,-runtime/int,-whitespace/comments,-runtime/threadsafe_fn ./src
.PHONY: cpplint
Loading