Shelly1 PLUS mit aktiviertem Bluetooth | ESPHome

Wlan Steckdose mit Tasmota vorgeflasht. Kleinste ESP8266 smart plug. 16A mini wifi steckdosen mit stromverbrauch stromzähler, zeitschaltuhr. MQTT, Domoticz, Home Assistant, Alexa. 4er pack. NOUS A1T
Wlan Steckdose mit Tasmota vorgeflasht. Kleinste ESP8266 smart plug. 16A mini wifi steckdosen mit stromverbrauch stromzähler, zeitschaltuhr. MQTT, Domoticz, Home Assistant, Alexa. 4er pack. NOUS A1T
--

Der ein oder andere kennt ja das Video vom Daniel Scheidler „Raumbasierte Anwesenheitserkennung mit ESPHome (Presence Detection)“.

Für das Bluetooth Tracking habe ich bei einem vorhandenen Shelly1 Plus die notwendigen Zeilen hinzugefügt und erfolgreich getestet.

substitutions:
  device_name: "NAME"
  # Higher value gives lower watt readout
  current_res: "0.001"
  # Lower value gives lower voltage readout
  voltage_div: "1925"

esphome:
  name: shelly-plus-1-kueche
  platformio_options:
    board_build.f_cpu: 160000000L

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"


wifi:
  networks:
    - ssid: "WIFI SSID"
      password: "PW"
  output_power: 20dB
  fast_connect: true
  manual_ip:
   static_ip: 192.168.178.182
   gateway: 192.168.178.1
   subnet: 255.255.255.0
   
  ap:
    ssid: "NAME"
    password: "PW"

logger:

api:

ota:


esp32_ble_tracker:

  scan_parameters:
    interval: 320ms
    window: 250ms
    duration: 10s
    active: false
    

output:
  - platform: gpio
    id: "relay_output"
    pin: GPIO26

switch:
  - platform: output
    id: "relay"
    name: "${device_name} Relay"
    output: "relay_output"
  - platform: restart
    name: "${device_name} Restart"

binary_sensor:
  - platform: gpio
    name: "${device_name} Switch"
    pin: GPIO4
    on_press:
      then:
        - switch.toggle: "relay"
    filters:
      - delayed_on_off: 50ms
  - platform: gpio
    name: "${device_name} Button"
    pin:
      number: GPIO25
      inverted: yes
      mode:
        input: true
        pullup: true
    on_press:
      then:
        - switch.toggle: "relay"
    filters:
      - delayed_on_off: 5ms
      
  - platform: ble_presence
    ibeacon_uuid: 'EIGENE UUID'
    name: "BLE GERÄT"

sensor:
  - platform: ntc
    sensor: temp_resistance_reading
    name: "${device_name} Temperature"
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    icon: "mdi:thermometer"
    calibration:
      b_constant: 3350
      reference_resistance: 10kOhm
      reference_temperature: 298.15K
    on_value_range:
      - above: "80.0"
        then:
          - switch.turn_off: "relay"
  - platform: resistance
    id: temp_resistance_reading
    sensor: temp_analog_reading
    configuration: DOWNSTREAM
    resistor: 6kOhm
  - platform: adc
    id: temp_analog_reading
    pin: GPIO32
    attenuation: 11db

  - platform: adc
    name: "${device_name} Relay Supply Voltage"
    pin: GPIO33
    attenuation: 11db
    filters:
      - multiply: 8
      
  - platform: wifi_signal
    name: "${device_name}"
    update_interval: 60s

status_led:
  pin:
    number: GPIO0
    inverted: true