mirror of
https://github.com/esphome/esphome.git
synced 2025-11-10 03:51:52 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
433b605bef | ||
|
|
6e60c6493a | ||
|
|
4e63bc96d5 | ||
|
|
ce4b339d16 | ||
|
|
ab6d293d0d | ||
|
|
5e5137960d |
@@ -47,11 +47,16 @@ pylint:
|
|||||||
script:
|
script:
|
||||||
- pylint esphomeyaml
|
- pylint esphomeyaml
|
||||||
|
|
||||||
test:
|
test1:
|
||||||
<<: *test
|
<<: *test
|
||||||
script:
|
script:
|
||||||
- esphomeyaml tests/test1.yaml compile
|
- esphomeyaml tests/test1.yaml compile
|
||||||
|
|
||||||
|
test2:
|
||||||
|
<<: *test
|
||||||
|
script:
|
||||||
|
- esphomeyaml tests/test2.yaml compile
|
||||||
|
|
||||||
.build-hassio: &build-hassio
|
.build-hassio: &build-hassio
|
||||||
<<: *docker-builder
|
<<: *docker-builder
|
||||||
stage: build
|
stage: build
|
||||||
@@ -79,6 +84,10 @@ test:
|
|||||||
- echo "Publishing version ${version}"
|
- echo "Publishing version ${version}"
|
||||||
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
|
||||||
- docker pull "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}"
|
- docker pull "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}"
|
||||||
|
- |
|
||||||
|
docker tag \
|
||||||
|
"${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \
|
||||||
|
"${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
||||||
- |
|
- |
|
||||||
docker tag \
|
docker tag \
|
||||||
"${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \
|
"${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \
|
||||||
@@ -87,6 +96,7 @@ test:
|
|||||||
docker tag \
|
docker tag \
|
||||||
"ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" \
|
"ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}" \
|
||||||
"ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
"ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
||||||
|
- docker push "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
||||||
- docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}"
|
- docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${version}"
|
||||||
- docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
- docker push "ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:latest"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ python:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install tornado esptool flake8==3.5.0 pylint==1.8.4 tzlocal pillow
|
- pip install flake8==3.5.0 pylint==1.9.3 tzlocal pillow
|
||||||
script:
|
script:
|
||||||
- flake8 esphomeyaml
|
- flake8 esphomeyaml
|
||||||
- pylint esphomeyaml
|
- pylint esphomeyaml
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ EXPOSE 6123
|
|||||||
VOLUME /config
|
VOLUME /config
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY requirements.txt /usr/src/app/
|
RUN pip install --no-cache-dir --no-binary :all: platformio && \
|
||||||
RUN pip install --no-cache-dir -r requirements.txt && \
|
platformio settings set enable_telemetry No
|
||||||
pip install --no-cache-dir tornado esptool
|
|
||||||
|
|
||||||
COPY docker/platformio.ini /usr/src/app/
|
COPY docker/platformio.ini /usr/src/app/
|
||||||
RUN platformio settings set enable_telemetry No && \
|
RUN platformio settings set enable_telemetry No && \
|
||||||
@@ -20,7 +19,7 @@ RUN platformio settings set enable_telemetry No && \
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install --no-cache-dir -e . && \
|
RUN pip install --no-cache-dir -e . && \
|
||||||
pip install --no-cache-dir tzlocal
|
pip install --no-cache-dir tzlocal pillow
|
||||||
|
|
||||||
WORKDIR /config
|
WORKDIR /config
|
||||||
ENTRYPOINT ["esphomeyaml"]
|
ENTRYPOINT ["esphomeyaml"]
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ FROM python:2.7
|
|||||||
COPY requirements.txt /requirements.txt
|
COPY requirements.txt /requirements.txt
|
||||||
|
|
||||||
RUN pip install -r /requirements.txt && \
|
RUN pip install -r /requirements.txt && \
|
||||||
pip install flake8==3.5.0 pylint==1.8.4 tzlocal pillow
|
pip install flake8==3.5.0 pylint==1.9.3 tzlocal pillow
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "esphomeyaml",
|
"name": "esphomeyaml",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"slug": "esphomeyaml",
|
"slug": "esphomeyaml",
|
||||||
"description": "esphomeyaml HassIO add-on for intelligently managing all your ESP8266/ESP32 devices.",
|
"description": "esphomeyaml HassIO add-on for intelligently managing all your ESP8266/ESP32 devices.",
|
||||||
"url": "https://esphomelib.com/esphomeyaml/index.html",
|
"url": "https://esphomelib.com/esphomeyaml/index.html",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
MAJOR_VERSION = 1
|
MAJOR_VERSION = 1
|
||||||
MINOR_VERSION = 8
|
MINOR_VERSION = 8
|
||||||
PATCH_VERSION = '0'
|
PATCH_VERSION = '1'
|
||||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||||
ESPHOMELIB_VERSION = '1.8.0'
|
ESPHOMELIB_VERSION = '1.8.0'
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import os
|
|||||||
|
|
||||||
from esphomeyaml import core
|
from esphomeyaml import core
|
||||||
from esphomeyaml.config import iter_components
|
from esphomeyaml.config import iter_components
|
||||||
from esphomeyaml.const import CONF_ARDUINO_VERSION, CONF_BOARD, CONF_BOARD_FLASH_MODE, \
|
from esphomeyaml.const import ARDUINO_VERSION_ESP32_DEV, CONF_ARDUINO_VERSION, CONF_BOARD, \
|
||||||
CONF_ESPHOMELIB_VERSION, CONF_ESPHOMEYAML, CONF_LOCAL, CONF_NAME, CONF_USE_CUSTOM_CODE, \
|
CONF_BOARD_FLASH_MODE, CONF_ESPHOMELIB_VERSION, CONF_ESPHOMEYAML, CONF_LOCAL, CONF_NAME, \
|
||||||
ESP_PLATFORM_ESP32, ARDUINO_VERSION_ESP32_DEV
|
CONF_USE_CUSTOM_CODE, ESP_PLATFORM_ESP32
|
||||||
from esphomeyaml.core import ESPHomeYAMLError
|
from esphomeyaml.core import ESPHomeYAMLError
|
||||||
from esphomeyaml.core_config import VERSION_REGEX
|
from esphomeyaml.core_config import VERSION_REGEX
|
||||||
from esphomeyaml.helpers import relative_path
|
from esphomeyaml.helpers import relative_path
|
||||||
@@ -60,8 +60,13 @@ lib_deps =
|
|||||||
build_flags =
|
build_flags =
|
||||||
{build_flags}
|
{build_flags}
|
||||||
${{common.build_flags}}
|
${{common.build_flags}}
|
||||||
|
upload_speed = {upload_speed}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
UPLOAD_SPEED_OVERRIDE = {
|
||||||
|
'esp210': 57600,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_build_flags(config, key):
|
def get_build_flags(config, key):
|
||||||
build_flags = set()
|
build_flags = set()
|
||||||
@@ -86,6 +91,7 @@ def get_ini_content(config, path):
|
|||||||
u'platform': config[CONF_ESPHOMEYAML][CONF_ARDUINO_VERSION],
|
u'platform': config[CONF_ESPHOMEYAML][CONF_ARDUINO_VERSION],
|
||||||
u'board': config[CONF_ESPHOMEYAML][CONF_BOARD],
|
u'board': config[CONF_ESPHOMEYAML][CONF_BOARD],
|
||||||
u'build_flags': u'',
|
u'build_flags': u'',
|
||||||
|
u'upload_speed': UPLOAD_SPEED_OVERRIDE.get(core.BOARD, 115200),
|
||||||
}
|
}
|
||||||
build_flags = set()
|
build_flags = set()
|
||||||
if not config[CONF_ESPHOMEYAML][CONF_USE_CUSTOM_CODE]:
|
if not config[CONF_ESPHOMEYAML][CONF_USE_CUSTOM_CODE]:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
voluptuous==0.11.1
|
voluptuous>=0.11.1
|
||||||
platformio==3.5.2
|
platformio>=3.5.3
|
||||||
pyyaml==3.12
|
pyyaml>=3.12
|
||||||
paho-mqtt==1.3.1
|
paho-mqtt>=1.3.1
|
||||||
colorlog==3.1.2
|
colorlog>=3.1.2
|
||||||
tornado==5.0.2
|
tornado>=5.0.0
|
||||||
esptool==2.3.1
|
esptool>=2.3.1
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -23,7 +23,7 @@ DOWNLOAD_URL = '{}/archive/{}.zip'.format(GITHUB_URL, const.__version__)
|
|||||||
|
|
||||||
REQUIRES = [
|
REQUIRES = [
|
||||||
'voluptuous>=0.11.1',
|
'voluptuous>=0.11.1',
|
||||||
'platformio>=3.5.2',
|
'platformio>=3.5.3',
|
||||||
'pyyaml>=3.12',
|
'pyyaml>=3.12',
|
||||||
'paho-mqtt>=1.3.1',
|
'paho-mqtt>=1.3.1',
|
||||||
'colorlog>=3.1.2',
|
'colorlog>=3.1.2',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ esphomeyaml:
|
|||||||
then:
|
then:
|
||||||
- lambda: >-
|
- lambda: >-
|
||||||
ESP_LOGV("main", "ON LOOP!");
|
ESP_LOGV("main", "ON LOOP!");
|
||||||
build_path: build
|
build_path: build/test1
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
ssid: 'MySSID'
|
ssid: 'MySSID'
|
||||||
@@ -194,9 +194,6 @@ sensor:
|
|||||||
retain: False
|
retain: False
|
||||||
availability:
|
availability:
|
||||||
state_topic: livingroom/custom_state_topic
|
state_topic: livingroom/custom_state_topic
|
||||||
- platform: ble_rssi
|
|
||||||
mac_address: AC:37:43:77:5F:4C
|
|
||||||
name: "BLE Google Home Mini RSSI value"
|
|
||||||
- platform: bme280
|
- platform: bme280
|
||||||
temperature:
|
temperature:
|
||||||
name: "Outside Temperature"
|
name: "Outside Temperature"
|
||||||
@@ -427,26 +424,6 @@ sensor:
|
|||||||
- platform: wifi_signal
|
- platform: wifi_signal
|
||||||
name: "WiFi Signal Sensor"
|
name: "WiFi Signal Sensor"
|
||||||
update_interval: 15s
|
update_interval: 15s
|
||||||
- platform: xiaomi_miflora
|
|
||||||
mac_address: 94:2B:FF:5C:91:61
|
|
||||||
temperature:
|
|
||||||
name: "Xiaomi MiFlora Temperature"
|
|
||||||
moisture:
|
|
||||||
name: "Xiaomi MiFlora Moisture"
|
|
||||||
illuminance:
|
|
||||||
name: "Xiaomi MiFlora Illuminance"
|
|
||||||
conductivity:
|
|
||||||
name: "Xiaomi MiFlora Soil Conductivity"
|
|
||||||
battery_level:
|
|
||||||
name: "Xiaomi MiFlora Battery Level"
|
|
||||||
- platform: xiaomi_mijia
|
|
||||||
mac_address: 7A:80:8E:19:36:BA
|
|
||||||
temperature:
|
|
||||||
name: "Xiaomi MiJia Temperature"
|
|
||||||
humidity:
|
|
||||||
name: "Xiaomi MiJia Humidity"
|
|
||||||
battery_level:
|
|
||||||
name: "Xiaomi MiJia Battery Level"
|
|
||||||
|
|
||||||
|
|
||||||
esp32_touch:
|
esp32_touch:
|
||||||
@@ -496,9 +473,6 @@ binary_sensor:
|
|||||||
id: binary_sensor1
|
id: binary_sensor1
|
||||||
- platform: status
|
- platform: status
|
||||||
name: "Living Room Status"
|
name: "Living Room Status"
|
||||||
- platform: esp32_ble_tracker
|
|
||||||
mac_address: AC:37:43:77:5F:4C
|
|
||||||
name: "ESP32 BLE Tracker Google Home Mini"
|
|
||||||
- platform: esp32_touch
|
- platform: esp32_touch
|
||||||
name: "ESP32 Touch Pad GPIO27"
|
name: "ESP32 Touch Pad GPIO27"
|
||||||
pin: GPIO27
|
pin: GPIO27
|
||||||
@@ -888,13 +862,6 @@ remote_receiver:
|
|||||||
pin: GPIO32
|
pin: GPIO32
|
||||||
dump: all
|
dump: all
|
||||||
|
|
||||||
esp32_ble_tracker:
|
|
||||||
scan_interval: 300s
|
|
||||||
|
|
||||||
esp32_ble_beacon:
|
|
||||||
type: iBeacon
|
|
||||||
uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
|
|
||||||
|
|
||||||
status_led:
|
status_led:
|
||||||
pin: GPIO2
|
pin: GPIO2
|
||||||
|
|
||||||
|
|||||||
102
tests/test2.yaml
Normal file
102
tests/test2.yaml
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
esphomeyaml:
|
||||||
|
name: test1
|
||||||
|
platform: ESP32
|
||||||
|
board: nodemcu-32s
|
||||||
|
# Use latest upstream esphomelib git version.
|
||||||
|
esphomelib_version: dev
|
||||||
|
# Use this for testing while developing:
|
||||||
|
# esphomelib_version:
|
||||||
|
# local: ~/path/to/esphomelib
|
||||||
|
use_custom_code: true
|
||||||
|
build_path: build/test2
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: 'MySSID'
|
||||||
|
password: 'password1'
|
||||||
|
reboot_timeout: 120s
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
broker: '192.168.178.84'
|
||||||
|
port: 1883
|
||||||
|
username: 'debug'
|
||||||
|
password: 'debug'
|
||||||
|
|
||||||
|
i2c:
|
||||||
|
sda: 21
|
||||||
|
scl: 22
|
||||||
|
scan: False
|
||||||
|
|
||||||
|
spi:
|
||||||
|
clk_pin: GPIO21
|
||||||
|
mosi_pin: GPIO22
|
||||||
|
miso_pin: GPIO23
|
||||||
|
|
||||||
|
uart:
|
||||||
|
tx_pin: GPIO22
|
||||||
|
rx_pin: GPIO23
|
||||||
|
baud_rate: 115200
|
||||||
|
|
||||||
|
ota:
|
||||||
|
safe_mode: True
|
||||||
|
port: 3286
|
||||||
|
|
||||||
|
logger:
|
||||||
|
level: DEBUG
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
|
||||||
|
deep_sleep:
|
||||||
|
run_duration: 20s
|
||||||
|
sleep_duration: 50s
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: ble_rssi
|
||||||
|
mac_address: AC:37:43:77:5F:4C
|
||||||
|
name: "BLE Google Home Mini RSSI value"
|
||||||
|
- platform: xiaomi_miflora
|
||||||
|
mac_address: 94:2B:FF:5C:91:61
|
||||||
|
temperature:
|
||||||
|
name: "Xiaomi MiFlora Temperature"
|
||||||
|
moisture:
|
||||||
|
name: "Xiaomi MiFlora Moisture"
|
||||||
|
illuminance:
|
||||||
|
name: "Xiaomi MiFlora Illuminance"
|
||||||
|
conductivity:
|
||||||
|
name: "Xiaomi MiFlora Soil Conductivity"
|
||||||
|
battery_level:
|
||||||
|
name: "Xiaomi MiFlora Battery Level"
|
||||||
|
- platform: xiaomi_mijia
|
||||||
|
mac_address: 7A:80:8E:19:36:BA
|
||||||
|
temperature:
|
||||||
|
name: "Xiaomi MiJia Temperature"
|
||||||
|
humidity:
|
||||||
|
name: "Xiaomi MiJia Humidity"
|
||||||
|
battery_level:
|
||||||
|
name: "Xiaomi MiJia Battery Level"
|
||||||
|
|
||||||
|
|
||||||
|
esp32_touch:
|
||||||
|
setup_mode: True
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: esp32_ble_tracker
|
||||||
|
mac_address: AC:37:43:77:5F:4C
|
||||||
|
name: "ESP32 BLE Tracker Google Home Mini"
|
||||||
|
- platform: esp32_touch
|
||||||
|
name: "ESP32 Touch Pad GPIO27"
|
||||||
|
pin: GPIO27
|
||||||
|
threshold: 1000
|
||||||
|
|
||||||
|
remote_receiver:
|
||||||
|
pin: GPIO32
|
||||||
|
dump: []
|
||||||
|
|
||||||
|
esp32_ble_tracker:
|
||||||
|
scan_interval: 300s
|
||||||
|
|
||||||
|
esp32_ble_beacon:
|
||||||
|
type: iBeacon
|
||||||
|
uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
|
||||||
|
|
||||||
|
status_led:
|
||||||
|
pin: GPIO2
|
||||||
Reference in New Issue
Block a user