2019-02-13 16:54:02 +01:00
|
|
|
esphome:
|
2018-12-05 21:22:06 +01:00
|
|
|
name: $devicename
|
2018-09-26 18:39:41 +02:00
|
|
|
platform: ESP32
|
|
|
|
board: nodemcu-32s
|
|
|
|
build_path: build/test2
|
|
|
|
|
2018-12-05 21:22:06 +01:00
|
|
|
substitutions:
|
|
|
|
devicename: test2
|
|
|
|
|
2019-01-05 20:47:33 +01:00
|
|
|
ethernet:
|
|
|
|
type: LAN8720
|
|
|
|
mdc_pin: GPIO23
|
2019-12-04 16:47:34 +01:00
|
|
|
mdio_pin: GPIO25
|
2019-01-05 20:47:33 +01:00
|
|
|
clk_mode: GPIO0_IN
|
|
|
|
phy_addr: 0
|
|
|
|
power_pin: GPIO25
|
|
|
|
manual_ip:
|
|
|
|
static_ip: 192.168.178.56
|
|
|
|
gateway: 192.168.178.1
|
|
|
|
subnet: 255.255.255.0
|
|
|
|
domain: .local
|
2018-09-26 18:39:41 +02:00
|
|
|
|
2019-01-06 19:03:34 +01:00
|
|
|
api:
|
|
|
|
|
2018-09-26 18:39:41 +02:00
|
|
|
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
|
|
|
|
|
2019-02-11 16:50:10 +01:00
|
|
|
web_server:
|
2019-10-13 14:27:44 +02:00
|
|
|
auth:
|
|
|
|
username: admin
|
|
|
|
password: admin
|
2019-02-11 16:50:10 +01:00
|
|
|
|
2019-10-12 15:03:35 +02:00
|
|
|
as3935_i2c:
|
2019-10-27 12:30:19 +01:00
|
|
|
irq_pin: GPIO12
|
2019-10-12 15:03:35 +02:00
|
|
|
|
|
|
|
|
2018-09-26 18:39:41 +02:00
|
|
|
sensor:
|
|
|
|
- platform: ble_rssi
|
|
|
|
mac_address: AC:37:43:77:5F:4C
|
|
|
|
name: "BLE Google Home Mini RSSI value"
|
2019-10-31 15:34:19 +01:00
|
|
|
- platform: ble_rssi
|
|
|
|
service_uuid: '11aa'
|
|
|
|
name: "BLE Test Service 16"
|
|
|
|
- platform: ble_rssi
|
|
|
|
service_uuid: '11223344'
|
|
|
|
name: "BLE Test Service 32"
|
|
|
|
- platform: ble_rssi
|
|
|
|
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
|
|
|
|
name: "BLE Test Service 128"
|
2019-10-16 13:29:56 +02:00
|
|
|
- platform: xiaomi_hhccjcy01
|
2018-09-26 18:39:41 +02:00
|
|
|
mac_address: 94:2B:FF:5C:91:61
|
|
|
|
temperature:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi HHCCJCY01 Temperature"
|
2018-09-26 18:39:41 +02:00
|
|
|
moisture:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi HHCCJCY01 Moisture"
|
2018-09-26 18:39:41 +02:00
|
|
|
illuminance:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi HHCCJCY01 Illuminance"
|
2018-09-26 18:39:41 +02:00
|
|
|
conductivity:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi HHCCJCY01 Soil Conductivity"
|
2018-09-26 18:39:41 +02:00
|
|
|
battery_level:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi HHCCJCY01 Battery Level"
|
|
|
|
- platform: xiaomi_lywsdcgq
|
2018-09-26 18:39:41 +02:00
|
|
|
mac_address: 7A:80:8E:19:36:BA
|
|
|
|
temperature:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi LYWSDCGQ Temperature"
|
2018-09-26 18:39:41 +02:00
|
|
|
humidity:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi LYWSDCGQ Humidity"
|
2018-09-26 18:39:41 +02:00
|
|
|
battery_level:
|
2019-10-16 13:29:56 +02:00
|
|
|
name: "Xiaomi LYWSDCGQ Battery Level"
|
|
|
|
- platform: xiaomi_lywsd02
|
|
|
|
mac_address: 3F:5B:7D:82:58:4E
|
|
|
|
temperature:
|
|
|
|
name: "Xiaomi LYWSD02 Temperature"
|
|
|
|
humidity:
|
2019-11-07 22:10:09 +01:00
|
|
|
name: "Xiaomi LYWSD02 Humidity"
|
2019-10-16 13:29:56 +02:00
|
|
|
- platform: xiaomi_cgg1
|
|
|
|
mac_address: 7A:80:8E:19:36:BA
|
|
|
|
temperature:
|
|
|
|
name: "Xiaomi CGG1 Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "Xiaomi CGG1 Humidity"
|
|
|
|
battery_level:
|
|
|
|
name: "Xiaomi CGG1 Battery Level"
|
2018-10-20 12:58:52 +02:00
|
|
|
- platform: pmsx003
|
|
|
|
type: PMSX003
|
|
|
|
pm_1_0:
|
|
|
|
name: "PM 1.0 Concentration"
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
pm_10_0:
|
|
|
|
name: "PM 10.0 Concentration"
|
|
|
|
- platform: pmsx003
|
|
|
|
type: PMS5003T
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
temperature:
|
|
|
|
name: "PMS Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "PMS Humidity"
|
|
|
|
- platform: pmsx003
|
|
|
|
type: PMS5003ST
|
|
|
|
pm_2_5:
|
|
|
|
name: "PM 2.5 Concentration"
|
|
|
|
temperature:
|
|
|
|
name: "PMS Temperature"
|
|
|
|
humidity:
|
|
|
|
name: "PMS Humidity"
|
|
|
|
formaldehyde:
|
|
|
|
name: "PMS Formaldehyde Concentration"
|
2018-10-17 21:14:31 +02:00
|
|
|
- platform: cse7766
|
|
|
|
voltage:
|
|
|
|
name: "CSE7766 Voltage"
|
|
|
|
current:
|
|
|
|
name: "CSE7766 Current"
|
|
|
|
power:
|
|
|
|
name: "CSE776 Power"
|
2019-01-05 19:52:01 +01:00
|
|
|
- platform: apds9960
|
|
|
|
type: proximity
|
|
|
|
name: APDS9960 Proximity
|
|
|
|
- platform: apds9960
|
|
|
|
type: clear
|
|
|
|
name: APDS9960 Clear
|
|
|
|
- platform: apds9960
|
|
|
|
type: red
|
|
|
|
name: APDS9960 Red
|
|
|
|
- platform: apds9960
|
|
|
|
type: green
|
|
|
|
name: APDS9960 Green
|
|
|
|
- platform: apds9960
|
|
|
|
type: blue
|
|
|
|
name: APDS9960 Blue
|
2019-01-06 19:03:34 +01:00
|
|
|
- platform: homeassistant
|
|
|
|
entity_id: sensor.hello_world
|
|
|
|
id: ha_hello_world
|
2019-10-12 17:03:01 +02:00
|
|
|
- platform: as3935
|
2019-10-12 15:03:35 +02:00
|
|
|
lightning_energy:
|
|
|
|
name: "Lightning Energy"
|
|
|
|
distance:
|
|
|
|
name: "Distance Storm"
|
2019-11-07 22:10:09 +01:00
|
|
|
- platform: ruuvitag
|
|
|
|
mac_address: FF:56:D3:2F:7D:E8
|
|
|
|
humidity:
|
|
|
|
name: "RuuviTag Humidity"
|
|
|
|
temperature:
|
|
|
|
name: "RuuviTag Temperature"
|
|
|
|
pressure:
|
|
|
|
name: "RuuviTag Pressure"
|
|
|
|
acceleration_x:
|
|
|
|
name: "RuuviTag Acceleration X"
|
|
|
|
acceleration_y:
|
|
|
|
name: "RuuviTag Acceleration Y"
|
|
|
|
acceleration_z:
|
|
|
|
name: "RuuviTag Acceleration Z"
|
|
|
|
battery_voltage:
|
|
|
|
name: "RuuviTag Battery Voltage"
|
|
|
|
tx_power:
|
|
|
|
name: "RuuviTag TX Power"
|
|
|
|
movement_counter:
|
|
|
|
name: "RuuviTag Movement Counter"
|
|
|
|
measurement_sequence_number:
|
|
|
|
name: "RuuviTag Measurement Sequence Number"
|
2019-01-06 19:03:34 +01:00
|
|
|
|
|
|
|
time:
|
|
|
|
- platform: homeassistant
|
2019-04-22 21:56:30 +02:00
|
|
|
on_time:
|
|
|
|
- at: '16:00:00'
|
|
|
|
then:
|
|
|
|
- logger.log: It's 16:00
|
2019-01-05 19:52:01 +01:00
|
|
|
|
|
|
|
apds9960:
|
|
|
|
address: 0x20
|
|
|
|
update_interval: 60s
|
2018-09-26 18:39:41 +02:00
|
|
|
|
|
|
|
esp32_touch:
|
|
|
|
setup_mode: True
|
|
|
|
|
|
|
|
binary_sensor:
|
2019-04-17 12:06:00 +02:00
|
|
|
- platform: ble_presence
|
2018-09-26 18:39:41 +02:00
|
|
|
mac_address: AC:37:43:77:5F:4C
|
|
|
|
name: "ESP32 BLE Tracker Google Home Mini"
|
2019-10-31 15:34:19 +01:00
|
|
|
- platform: ble_presence
|
|
|
|
service_uuid: '11aa'
|
|
|
|
name: "BLE Test Service 16 Presence"
|
|
|
|
- platform: ble_presence
|
|
|
|
service_uuid: '11223344'
|
|
|
|
name: "BLE Test Service 32 Presence"
|
|
|
|
- platform: ble_presence
|
|
|
|
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
|
|
|
|
name: "BLE Test Service 128 Presence"
|
2018-09-26 18:39:41 +02:00
|
|
|
- platform: esp32_touch
|
|
|
|
name: "ESP32 Touch Pad GPIO27"
|
|
|
|
pin: GPIO27
|
|
|
|
threshold: 1000
|
2019-01-05 19:52:01 +01:00
|
|
|
- platform: apds9960
|
|
|
|
direction: up
|
|
|
|
name: APDS9960 Up
|
|
|
|
- platform: apds9960
|
|
|
|
direction: down
|
|
|
|
name: APDS9960 Down
|
|
|
|
- platform: apds9960
|
|
|
|
direction: left
|
|
|
|
name: APDS9960 Left
|
|
|
|
- platform: apds9960
|
|
|
|
direction: right
|
|
|
|
name: APDS9960 Right
|
2019-02-10 16:31:17 +01:00
|
|
|
- platform: homeassistant
|
|
|
|
entity_id: binary_sensor.hello_world
|
|
|
|
id: ha_hello_world_binary
|
2019-10-12 17:03:01 +02:00
|
|
|
- platform: as3935
|
2019-10-12 15:03:35 +02:00
|
|
|
name: "Storm Alert"
|
2018-09-26 18:39:41 +02:00
|
|
|
|
|
|
|
esp32_ble_tracker:
|
2020-04-28 01:57:02 +02:00
|
|
|
on_ble_advertise:
|
|
|
|
- mac_address: AC:37:43:77:5F:4C
|
|
|
|
then:
|
|
|
|
- lambda: !lambda |-
|
|
|
|
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
|
|
|
- then:
|
|
|
|
- lambda: !lambda |-
|
|
|
|
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
|
|
|
|
on_ble_service_data_advertise:
|
|
|
|
- service_uuid: ABCD
|
|
|
|
then:
|
|
|
|
- lambda: !lambda |-
|
|
|
|
ESP_LOGD("main", "Length of service data is %i", x.size());
|
|
|
|
on_ble_manufacturer_data_advertise:
|
|
|
|
- manufacturer_id: ABCD
|
|
|
|
then:
|
|
|
|
- lambda: !lambda |-
|
|
|
|
ESP_LOGD("main", "Length of manufacturer data is %i", x.size());
|
|
|
|
|
2018-09-26 18:39:41 +02:00
|
|
|
|
2019-03-17 16:04:49 +01:00
|
|
|
#esp32_ble_beacon:
|
|
|
|
# type: iBeacon
|
|
|
|
# uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
|
2018-09-26 18:39:41 +02:00
|
|
|
|
|
|
|
status_led:
|
|
|
|
pin: GPIO2
|
2018-10-17 21:24:02 +02:00
|
|
|
|
|
|
|
text_sensor:
|
|
|
|
- platform: version
|
2019-02-13 16:54:02 +01:00
|
|
|
name: "ESPHome Version"
|
2018-10-17 21:24:02 +02:00
|
|
|
icon: mdi:icon
|
|
|
|
id: version_sensor
|
|
|
|
on_value:
|
2019-03-03 16:45:56 +01:00
|
|
|
- if:
|
|
|
|
condition:
|
|
|
|
- api.connected:
|
|
|
|
then:
|
|
|
|
- lambda: !lambda |-
|
|
|
|
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
|
2018-10-20 12:58:02 +02:00
|
|
|
- script.execute: my_script
|
2019-01-14 11:09:32 +01:00
|
|
|
- homeassistant.service:
|
|
|
|
service: notify.html5
|
|
|
|
data:
|
|
|
|
title: New Humidity
|
|
|
|
data_template:
|
|
|
|
message: The humidity is {{ my_variable }}%.
|
|
|
|
variables:
|
|
|
|
my_variable: |-
|
|
|
|
return id(version_sensor).state;
|
2019-04-17 12:06:00 +02:00
|
|
|
my_variable_str: |-
|
|
|
|
return "Hello World";
|
2019-04-22 21:56:30 +02:00
|
|
|
- homeassistant.service:
|
|
|
|
service: light.turn_on
|
|
|
|
data:
|
|
|
|
entity_id: light.my_light
|
2018-10-17 21:24:02 +02:00
|
|
|
- platform: template
|
|
|
|
name: "Template Text Sensor"
|
|
|
|
lambda: |-
|
|
|
|
return {"Hello World"};
|
2019-01-06 19:03:34 +01:00
|
|
|
- platform: homeassistant
|
|
|
|
entity_id: sensor.hello_world2
|
|
|
|
id: ha_hello_world2
|
2018-10-20 12:58:02 +02:00
|
|
|
|
|
|
|
script:
|
|
|
|
- id: my_script
|
|
|
|
then:
|
|
|
|
- lambda: 'ESP_LOGD("main", "Hello World!");'
|
2019-01-06 19:03:34 +01:00
|
|
|
|
|
|
|
stepper:
|
|
|
|
- platform: uln2003
|
|
|
|
id: my_stepper
|
|
|
|
pin_a: GPIO23
|
2019-12-04 16:47:34 +01:00
|
|
|
pin_b: GPIO27
|
2019-01-06 19:03:34 +01:00
|
|
|
pin_c: GPIO25
|
|
|
|
pin_d: GPIO26
|
|
|
|
sleep_when_done: no
|
|
|
|
step_mode: HALF_STEP
|
|
|
|
max_speed: 250 steps/s
|
|
|
|
|
|
|
|
# Optional:
|
|
|
|
acceleration: inf
|
|
|
|
deceleration: inf
|
2019-01-09 15:18:54 +01:00
|
|
|
|
|
|
|
interval:
|
|
|
|
interval: 5s
|
|
|
|
then:
|
|
|
|
- logger.log: "Interval Run"
|
2019-05-26 10:28:46 +02:00
|
|
|
|
|
|
|
display:
|
|
|
|
|