diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..f2d00b5aa --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +--- +stages: +- build +- deploy + +build: + stage: build + tags: + - esphomedocs + script: + - make html + artifacts: + paths: + - _build/html + +deploy: + stage: deploy + tags: + - esphomedocs + before_script: + - mkdir -p /root/.ssh + - echo "$GITHUB_PRIVATE_KEY" | tr -d '\r' >/root/.ssh/id_rsa + - chmod 600 /root/.ssh/id_rsa + - ssh-keyscan -H git@github.com:OttoWinter/esphomedocs.git >>/root/.ssh/id_rsa + script: + - git worktree add _build/html + - make deploy + - git -C _build/html push git@github.com:OttoWinter/esphomedocs.git:gh-pages + only: + - current diff --git a/Dockerfile b/Dockerfile index 33f0d8b8e..76e8431ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ git \ make \ doxygen \ + openssh-client \ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* RUN pip3 install --no-cache-dir --no-binary :all: \ @@ -20,7 +21,6 @@ RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \ npm install -g html-minifier VOLUME /data/esphomedocs -VOLUME /data/esphomelib EXPOSE 8000 WORKDIR /data/esphomedocs diff --git a/Makefile b/Makefile index e35231c8e..391f5b30d 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,9 @@ SPHINXPROJ = esphomelib SOURCEDIR = . BUILDDIR = _build ESPHOMELIB_PATH = ../esphomelib +ESPHOMELIB_TAG = tags/v1.7.0 -.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile +.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile $(ESPHOMELIB_PATH) html: _doxyxml $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @@ -22,13 +23,18 @@ doxyg: cleandoxyg _doxyxml cleandoxyg: rm -rf _doxyxml -_doxyxml: +_doxyxml: $(ESPHOMELIB_PATH) ESPHOMELIB_PATH=$(ESPHOMELIB_PATH) doxygen Doxygen -deploy: cleanhtml doxyg html +$(ESPHOMELIB_PATH): + @if [ ! -d "$(ESPHOMELIB_PATH)" ]; then \ + git clone --branch $(ESPHOMELIB_TAG) https://github.com/OttoWinter/esphomelib.git $(ESPHOMELIB_PATH); \ + fi + +deploy: cleanhtml doxyg html $(ESPHOMELIB_PATH) touch "$(BUILDDIR)/html/.nojekyll" echo "esphomelib.com" >"$(BUILDDIR)/html/CNAME" - cd "$(BUILDDIR)/html" && git add --all && git commit -m "Deploy to gh-pages" + git -C "$(BUILDDIR)/html" add --all && git -C "$(BUILDDIR)/html" commit -m "Deploy to gh-pages" @printf "Run \033[0;36mcd $(BUILDDIR)/html && git push origin gh-pages\033[0m to deploy\n" help: diff --git a/esphomeyaml/components/binary_sensor/nextion.rst b/esphomeyaml/components/binary_sensor/nextion.rst index bd1306ef6..9083ea967 100644 --- a/esphomeyaml/components/binary_sensor/nextion.rst +++ b/esphomeyaml/components/binary_sensor/nextion.rst @@ -18,6 +18,7 @@ See :doc:`/esphomeyaml/components/display/nextion` for setting up the display - platform: nextion page_id: 0 component_id: 2 + name: "Nextion Component 2 Touch" Configuration variables: ------------------------ diff --git a/esphomeyaml/components/logger.rst b/esphomeyaml/components/logger.rst index 384f20804..fd177c598 100644 --- a/esphomeyaml/components/logger.rst +++ b/esphomeyaml/components/logger.rst @@ -16,7 +16,7 @@ Configuration variables: ------------------------ - **baud_rate** (*Optional*, int): The baud rate to use for the serial - UART port. Defaults to 115200. + UART port. Defaults to ``115200``. Set to ``0`` to disable logging via UART. - **tx_buffer_size** (*Optional*, string): The size of the buffer used for log messages. Decrease this if you’re having memory problems. Defaults to 512. diff --git a/esphomeyaml/components/mqtt.rst b/esphomeyaml/components/mqtt.rst index 0bb8c54c0..41daa6d84 100644 --- a/esphomeyaml/components/mqtt.rst +++ b/esphomeyaml/components/mqtt.rst @@ -43,6 +43,8 @@ Configuration variables: a connection to the broker is established. See :ref:`mqtt-last_will_birth` for more information. - **will_message** (*Optional*, :ref:`mqtt-message`): The message to send when the MQTT connection is dropped. See :ref:`mqtt-last_will_birth` for more information. +- **shutdown_message** (*Optional*, :ref:`mqtt-message`): The message to send when + the node shuts down and the connection is closed cleanly. See :ref:`mqtt-last_will_birth` for more information. - **ssl_fingerprints** (*Optional*, list): Only on ESP8266. A list of SHA1 hashes used for verifying SSL connections. See :ref:`mqtt-ssl_fingerprints` for more information. diff --git a/esphomeyaml/components/sensor/index.rst b/esphomeyaml/components/sensor/index.rst index 52ab04229..18bc84642 100644 --- a/esphomeyaml/components/sensor/index.rst +++ b/esphomeyaml/components/sensor/index.rst @@ -293,7 +293,7 @@ advanced stuff (see the full :doc:`API Reference ` for more i .. code:: yaml // Within lambda, push a value of 42.0 - id(my_binary_sensor).push_new_value(42.0); + id(my_sensor).push_new_value(42.0); - ``value``: Retrieve the current value of the sensor that has passed through all sensor filters. Is ``NAN`` if no value has gotten through all filters yet. diff --git a/esphomeyaml/components/switch/remote_transmitter.rst b/esphomeyaml/components/switch/remote_transmitter.rst index c81427004..1def2aff5 100644 --- a/esphomeyaml/components/switch/remote_transmitter.rst +++ b/esphomeyaml/components/switch/remote_transmitter.rst @@ -89,7 +89,7 @@ Supported remote codes: protocol: 1 rc_switch_type_a: group: '11001' - device: '010000' + device: '01000' state: True rc_switch_type_b: address: 4 diff --git a/esphomeyaml/guides/changelog.rst b/esphomeyaml/guides/changelog.rst index 8b1ab08c4..9ebe24708 100644 --- a/esphomeyaml/guides/changelog.rst +++ b/esphomeyaml/guides/changelog.rst @@ -156,8 +156,8 @@ Special thanks to all the contributors for this release: - And last but not least: `@brandond `__ for his awesome work on the new time component -And in more personal news, I'm currently getting ready for my trip to Japan 🇯🇵 to represent Austria -in this years `international olympiad in informatics (IOI) `__ (hence also the relatively +And in more personal news, I'm currently getting ready for my trip to Japan 🇯🇵 to be part of team Austria +in this year's `international olympiad in informatics (IOI) `__ (hence also the relatively short release notes). If you'll be attending too, come say hi :) Other notable changes @@ -194,7 +194,7 @@ Other notable changes on_...: switch.turn_on: my_switch -- You can now also have conditional actions. See !IF_ACTION! +- You can now also have conditional actions. See :ref:`if_action`. - The esphomeyaml dashboard and HassIO add-on now can be configured with a password. - Fixed YAML anchors not working (you can now prefix keys with ``.`` to make esphomeyaml ignore them) - Made Dallas and DHT temperature sensor a bit more reliable by making the code a bit more efficient and thus resolving some timing issues.