Compare commits
No commits in common. "main" and "esphome.2024.x" have entirely different histories.
main
...
esphome.20
|
|
@ -9,10 +9,21 @@ esphome:
|
||||||
platformio_options:
|
platformio_options:
|
||||||
board_build.flash_mode: dio
|
board_build.flash_mode: dio
|
||||||
board_build.f_cpu: 80000000L
|
board_build.f_cpu: 80000000L
|
||||||
|
on_boot:
|
||||||
|
priority: 900
|
||||||
|
then:
|
||||||
|
lambda: |-
|
||||||
|
id(cpu_speed) = ESP.getCpuFreqMHz() ;
|
||||||
project:
|
project:
|
||||||
name: Screek.Human_Presence_Sensor
|
name: Screek.Human_Presence_Sensor
|
||||||
version: 1U
|
version: 1U
|
||||||
min_version: 2025.5.1
|
min_version: 2023.6.1
|
||||||
|
|
||||||
|
globals:
|
||||||
|
- id: cpu_speed
|
||||||
|
type: int
|
||||||
|
restore_value: no
|
||||||
|
initial_value: '0'
|
||||||
|
|
||||||
external_components:
|
external_components:
|
||||||
# - source: github://screek-workshop/custom_components_support_for_screek_1u
|
# - source: github://screek-workshop/custom_components_support_for_screek_1u
|
||||||
|
|
@ -20,12 +31,14 @@ external_components:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/screek-workshop/custom_components_support_for_screek_1u
|
url: https://github.com/screek-workshop/custom_components_support_for_screek_1u
|
||||||
ref: master
|
ref: master
|
||||||
components: [ ld2410 ]
|
# components: [ ld2410, uart ]
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: lolin_s2_mini
|
board: lolin_s2_mini
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: arduino
|
||||||
|
version: 2.0.9
|
||||||
|
platform_version: 6.3.2
|
||||||
|
|
||||||
improv_serial:
|
improv_serial:
|
||||||
|
|
||||||
|
|
@ -37,9 +50,12 @@ api:
|
||||||
# key: "YOUR-API-PASSWORD"
|
# key: "YOUR-API-PASSWORD"
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
- platform: esphome
|
# This won't work for the original firmware(we use diffrent ota password),
|
||||||
# use your own ota password plz. this is a words by Socrates.
|
# so if you want to turn it into your own OTA,
|
||||||
password: "all-things-in-their-being-are-good-for-something" # words by Socrates
|
# make sure to completely flash your custom yaml in the firmware once.
|
||||||
|
# after that, you may always ota with your own password.
|
||||||
|
password: "all-things-in-their-being-are-good-for-something" # words by Socrates
|
||||||
|
safe_mode: False
|
||||||
|
|
||||||
# By automatically importing to the console,
|
# By automatically importing to the console,
|
||||||
# subsequent adjustments can be easily made without having to manually fix a specific name.
|
# subsequent adjustments can be easily made without having to manually fix a specific name.
|
||||||
|
|
@ -74,12 +90,29 @@ binary_sensor:
|
||||||
name: Still Target
|
name: Still Target
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: internal_temperature
|
- platform: template
|
||||||
|
name: "ESP Cpu Speed"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
unit_of_measurement: Mhz
|
||||||
|
lambda: |-
|
||||||
|
return (id(cpu_speed));
|
||||||
|
entity_category: "diagnostic"
|
||||||
|
|
||||||
|
# - platform: internal_temperature
|
||||||
|
# id: sys_esp_temperature
|
||||||
|
# name: ESP Temperature
|
||||||
|
# unit_of_measurement: °C
|
||||||
|
# device_class: TEMPERATURE
|
||||||
|
# update_interval: 1s
|
||||||
|
# entity_category: "diagnostic"
|
||||||
|
|
||||||
|
- platform: template
|
||||||
id: sys_esp_temperature
|
id: sys_esp_temperature
|
||||||
name: ESP Temperature
|
name: ESP Temperature
|
||||||
|
lambda: return temperatureRead();
|
||||||
unit_of_measurement: °C
|
unit_of_measurement: °C
|
||||||
device_class: TEMPERATURE
|
device_class: TEMPERATURE
|
||||||
update_interval: 45s
|
update_interval: 5s
|
||||||
entity_category: "diagnostic"
|
entity_category: "diagnostic"
|
||||||
|
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ external_components:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_1w
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_1w
|
||||||
ref: main
|
ref: main
|
||||||
components: [uart, ld2410]
|
components: [esp32, uart, ld2410]
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32-c3-devkitm-1
|
board: esp32-c3-devkitm-1
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ external_components:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_1w
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_1w
|
||||||
ref: main
|
ref: main
|
||||||
components: [uart, ld2410]
|
components: [esp32, uart, ld2410]
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32-c3-devkitm-1
|
board: esp32-c3-devkitm-1
|
||||||
|
|
|
||||||
5
2a/yaml/beta/README.md
Normal file
5
2a/yaml/beta/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
Current version synchronized with public version: V230818_2_beta
|
||||||
|
|
||||||
|
More Doc: https://docs.screek.io/2a
|
||||||
|
|
||||||
|
Thank you for supporting Screek.
|
||||||
1335
2a/yaml/beta/human-sensor-2a-beta-github.yaml
Normal file
1335
2a/yaml/beta/human-sensor-2a-beta-github.yaml
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -13,6 +13,10 @@ esphome:
|
||||||
name: Screek.Human_Presence_Sensor
|
name: Screek.Human_Presence_Sensor
|
||||||
version: 2A
|
version: 2A
|
||||||
on_boot:
|
on_boot:
|
||||||
|
- priority: 100
|
||||||
|
then:
|
||||||
|
lambda: |-
|
||||||
|
id(cpu_speed) = ESP.getCpuFreqMHz();
|
||||||
- priority: -200
|
- priority: -200
|
||||||
then:
|
then:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
|
|
@ -24,12 +28,25 @@ esphome:
|
||||||
preferences:
|
preferences:
|
||||||
flash_write_interval: 5s
|
flash_write_interval: 5s
|
||||||
|
|
||||||
|
external_components:
|
||||||
|
- source:
|
||||||
|
type: git
|
||||||
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_2a
|
||||||
|
ref: main
|
||||||
|
components: [esp32, uart]
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: lolin_c3_mini
|
board: lolin_c3_mini
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: arduino
|
||||||
|
version: 2.0.9
|
||||||
|
platform_version: 6.3.0
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
|
- id: cpu_speed
|
||||||
|
type: int
|
||||||
|
restore_value: no
|
||||||
|
initial_value: '0'
|
||||||
- id: last_update_ld2450
|
- id: last_update_ld2450
|
||||||
type: unsigned long
|
type: unsigned long
|
||||||
restore_value: no
|
restore_value: no
|
||||||
|
|
@ -57,12 +74,9 @@ debug:
|
||||||
api:
|
api:
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
- platform: esphome
|
# use your own ota password plz. this is a words by Socrates.
|
||||||
# use your own ota password plz. this is a words by Socrates.
|
password: "all-things-in-their-being-are-good-for-something"
|
||||||
password: "all-things-in-their-being-are-good-for-something"
|
safe_mode: False
|
||||||
|
|
||||||
safe_mode:
|
|
||||||
disabled: True
|
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
power_save_mode: LIGHT
|
power_save_mode: LIGHT
|
||||||
|
|
@ -632,9 +646,20 @@ script:
|
||||||
id(tips_zone_ex1_conf).publish_state("Zone Exclusion 1");
|
id(tips_zone_ex1_conf).publish_state("Zone Exclusion 1");
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: internal_temperature
|
- platform: template
|
||||||
|
name: "ESP CPU Speed"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
icon: mdi:cpu-32-bit
|
||||||
|
unit_of_measurement: Mhz
|
||||||
|
disabled_by_default: True
|
||||||
|
lambda: |-
|
||||||
|
return (id(cpu_speed));
|
||||||
|
entity_category: "diagnostic"
|
||||||
|
update_interval: 600s
|
||||||
|
- platform: template
|
||||||
id: sys_esp_temperature
|
id: sys_esp_temperature
|
||||||
name: ESP Temperature
|
name: ESP Temperature
|
||||||
|
lambda: return temperatureRead();
|
||||||
unit_of_measurement: °C
|
unit_of_measurement: °C
|
||||||
device_class: TEMPERATURE
|
device_class: TEMPERATURE
|
||||||
update_interval: 45s
|
update_interval: 45s
|
||||||
|
|
@ -838,9 +863,7 @@ sensor:
|
||||||
light:
|
light:
|
||||||
- platform: status_led
|
- platform: status_led
|
||||||
name: sys_status
|
name: sys_status
|
||||||
pin:
|
pin: GPIO13
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
internal: True
|
internal: True
|
||||||
restore_mode: ALWAYS_OFF
|
restore_mode: ALWAYS_OFF
|
||||||
- platform: binary
|
- platform: binary
|
||||||
|
|
@ -856,9 +879,7 @@ time:
|
||||||
output:
|
output:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: board_info_ed
|
id: board_info_ed
|
||||||
pin:
|
pin: GPIO12
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: factory_reset
|
- platform: factory_reset
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ Consider the current privacy so extravagant, and the severe dependence on cloud
|
||||||
If you would like to purchase one of our DIY products, or take a look at our documentation, feel free to visit
|
If you would like to purchase one of our DIY products, or take a look at our documentation, feel free to visit
|
||||||
https://www.screek.io/
|
https://www.screek.io/
|
||||||
|
|
||||||
Our Store:
|
|
||||||
https://shop.screek.io
|
|
||||||
|
|
||||||
Our eBay Store:
|
Our eBay Store:
|
||||||
https://www.ebay.com/str/screekworkshop
|
https://www.ebay.com/str/screekworkshop
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ external_components:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_2a
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_2a
|
||||||
ref: main
|
ref: main
|
||||||
components: [uart]
|
components: [esp32, uart]
|
||||||
- source:
|
- source:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/ssieb/custom_components #Thanks for @ssieb components.
|
url: https://github.com/ssieb/custom_components #Thanks for @ssieb components.
|
||||||
|
|
@ -313,9 +313,7 @@ sensor:
|
||||||
light:
|
light:
|
||||||
- platform: status_led
|
- platform: status_led
|
||||||
name: sys_status
|
name: sys_status
|
||||||
pin:
|
pin: GPIO13
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
internal: True
|
internal: True
|
||||||
restore_mode: ALWAYS_OFF
|
restore_mode: ALWAYS_OFF
|
||||||
- platform: binary
|
- platform: binary
|
||||||
|
|
@ -333,9 +331,7 @@ i2c:
|
||||||
output:
|
output:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: board_info_ed
|
id: board_info_ed
|
||||||
pin:
|
pin: GPIO12
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: factory_reset
|
- platform: factory_reset
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,14 @@ esphome:
|
||||||
name: Screek.Human_Presence_Sensor
|
name: Screek.Human_Presence_Sensor
|
||||||
version: F2
|
version: F2
|
||||||
on_boot:
|
on_boot:
|
||||||
|
- priority: 100
|
||||||
|
then:
|
||||||
|
lambda: |-
|
||||||
|
id(cpu_speed) = ESP.getCpuFreqMHz();
|
||||||
- priority: 300
|
- priority: 300
|
||||||
then:
|
then:
|
||||||
lambda: |-
|
lambda: |-
|
||||||
id(screek_version).publish_state("V251104_1");
|
id(screek_version).publish_state("V240708_1");
|
||||||
- priority: -200
|
- priority: -200
|
||||||
then:
|
then:
|
||||||
- uart.write:
|
- uart.write:
|
||||||
|
|
@ -61,6 +65,11 @@ preferences:
|
||||||
flash_write_interval: 5s
|
flash_write_interval: 5s
|
||||||
|
|
||||||
external_components:
|
external_components:
|
||||||
|
- source:
|
||||||
|
type: git
|
||||||
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_2a
|
||||||
|
ref: main
|
||||||
|
components: [esp32, uart]
|
||||||
- source:
|
- source:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/ssieb/custom_components #Thanks for @ssieb components.
|
url: https://github.com/ssieb/custom_components #Thanks for @ssieb components.
|
||||||
|
|
@ -69,11 +78,15 @@ external_components:
|
||||||
esp32:
|
esp32:
|
||||||
board: lolin_c3_mini
|
board: lolin_c3_mini
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: arduino
|
||||||
# version: 2.0.9
|
version: 2.0.9
|
||||||
# platform_version: 6.3.0
|
platform_version: 6.3.0
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
|
- id: cpu_speed
|
||||||
|
type: int
|
||||||
|
restore_value: no
|
||||||
|
initial_value: '0'
|
||||||
- id: last_update_ld2450
|
- id: last_update_ld2450
|
||||||
type: unsigned long
|
type: unsigned long
|
||||||
restore_value: no
|
restore_value: no
|
||||||
|
|
@ -231,9 +244,20 @@ binary_sensor:
|
||||||
device_class: motion
|
device_class: motion
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: internal_temperature
|
- platform: template
|
||||||
|
name: "ESP CPU Speed"
|
||||||
|
accuracy_decimals: 0
|
||||||
|
icon: mdi:cpu-32-bit
|
||||||
|
unit_of_measurement: Mhz
|
||||||
|
disabled_by_default: True
|
||||||
|
lambda: |-
|
||||||
|
return (id(cpu_speed));
|
||||||
|
entity_category: "diagnostic"
|
||||||
|
update_interval: 600s
|
||||||
|
- platform: template
|
||||||
id: sys_esp_temperature
|
id: sys_esp_temperature
|
||||||
name: ESP Temperature
|
name: ESP Temperature
|
||||||
|
lambda: return temperatureRead();
|
||||||
unit_of_measurement: °C
|
unit_of_measurement: °C
|
||||||
device_class: TEMPERATURE
|
device_class: TEMPERATURE
|
||||||
update_interval: 45s
|
update_interval: 45s
|
||||||
|
|
@ -278,9 +302,7 @@ sensor:
|
||||||
light:
|
light:
|
||||||
- platform: status_led
|
- platform: status_led
|
||||||
name: sys_status
|
name: sys_status
|
||||||
pin:
|
pin: GPIO13
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
internal: True
|
internal: True
|
||||||
restore_mode: ALWAYS_OFF
|
restore_mode: ALWAYS_OFF
|
||||||
- platform: binary
|
- platform: binary
|
||||||
|
|
@ -298,9 +320,7 @@ i2c:
|
||||||
output:
|
output:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: board_info_ed
|
id: board_info_ed
|
||||||
pin:
|
pin: GPIO12
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: factory_reset
|
- platform: factory_reset
|
||||||
|
|
|
||||||
|
|
@ -1,236 +0,0 @@
|
||||||
esphome:
|
|
||||||
name: screek-human-sensor-l12
|
|
||||||
comment: Screek Human Sensor L12
|
|
||||||
friendly_name: Human Sensor L12
|
|
||||||
name_add_mac_suffix: True
|
|
||||||
platformio_options:
|
|
||||||
board_build.flash_mode: dio
|
|
||||||
project:
|
|
||||||
name: SCREEK.Human Sensor L12
|
|
||||||
version: 25.12.21-B
|
|
||||||
|
|
||||||
logger:
|
|
||||||
# level: VERY_VERBOSE
|
|
||||||
# level: DEBUG
|
|
||||||
|
|
||||||
preferences:
|
|
||||||
flash_write_interval: 5s
|
|
||||||
|
|
||||||
external_components:
|
|
||||||
- source:
|
|
||||||
type: git
|
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_l12
|
|
||||||
ref: main
|
|
||||||
components: [ld2412]
|
|
||||||
|
|
||||||
esp32:
|
|
||||||
board: lolin_c3_mini
|
|
||||||
framework:
|
|
||||||
type: esp-idf
|
|
||||||
globals:
|
|
||||||
- id: last_illuminance
|
|
||||||
type: float
|
|
||||||
restore_value: no
|
|
||||||
initial_value: "-1"
|
|
||||||
|
|
||||||
improv_serial:
|
|
||||||
|
|
||||||
debug:
|
|
||||||
update_interval: 30s
|
|
||||||
|
|
||||||
# Enable Home Assistant API
|
|
||||||
api:
|
|
||||||
# encryption:
|
|
||||||
# use you own password
|
|
||||||
# key: "your-api-key"
|
|
||||||
|
|
||||||
ota:
|
|
||||||
- platform: esphome
|
|
||||||
password: "your-ota-password"
|
|
||||||
|
|
||||||
safe_mode:
|
|
||||||
disabled: true
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
# output_power: 15dB
|
|
||||||
power_save_mode: LIGHT
|
|
||||||
# power_save_mode: NONE
|
|
||||||
reboot_timeout: 10min
|
|
||||||
ap:
|
|
||||||
ssid: "HUMAN-SENSOR L12"
|
|
||||||
|
|
||||||
captive_portal:
|
|
||||||
|
|
||||||
web_server:
|
|
||||||
port: 80
|
|
||||||
|
|
||||||
text_sensor:
|
|
||||||
- platform: template
|
|
||||||
name: "SCREEK Version"
|
|
||||||
id: screek_version
|
|
||||||
icon: mdi:information-outline
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
update_interval: never
|
|
||||||
- platform: debug
|
|
||||||
reset_reason:
|
|
||||||
name: "ESP Reset Reason"
|
|
||||||
icon: mdi:anchor
|
|
||||||
disabled_by_default: True
|
|
||||||
- platform: wifi_info
|
|
||||||
ip_address:
|
|
||||||
name: ESP IP Address
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
disabled_by_default: True
|
|
||||||
icon: mdi:ip-network
|
|
||||||
mac_address:
|
|
||||||
name: ESP MAC
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
icon: mdi:ip-network
|
|
||||||
disabled_by_default: True
|
|
||||||
- platform: ld2412
|
|
||||||
version:
|
|
||||||
name: LD2412 FM Version
|
|
||||||
id: ld2412_fm_version
|
|
||||||
mac_address:
|
|
||||||
name: LD2412 Mac
|
|
||||||
id: ld2412_mac
|
|
||||||
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: status
|
|
||||||
name: Online
|
|
||||||
id: ink_ha_connected
|
|
||||||
- platform: ld2412
|
|
||||||
has_target:
|
|
||||||
name: Presence
|
|
||||||
has_moving_target:
|
|
||||||
name: Moving Target
|
|
||||||
has_still_target:
|
|
||||||
name: Still Target
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: internal_temperature
|
|
||||||
name: "ESP Temperature"
|
|
||||||
unit_of_measurement: °C
|
|
||||||
device_class: TEMPERATURE
|
|
||||||
update_interval: 30s
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
- platform: uptime
|
|
||||||
name: ESP Uptime
|
|
||||||
id: sys_uptime
|
|
||||||
update_interval: 60s
|
|
||||||
- platform: wifi_signal
|
|
||||||
name: RSSI
|
|
||||||
id: wifi_signal_db
|
|
||||||
update_interval: 60s
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
- platform: template
|
|
||||||
id: esp_memory
|
|
||||||
icon: mdi:memory
|
|
||||||
name: ESP Free Memory
|
|
||||||
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
|
|
||||||
unit_of_measurement: 'kB'
|
|
||||||
state_class: measurement
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
update_interval: 60s
|
|
||||||
- platform: ld2412
|
|
||||||
moving_distance:
|
|
||||||
name : Moving Distance
|
|
||||||
id: moving_distance
|
|
||||||
still_distance:
|
|
||||||
name: Still Distance
|
|
||||||
id: still_distance
|
|
||||||
moving_energy:
|
|
||||||
name: Move Energy
|
|
||||||
still_energy:
|
|
||||||
name: Still Energy
|
|
||||||
luminance:
|
|
||||||
name: luminance
|
|
||||||
|
|
||||||
light:
|
|
||||||
- platform: status_led
|
|
||||||
name: sys_status
|
|
||||||
pin:
|
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
internal: True
|
|
||||||
restore_mode: ALWAYS_OFF
|
|
||||||
- platform: binary
|
|
||||||
name: "Red Info Light"
|
|
||||||
output: board_info_ed
|
|
||||||
entity_category: diagnostic
|
|
||||||
restore_mode: ALWAYS_OFF
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: time_now
|
|
||||||
|
|
||||||
output:
|
|
||||||
- platform: gpio
|
|
||||||
id: board_info_ed
|
|
||||||
pin:
|
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: factory_reset
|
|
||||||
name: "L12 Factory Reset"
|
|
||||||
disabled_by_default: True
|
|
||||||
icon: mdi:heart-broken
|
|
||||||
entity_category: diagnostic
|
|
||||||
|
|
||||||
button:
|
|
||||||
- platform: restart
|
|
||||||
icon: mdi:power-cycle
|
|
||||||
name: "ESP Reboot"
|
|
||||||
entity_category: diagnostic
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412 BLE Enable"
|
|
||||||
# disabled_by_default: True
|
|
||||||
entity_category: "config"
|
|
||||||
icon: mdi:bluetooth
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412_radar) -> ble_control(true);
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412 BLE Disable"
|
|
||||||
# disabled_by_default: True
|
|
||||||
entity_category: "config"
|
|
||||||
icon: mdi:bluetooth-off
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412_radar) -> ble_control(false);
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412 Reboot"
|
|
||||||
icon: mdi:radar
|
|
||||||
entity_category: "config"
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412_radar) -> reboot();
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412 Factory Reset"
|
|
||||||
icon: mdi:restart
|
|
||||||
entity_category: "config"
|
|
||||||
on_press:
|
|
||||||
- lambda: |-
|
|
||||||
id(ld2412_radar) -> factoryReset();
|
|
||||||
|
|
||||||
uart:
|
|
||||||
id: uart_bus
|
|
||||||
tx_pin:
|
|
||||||
number: GPIO11
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
rx_pin:
|
|
||||||
number: GPIO7
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
baud_rate: 115200
|
|
||||||
parity: NONE
|
|
||||||
stop_bits: 1
|
|
||||||
data_bits: 8
|
|
||||||
|
|
||||||
ld2412:
|
|
||||||
id: ld2412_radar
|
|
||||||
|
|
@ -30,7 +30,7 @@ external_components:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_l12
|
url: https://github.com/screekworkshop/custom_components_support_for_screek_l12
|
||||||
ref: main
|
ref: main
|
||||||
components: [uart, ld2412]
|
components: [esp32, uart, ld2412]
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: lolin_c3_mini
|
board: lolin_c3_mini
|
||||||
|
|
@ -186,9 +186,7 @@ sensor:
|
||||||
light:
|
light:
|
||||||
- platform: status_led
|
- platform: status_led
|
||||||
name: sys_status
|
name: sys_status
|
||||||
pin:
|
pin: GPIO13
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
internal: True
|
internal: True
|
||||||
restore_mode: ALWAYS_OFF
|
restore_mode: ALWAYS_OFF
|
||||||
- platform: binary
|
- platform: binary
|
||||||
|
|
@ -204,9 +202,7 @@ time:
|
||||||
output:
|
output:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: board_info_ed
|
id: board_info_ed
|
||||||
pin:
|
pin: GPIO12
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: true
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: factory_reset
|
- platform: factory_reset
|
||||||
|
|
|
||||||
|
|
@ -1,292 +0,0 @@
|
||||||
esphome:
|
|
||||||
name: screek-human-sensor-l13
|
|
||||||
comment: Screek Human Sensor L13
|
|
||||||
friendly_name: Human Sensor L13
|
|
||||||
name_add_mac_suffix: True
|
|
||||||
platformio_options:
|
|
||||||
board_build.flash_mode: dio
|
|
||||||
# board_build.f_cpu: 80000000L
|
|
||||||
project:
|
|
||||||
name: Screek.Human_Presence_Sensor
|
|
||||||
version: L13
|
|
||||||
on_boot:
|
|
||||||
- priority: 1000
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
pinMode(2, OUTPUT);
|
|
||||||
digitalWrite(2, LOW);
|
|
||||||
delay(100);
|
|
||||||
- priority: 100
|
|
||||||
then:
|
|
||||||
lambda: |-
|
|
||||||
id(cpu_speed) = ESP.getCpuFreqMHz();
|
|
||||||
|
|
||||||
logger:
|
|
||||||
# level: VERY_VERBOSE
|
|
||||||
# level: DEBUG
|
|
||||||
|
|
||||||
preferences:
|
|
||||||
flash_write_interval: 5s
|
|
||||||
|
|
||||||
external_components:
|
|
||||||
- source:
|
|
||||||
type: git
|
|
||||||
url: https://github.com/screekworkshop/custom_components_support_for_screek_l12
|
|
||||||
ref: main
|
|
||||||
components: [ld2412]
|
|
||||||
|
|
||||||
esp32:
|
|
||||||
board: lolin_c3_mini
|
|
||||||
framework:
|
|
||||||
type: arduino
|
|
||||||
# version: 2.0.9
|
|
||||||
# platform_version: 6.3.0
|
|
||||||
|
|
||||||
globals:
|
|
||||||
- id: cpu_speed
|
|
||||||
type: int
|
|
||||||
restore_value: no
|
|
||||||
initial_value: '0'
|
|
||||||
- id: last_update_ld2450
|
|
||||||
type: unsigned long
|
|
||||||
restore_value: no
|
|
||||||
initial_value: '0'
|
|
||||||
- id: init_zone_publish
|
|
||||||
type: bool
|
|
||||||
restore_value: no
|
|
||||||
initial_value: "false"
|
|
||||||
- id: last_illuminance
|
|
||||||
type: float
|
|
||||||
restore_value: no
|
|
||||||
initial_value: "-1"
|
|
||||||
|
|
||||||
improv_serial:
|
|
||||||
|
|
||||||
debug:
|
|
||||||
update_interval: 30s
|
|
||||||
|
|
||||||
# Enable Home Assistant API
|
|
||||||
api:
|
|
||||||
# encryption:
|
|
||||||
# use you own password
|
|
||||||
# key: "b1b1F1ArnSZmIvk7WLL9oG19gjPTCmBP1irQlSlSDGY="
|
|
||||||
|
|
||||||
ota:
|
|
||||||
- platform: esphome
|
|
||||||
password: "your-ota-password"
|
|
||||||
|
|
||||||
safe_mode:
|
|
||||||
disabled: true
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
# power_save_mode: LIGHT
|
|
||||||
reboot_timeout: 10min
|
|
||||||
ap:
|
|
||||||
ssid: "HUMAN-SENSOR L13"
|
|
||||||
|
|
||||||
captive_portal:
|
|
||||||
|
|
||||||
web_server:
|
|
||||||
port: 80
|
|
||||||
|
|
||||||
text_sensor:
|
|
||||||
- platform: debug
|
|
||||||
reset_reason:
|
|
||||||
name: "ESP Reset Reason"
|
|
||||||
icon: mdi:anchor
|
|
||||||
disabled_by_default: True
|
|
||||||
- platform: wifi_info
|
|
||||||
ip_address:
|
|
||||||
name: ESP IP Address
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
disabled_by_default: True
|
|
||||||
icon: mdi:ip-network
|
|
||||||
mac_address:
|
|
||||||
name: ESP MAC
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
icon: mdi:ip-network
|
|
||||||
disabled_by_default: True
|
|
||||||
- platform: ld2412
|
|
||||||
version:
|
|
||||||
name: LD2412S FM Version
|
|
||||||
id: ld2412_fm_version
|
|
||||||
mac_address:
|
|
||||||
name: LD2412S Mac
|
|
||||||
id: ld2412_mac
|
|
||||||
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: status
|
|
||||||
name: Online
|
|
||||||
id: ink_ha_connected
|
|
||||||
- platform: ld2412
|
|
||||||
has_target:
|
|
||||||
name: Presence
|
|
||||||
has_moving_target:
|
|
||||||
name: Moving Target
|
|
||||||
has_still_target:
|
|
||||||
name: Still Target
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
name: "ESP CPU Speed"
|
|
||||||
accuracy_decimals: 0
|
|
||||||
icon: mdi:cpu-32-bit
|
|
||||||
unit_of_measurement: Mhz
|
|
||||||
disabled_by_default: True
|
|
||||||
lambda: |-
|
|
||||||
return (id(cpu_speed));
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
update_interval: 600s
|
|
||||||
- platform: template
|
|
||||||
id: sys_esp_temperature
|
|
||||||
name: ESP Temperature
|
|
||||||
lambda: return temperatureRead();
|
|
||||||
unit_of_measurement: °C
|
|
||||||
device_class: TEMPERATURE
|
|
||||||
update_interval: 45s
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
- platform: uptime
|
|
||||||
name: ESP Uptime
|
|
||||||
id: sys_uptime
|
|
||||||
update_interval: 60s
|
|
||||||
- platform: wifi_signal
|
|
||||||
name: RSSI
|
|
||||||
id: wifi_signal_db
|
|
||||||
update_interval: 60s
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
- platform: template
|
|
||||||
id: esp_memory
|
|
||||||
icon: mdi:memory
|
|
||||||
name: ESP Free Memory
|
|
||||||
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL) / 1024;
|
|
||||||
unit_of_measurement: 'kB'
|
|
||||||
state_class: measurement
|
|
||||||
entity_category: "diagnostic"
|
|
||||||
update_interval: 60s
|
|
||||||
- platform: ld2412
|
|
||||||
moving_distance:
|
|
||||||
name : Moving Distance
|
|
||||||
id: moving_distance
|
|
||||||
still_distance:
|
|
||||||
name: Still Distance
|
|
||||||
id: still_distance
|
|
||||||
moving_energy:
|
|
||||||
name: Move Energy
|
|
||||||
still_energy:
|
|
||||||
name: Still Energy
|
|
||||||
luminance:
|
|
||||||
name: LD2412S luminance
|
|
||||||
entity_category: diagnostic
|
|
||||||
- platform: bh1750
|
|
||||||
name: "BH1750 Illuminance"
|
|
||||||
address: 0x23
|
|
||||||
update_interval: 1s
|
|
||||||
|
|
||||||
light:
|
|
||||||
- platform: status_led
|
|
||||||
name: sys_status
|
|
||||||
pin:
|
|
||||||
number: GPIO13
|
|
||||||
ignore_pin_validation_error: True
|
|
||||||
internal: True
|
|
||||||
restore_mode: ALWAYS_OFF
|
|
||||||
- platform: binary
|
|
||||||
name: "Red Info Light"
|
|
||||||
output: board_info_ed
|
|
||||||
entity_category: diagnostic
|
|
||||||
restore_mode: ALWAYS_OFF
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: time_now
|
|
||||||
|
|
||||||
output:
|
|
||||||
- platform: gpio
|
|
||||||
id: board_info_ed
|
|
||||||
pin:
|
|
||||||
number: GPIO12
|
|
||||||
ignore_pin_validation_error: True
|
|
||||||
|
|
||||||
esp32_improv:
|
|
||||||
authorizer: none
|
|
||||||
on_start:
|
|
||||||
then:
|
|
||||||
- logger.log: "Improv awaiting authorization/authorized"
|
|
||||||
on_provisioned:
|
|
||||||
then:
|
|
||||||
- logger.log: "Improv provisioned"
|
|
||||||
on_provisioning:
|
|
||||||
then:
|
|
||||||
- logger.log: "Improv provisioning"
|
|
||||||
on_stop:
|
|
||||||
then:
|
|
||||||
- logger.log: "Improv stopped"
|
|
||||||
|
|
||||||
switch:
|
|
||||||
- platform: factory_reset
|
|
||||||
name: "L13 Factory Reset" # 或许最好把雷达模块也重新初始化
|
|
||||||
disabled_by_default: True
|
|
||||||
icon: mdi:heart-broken
|
|
||||||
entity_category: diagnostic
|
|
||||||
|
|
||||||
button:
|
|
||||||
- platform: restart
|
|
||||||
icon: mdi:power-cycle
|
|
||||||
name: "ESP Reboot"
|
|
||||||
entity_category: diagnostic
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412S BLE Enable"
|
|
||||||
# disabled_by_default: True
|
|
||||||
entity_category: "config"
|
|
||||||
icon: mdi:bluetooth
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412s_radar) -> ble_control(true);
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412S BLE Disable"
|
|
||||||
# disabled_by_default: True
|
|
||||||
entity_category: "config"
|
|
||||||
icon: mdi:bluetooth-off
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412s_radar) -> ble_control(false);
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412S Reboot"
|
|
||||||
icon: mdi:radar
|
|
||||||
entity_category: "config"
|
|
||||||
on_press:
|
|
||||||
lambda: |-
|
|
||||||
id(ld2412s_radar) -> reboot();
|
|
||||||
- platform: template
|
|
||||||
name: "LD2412S Factory Reset"
|
|
||||||
icon: mdi:restart
|
|
||||||
entity_category: "config"
|
|
||||||
on_press:
|
|
||||||
- lambda: |-
|
|
||||||
id(ld2412s_radar) -> factoryReset();
|
|
||||||
|
|
||||||
uart:
|
|
||||||
id: uart_bus
|
|
||||||
tx_pin:
|
|
||||||
number: GPIO11
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
rx_pin:
|
|
||||||
number: GPIO7
|
|
||||||
mode:
|
|
||||||
input: true
|
|
||||||
pullup: true
|
|
||||||
baud_rate: 115200
|
|
||||||
parity: NONE
|
|
||||||
stop_bits: 1
|
|
||||||
data_bits: 8
|
|
||||||
|
|
||||||
i2c:
|
|
||||||
sda: 10
|
|
||||||
scl: 3
|
|
||||||
scan: True
|
|
||||||
|
|
||||||
ld2412:
|
|
||||||
id: ld2412s_radar
|
|
||||||
Loading…
Reference in New Issue
Block a user