IO-Broker: Unterschied zwischen den Versionen

Aus
Wechseln zu: Navigation, Suche
(ESP8266)
 
(13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 251: Zeile 251:
  
 
  docker run -p 8181-8199:8081-8099 -p 6162-6163:6052-6053 -p 9200-9201:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu -v iobrokerdata-2:/opt/iobroker buanet/iobroker:latest
 
  docker run -p 8181-8199:8081-8099 -p 6162-6163:6052-6053 -p 9200-9201:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu -v iobrokerdata-2:/opt/iobroker buanet/iobroker:latest
 +
 +
docker run -p 8281-8299:8081-8099 -p 6262-6263:6052-6053 -p 9300-9301:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu-Test -v iobrokerdata-test:/opt/iobroker buanet/iobroker:latest
 +
 +
=== Fujitsu mit fester IP ===
 +
docker run -d --name iobroker-Fujitsu-Test-2 --network=FujitsuFesteIP --ip=192.168.0.8 --cap-add=NET_ADMIN --privileged -v iobrokerdata-test-2:/opt/iobroker buanet/iobroker:latest
 +
  
 
=== IOB Docker auf QNAP ===
 
=== IOB Docker auf QNAP ===
Zeile 273: Zeile 279:
 
  -–hostname iob-qnap
 
  -–hostname iob-qnap
 
  --network qnet-dhcp-bond0-6d6da6
 
  --network qnet-dhcp-bond0-6d6da6
 +
 +
== Maintenance  ==
 +
 +
In Portainer eine Console auf IOBROKER starten
 +
 +
iobroker maintenance on
 +
iob maint on
 +
iob m on
 +
 +
maintenance upgrade
 +
maintenence --help
  
 
== Multihost ==
 
== Multihost ==
Zeile 294: Zeile 311:
 
  IOB_STATESDB_PORT 9000
 
  IOB_STATESDB_PORT 9000
  
== Installation ==
+
=== Installation ===
 
  Wichtig: Die verschiedenenen Hosts müssen unbedingt eindeutige Hostnamen besitzen.
 
  Wichtig: Die verschiedenenen Hosts müssen unbedingt eindeutige Hostnamen besitzen.
 
  Dazu installiert man zuerst auf allen verwendeten hosts ganz normal ioBroker.
 
  Dazu installiert man zuerst auf allen verwendeten hosts ganz normal ioBroker.
Zeile 334: Zeile 351:
 
  Damit ist die Multihost-Verbindung fertig.
 
  Damit ist die Multihost-Verbindung fertig.
  
== client Löschen ==
+
=== client Löschen ===
 
  iobroker list hosts
 
  iobroker list hosts
 
  iobroker stop
 
  iobroker stop
  iobroker host remove <salve>
+
  iobroker host remove <host>
 
  iobroker fix
 
  iobroker fix
 
  iobroker start
 
  iobroker start
Zeile 349: Zeile 366:
 
  IOB_STATESDB_PORT 9000
 
  IOB_STATESDB_PORT 9000
 
  IOB_STATESDB_TYPE jsonl
 
  IOB_STATESDB_TYPE jsonl
 +
 +
Um einen Host in einer IOBroker-Multihost-Umgebung zu löschen, wenn der Master in einem Docker-Container läuft
 +
Schritte zum Löschen eines Slaves in einer Multihost-Umgebung mit Docker-Master:
 +
Docker-Container starten / betreten
 +
Falls Du den Befehl direkt im Container ausführen willst:
 +
 +
docker exec -it iobroker bash
 +
 +
iobroker del <hostname>
  
 
== ESP-Easy ==
 
== ESP-Easy ==
Zeile 429: Zeile 455:
 
     pin: <PIN_RELAY_IS_CONNECTED_TO>
 
     pin: <PIN_RELAY_IS_CONNECTED_TO>
  
=== ESP32 ===
+
 
 +
=== ESP8266 ===
 
esphome:
 
esphome:
   name: esp32-azdev-platine-1
+
   name: esp8266-relais-dht-btn
  
esp32:
+
esp8266:
   board: esp-wrover-kit
+
   board: d1_mini
 
   framework:
 
   framework:
     type: arduino
+
     version: recommended
 
+
       
 +
# Enable logging
 
logger:
 
logger:
   level: VERBOSE
+
   level: verbose
    
+
   logs:
 +
    mqtt.component: DEBUG
 +
    mqtt.client: ERROR
 +
    component: ERROR
 +
 
 +
# Enable Home Assistant API
 
api:
 
api:
  password: !secret api_password
+
  password: "12Tango34#1" #!secret api_password
  
 
ota:
 
ota:
 
   platform: esphome
 
   platform: esphome
   password: "edc3ea425a3dd7c5542260a26fa30973"
+
   password: "987fbfb6485cbc09fbc44a8b870dabcf"
  
 
wifi:
 
wifi:
Zeile 452: Zeile 485:
 
   - ssid: !secret wifi_ssid
 
   - ssid: !secret wifi_ssid
 
   - password: !secret wifi_password
 
   - password: !secret wifi_password
 +
 +
  - ssid: !secret wifi_ssid_2
 +
  - password: !secret wifi_password_2
 +
 
   - ssid: !secret wifi_ssid_3
 
   - ssid: !secret wifi_ssid_3
 
   - password: !secret wifi_password_3
 
   - password: !secret wifi_password_3
   reboot_timeout: 1min
+
 +
   - ssid: !secret wifi_ssid_4
 +
  - password: !secret wifi_password_4
 +
 
 
   power_save_mode: none
 
   power_save_mode: none
# use_address: 192.168.1.235
+
  use_address: 192.168.1.236
 
    
 
    
 
   # Enable fallback hotspot (captive portal) in case wifi connection fails
 
   # Enable fallback hotspot (captive portal) in case wifi connection fails
 
   ap:
 
   ap:
     ssid: "Esp32-Azdev-Platine-1"
+
     ssid: "Esp8266-Relais-Dht-Btn"
     password: "CfaiDVSb9RSA"
+
     password: !secret ap_password
  
captive_portal:
+
web_server:
 
 
time:
 
  - platform: sntp
 
    id: sntp_time
 
    servers:
 
      - 192.168.0.130
 
    timezone: "Europe/Berlin"
 
    on_time_sync:
 
      then:
 
        - logger.log: "Synchronized system clock"
 
 
 
web_server:
 
 
   port: 80
 
   port: 80
 
   version: 2
 
   version: 2
  
mqtt:
+
captive_portal:
  id: mqtt_client
 
  broker: 192.168.1.59
 
  port: 1884
 
  username: !secret mqtt_username
 
  password: !secret mqtt_password
 
  
one_wire:
+
text_sensor:   
  - platform: gpio
+
   - platform: version
    pin: GPIO15
+
     name: "ESPHome Version"
   
+
   - platform: wifi_info
# Example configuration entry for ESP32
 
i2c:
 
  sda: GPIO21
 
  scl: GPIO22
 
  scan: true
 
  id: bus_a
 
 
 
text_sensor:   
 
   - platform: version
 
     name: "ESPHome Version"
 
 
 
   - platform: wifi_info
 
 
     ip_address:
 
     ip_address:
 
       name: ESP IP Address
 
       name: ESP IP Address
      id: esp_ip
 
 
     ssid:
 
     ssid:
 
       name: ESP Connected SSID
 
       name: ESP Connected SSID
Zeile 517: Zeile 527:
 
     name: Uptime Human Readable
 
     name: Uptime Human Readable
 
     id: uptime_human
 
     id: uptime_human
 
+
       
   - platform: mqtt_subscribe
+
sensor:
     name: "TimeStamp"
+
   - platform: uptime
     id: TimeStamp
+
     name: Uptime Sensor
     topic: esp32-azdev-platine-1/Zeilen/TimeStamp  
+
     id: uptime_sensor
    
+
    update_interval: 30s
   - platform: mqtt_subscribe
+
     on_raw_value:
     name: "Zeile_1"
+
      then:
     id: DisplayZeile_1
+
        - text_sensor.template.publish:
     topic: esp32-azdev-platine-1/Zeilen/Zeile-1
+
            id: uptime_human
 +
            state: !lambda |-
 +
              int seconds = round(id(uptime_sensor).raw_state);
 +
              int days = seconds / (24 * 3600);
 +
              seconds = seconds % (24 * 3600);
 +
              int hours = seconds / 3600;
 +
              seconds = seconds % 3600;
 +
              int minutes = seconds 60;
 +
              seconds = seconds % 60;
 +
              return (
 +
                (days ? to_string(days) + "d " : "") +
 +
                (hours ? to_string(hours) + "h " : "") +
 +
                (minutes ? to_string(minutes) + "m " : "") +
 +
                (to_string(seconds) + "s")
 +
              ).c_str();
 +
    
 +
   - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
 +
     name: "WiFi Signal dB"
 +
     id: wifi_signal_db
 +
    update_interval: 60s
 +
     entity_category: "diagnostic"
  
   - platform: mqtt_subscribe
+
   - platform: copy # Reports the WiFi signal strength in %
     name: "Zeile_2"
+
    source_id: wifi_signal_db
     id: DisplayZeile_2
+
     name: "WiFi Signal Percent"
     topic: esp32-azdev-platine-1/Zeilen/Zeile-2
+
    filters:
 +
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
 +
    unit_of_measurement: "Signal %"
 +
     entity_category: "diagnostic"
 +
     device_class: ""
  
   - platform: mqtt_subscribe
+
   - platform: dht
     name: "Zeile_3"
+
     pin: D4
     id: DisplayZeile_3
+
    temperature:
     topic: esp32-azdev-platine-1/Zeilen/Zeile-3
+
      name: "DHT Temperature"
 +
    humidity:
 +
      name: "DHT Humidity"
 +
     update_interval: 60s
 +
     model: DHT22
  
   - platform: mqtt_subscribe
+
switch:
     name: "Zeile_4"
+
   - platform: gpio
     id: DisplayZeile_4
+
     name: "Relay"
     topic: esp32-azdev-platine-1/Zeilen/Zeile-4
+
     pin: D1
 +
     id: RELAY1
  
   - platform: mqtt_subscribe
+
   - platform: restart
     name: "Zeile_5"
+
     name: "Reboot"
    id: DisplayZeile_5
 
    topic: esp32-azdev-platine-1/Zeilen/Zeile-5
 
 
 
  - platform: mqtt_subscribe
 
    name: "Zeile_6"
 
    id: DisplayZeile_6
 
    topic: esp32-azdev-platine-1/Zeilen/Zeile-6
 
  
   - platform: mqtt_subscribe
+
binary_sensor:
     name: "Zeile_7"
+
   - platform: gpio
     id: DisplayZeile_7
+
     name: "Pin D3"
     topic: esp32-azdev-platine-1/Zeilen/Zeile-7
+
    pin: D3
 
+
     id: PIND3
sensor:
+
     filters:
   - platform: uptime
+
      - invert:
     name: Uptime Sensor
+
      - delayed_on: 100ms
     id: uptime_sensor
+
      - delayed_off: 100ms     
     update_interval: 30s
+
           
     on_raw_value:
+
light:
      then:
+
   - platform: neopixelbus
        - text_sensor.template.publish:
+
     type: RGB
            id: uptime_human
+
     variant: WS2812x
            state: !lambda |-
+
     pin: D2
              int seconds = round(id(uptime_sensor).raw_state);
+
     num_leds: 1
              int days = seconds / (24 * 3600);
+
    name: "NeoPixel Light"
              seconds = seconds % (24 * 3600);
+
 
              int hours = seconds / 3600;
+
=== ESP8266-01s ===
              seconds = seconds % 3600;
+
esphome:
              int minutes = seconds /  60;
+
  name: esp8266-01s-001
              seconds = seconds % 60;
+
  friendly_name: esp8266-01s-001
              return (
 
                (days ? to_string(days) + "d " : "") +
 
                (hours ? to_string(hours) + "h " : "") +
 
                (minutes ? to_string(minutes) + "m " : "") +
 
                (to_string(seconds) + "s")
 
              ).c_str();
 
  
  - platform: sht3xd
+
esp8266:
    temperature:
+
  board: esp01_1m
      name: "SHT3X Temperature"
 
    humidity:
 
      name: "SHT3X Humidity"
 
    address: 0x44
 
    update_interval: 60s
 
  
  - platform: dht
+
# Enable logging
    pin: GPIO2
+
logger:
    temperature:
+
  level: VERBOSE
      name: "DHT Temperature"
+
 
    humidity:
+
# Enable Home Assistant API
      name: "DHT Humidity"
+
api:
    update_interval: 60s
+
  password: !secret api_password
    model: DHT22
 
  
   - platform: bmp280
+
ota:
    temperature:
+
   platform: esphome
      name: BMP280 Temp"
+
  password: "8024a63c6540bdae0a80f647c7814847"
      oversampling: 16x
 
    pressure:
 
      name: "BMP280 Pressure"
 
    address: 0x76
 
    update_interval: 60s
 
  
  - platform: bmp085
+
wifi:
    temperature:
+
  ssid: !secret wifi_ssid
      name: "BMP085 Temperature"
+
   password: !secret wifi_password
    pressure:
 
      name: "BMP085  Pressure"
 
    update_interval: 60s
 
   
 
   - platform: dallas_temp
 
    address: 0xfd3ce1d444623328
 
    name: "Dallas Sensor 1"
 
  
   - platform: adc
+
   # Enable fallback hotspot (captive portal) in case wifi connection fails
    pin: GPIO34
+
  ap:
     name: "MQ135 ADC"
+
     ssid: "Esp8266-01S-001 Fallback Hotspot"
     update_interval: 30s
+
     password: "eFcsqiNMK7VE"
    unit_of_measurement: ppm
 
    filters:   
 
      - lambda: |-
 
          return 135.2167 * pow((x / 0.0000015534) / 37835, -2.752747);
 
  
  - platform: rotary_encoder
+
web_server:
    name: "Rotary Encoder"
+
  port: 80
    pin_a: GPIO25
+
  version: 2
    pin_b: GPIO26
 
    id: Rotary
 
  
display:
+
captive_portal:
  - platform: ssd1306_i2c
 
    model: "SSD1306 128x64"
 
    address: 0x3C
 
    rotation: 0
 
    lambda: |-
 
     
 
      //Kopfzeile
 
      //it.print(0, 0, id(my_font_12), id(my_white), TextAlign::TOP_CENTER, "ESPHome Display V1");
 
      it.print(1, 0, id(my_font_12), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_1).state.c_str());
 
     
 
      //Zeilen
 
      it.print(2, 11, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_2).state.c_str());
 
      it.print(2, 19, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_3).state.c_str());
 
      it.print(2, 27, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_4).state.c_str());
 
      it.print(2, 35, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_5).state.c_str());
 
      it.print(2, 43, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_6).state.c_str());     
 
      //it.print(2, 53, id(my_font_8), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_7).state.c_str());     
 
  
       // Rahmen
+
text_sensor: 
       it.line(0, 0, 127, 0);
+
  - platform: version
       it.line(0, 12, 127, 12);
+
    name: "ESPHome Version"
       it.line(0, 12, 0, 63);
+
  - platform: wifi_info
       it.line(0, 0, 0, 12);                 
+
    ip_address:
      it.line(0, 63, 127, 63);
+
       name: ESP IP Address
      it.line(127, 12, 127, 63);
+
    ssid:
      it.line(127, 0, 127, 12);
+
       name: ESP Connected SSID
 +
    bssid:
 +
       name: ESP Connected BSSID
 +
    mac_address:
 +
       name: ESP Mac Wifi Address
 +
    scan_results:
 +
       name: ESP Latest Scan Results
 +
  - platform: template
 +
    name: Uptime Human Readable
 +
    id: uptime_human
  
      // Fusszeile
+
switch: 
      it.print(2, 52, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
+
  - platform: gpio
      it.print(120, 52, id(my_font_10), id(my_white), TextAlign::TOP_RIGHT, id(TimeStamp).state.c_str());
+
    name: "Pin GPIO2"
 +
    pin: GPIO2
 +
    id: PinGPIO2LED
  
switch:
+
   - platform: restart
   - platform: gpio
+
     name: "Reboot"
     name: "Relay"
 
    pin: GPIO13
 
    id: RELAY
 
  
  - platform: gpio
+
=== ESP32-AZDevTouch ===
    name: "Ampel-Rot"
+
esphome:
    pin: GPIO0
+
  name: "esp32-azdev-touch-4"
    id: AmpelRot
 
  
  - platform: gpio
+
esp32:
    name: "Ampel-Gruen"
+
  board: esp-wrover-kit
    pin: GPIO14
+
  framework:
     id: AmpelGruen
+
     type: arduino
  
  - platform: gpio
+
logger:
    name: "Ampel-Gelb"
+
   level: verbose
    pin: GPIO12
+
   logs:
    id: AmpelGelb
+
     mqtt.component: DEBUG
 
+
     mqtt.client: ERROR
   - platform: restart
+
     component: ERROR
    name: "Reboot"
+
api:
 
+
  password: !secret api_password
binary_sensor:
 
   - platform: gpio
 
    name: "Pin GPIO16"
 
     pin: GPIO16
 
     id: GPIO16
 
     filters:    
 
      - delayed_on: 100ms
 
      - delayed_off: 100ms     
 
  
   - platform: gpio
+
ota:
    name: "Rotary SW"
+
   platform: esphome
    pin: GPIO27
+
  password: "987f1bcf6d2205ac582a6f222ccb2aa4"
    id: Rotarysw
 
    filters:
 
      - invert:
 
      - delayed_on: 100ms
 
      - delayed_off: 100ms     
 
  
font:
+
wifi:
   - file: "/opt/iobroker/node_modules/iobroker.vis-material-webfont/widgets/material-webfont/fonts/materialdesignicons-webfont.ttf"
+
  networks:
     id: test
+
   - ssid: !secret wifi_ssid
     size: 10
+
  - password: !secret wifi_password
 +
  - ssid: !secret wifi_ssid_3
 +
  - password: !secret wifi_password_3
 +
  power_save_mode: none
 +
  use_address: 192.168.1.161
 +
  # Enable fallback hotspot (captive portal) in case wifi connection fails
 +
  ap:
 +
     ssid: "Esp32-Azdev-Touch-4"
 +
     password: "j9mSSo97Zdao"
  
   - file: "/opt/iobroker/iobroker-data/esphome.1/fonts/arial.ttf"   
+
time:
     id: my_font_10
+
   - platform: sntp
     size: 10
+
     id: sntp_time
 
+
     servers:
  - file: "fonts/arial.ttf"
+
      - 192.168.0.130
     id: my_font_8
+
    timezone: "Europe/Berlin"
    size: 8   
+
     on_time_sync:
 
+
      then:
  - file: "fonts/arial.ttf"
+
        - logger.log: "Synchronized system clock"
    id: my_font_12
+
 
    size: 12
+
web_server:
    
+
  port: 80
   - file: "fonts/arial.ttf"
+
   version: 2
    id: my_font_14
+
   js_include: "v2/www.js"
    size: 14
+
  js_url: ""
  
color:
+
captive_portal:
  - id: my_red
 
    red: 100%
 
    green: 0%
 
    blue: 0%
 
  - id: my_green
 
    red: 0%
 
    green: 100%
 
    blue: 0%
 
  - id: my_blue
 
    red: 0%
 
    green: 0%
 
    blue: 100%
 
  - id: my_yellow
 
    red: 100%
 
    green: 100%
 
    blue: 0%
 
  - id: my_white
 
    red: 100%
 
    green: 100%
 
    blue: 100%   
 
  - id: mygrey 
 
    red: 80%
 
    green: 80%
 
    blue: 80%
 
  
=== ESP8266 ===
+
mqtt:
esphome:
+
  id: mqtt_client
   name: esp8266-relais-dht-btn
+
  broker: 192.168.1.59
 +
  port: 1883
 +
  username: !secret mqtt_username
 +
   password: !secret mqtt_password
  
esp8266:
+
   birth_message:
   board: d1_mini
+
    topic: esp32-azdev-touch-new/Status
  framework:
+
     payload: online
     version: recommended
+
   will_message:
       
+
     topic: esp32-azdev-touch-new/Status
# Enable logging
+
     payload: offline
logger:
 
  level: verbose
 
   logs:
 
    mqtt.component: DEBUG
 
     mqtt.client: ERROR
 
     component: ERROR
 
  
# Enable Home Assistant API
+
spi:
api:
+
clk_pin: 18
  password: "12Tango34#1" #!secret api_password
+
mosi_pin: 23
 
+
miso_pin: 19
ota:
+
   
   platform: esphome
+
display:
  password: "987fbfb6485cbc09fbc44a8b870dabcf"
+
   - platform: ili9xxx
 
+
    model: TFT 2.4
wifi:
+
    cs_pin: 5
  networks:
+
    dc_pin: 4
  - ssid: !secret wifi_ssid
+
    reset_pin: 22
  - password: !secret wifi_password
+
    rotation: 180
+
    id: tft_ha
  - ssid: !secret wifi_ssid_2
+
    update_interval: 10s     
  - password: !secret wifi_password_2
+
    lambda: |-
+
      it.fill(COLOR_BLACK);
  - ssid: !secret wifi_ssid_3
+
      it.print(0, 0, id(my_font_20), id(my_red), TextAlign::TOP_LEFT,  "ESPHome Display 4 V 1.9");   
  - password: !secret wifi_password_3
+
           
+
      //Zeilen
  - ssid: !secret wifi_ssid_4
+
      it.print(5, 25, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z1).state.c_str());
  - password: !secret wifi_password_4
+
      it.print(5, 44, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z2).state.c_str());
 +
      it.print(5, 63, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z3).state.c_str());
 +
      it.print(5, 82, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z4).state.c_str());
 +
      it.print(5, 101, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z5).state.c_str());
 +
      it.print(5, 120, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z6).state.c_str());
 +
      it.print(5, 139, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z7).state.c_str());
 +
      it.print(5, 158, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z8).state.c_str());
 +
      it.print(5, 177, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z9).state.c_str());
 +
      it.print(5, 196, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z10).state.c_str());
 +
      it.print(5, 215, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z11).state.c_str());
 +
      it.print(5, 234, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z12).state.c_str());
 +
      it.print(5, 253, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z13).state.c_str());
 +
      it.print(5, 272, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z14).state.c_str());
  
  power_save_mode: none
+
      // Fusszeile
  use_address: 192.168.1.236
+
      it.print(0, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
 
+
      it.print(110, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(TimeStamp).state.c_str());
  # Enable fallback hotspot (captive portal) in case wifi connection fails
+
     
  ap:
+
      // Rahmen
    ssid: "Esp8266-Relais-Dht-Btn"
+
      it.line(0, 23, 239, 23);
    password: !secret ap_password
+
      it.line(0, 297, 239, 297);           
 +
      it.line(0, 23, 0, 297);
 +
      it.line(239, 23, 239, 297);
 +
     
 +
      //if (id(touchscreen).touched)
 +
        //it.filled_circle(id(touchscreen).x-2, id(touchscreen).y-2, 10, my_red);
  
web_server:
+
color:
   port: 80
+
   - id: my_red
  version: 2
+
    red: 100%
 
+
    green: 0%
captive_portal:
+
    blue: 0%
 
+
  - id: my_green
text_sensor:  
+
    red: 0%
  - platform: version
+
    green: 100%
     name: "ESPHome Version"
+
     blue: 0%
   - platform: wifi_info
+
   - id: my_blue
     ip_address:
+
     red: 0%
      name: ESP IP Address
+
    green: 0%
     ssid:
+
     blue: 100%
      name: ESP Connected SSID
+
  - id: my_yellow
     bssid:
+
     red: 100%
      name: ESP Connected BSSID
+
    green: 100%
     mac_address:
+
     blue: 0%
      name: ESP Mac Wifi Address
+
  - id: my_white
     scan_results:
+
     red: 100%
      name: ESP Latest Scan Results
+
    green: 100%
 
+
    blue: 100%   
   - platform: template
+
   - id: mygrey 
     name: Uptime Human Readable
+
    red: 80%
     id: uptime_human
+
     green: 80%
       
+
     blue: 80% 
sensor:
+
   
   - platform: uptime
+
font:
     name: Uptime Sensor
+
   - file: "fonts/arial.ttf"
     id: uptime_sensor
+
     id: my_font_10
    update_interval: 30s
+
     size: 10
     on_raw_value:
+
  - file: "fonts/arial.ttf"
      then:
+
     id: my_font_12
        - text_sensor.template.publish:
+
    size: 12
            id: uptime_human
+
  - file: "fonts/arial.ttf"
            state: !lambda |-
+
    id: my_font_14
              int seconds = round(id(uptime_sensor).raw_state);
+
    size: 14
              int days = seconds / (24 * 3600);
+
  - file: "fonts/arial.ttf"
              seconds = seconds % (24 * 3600);
+
    id: my_font_16
              int hours = seconds / 3600;
+
    size: 16   
              seconds = seconds % 3600;
+
  - file: "fonts/arial.ttf"
              int minutes = seconds / 60;
+
    id: my_font_18
              seconds = seconds % 60;
+
    size: 18
              return (
+
  - file: "fonts/arial.ttf"
                (days ? to_string(days) + "d " : "") +
+
    id: my_font_20
                (hours ? to_string(hours) + "h " : "") +
+
    size: 20
                (minutes ? to_string(minutes) + "m " : "") +
+
  - file: "fonts/arial.ttf"
                (to_string(seconds) + "s")
+
    id: my_font_22
              ).c_str();
+
    size: 22
 
+
 
   - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
+
output:
     name: "WiFi Signal dB"
+
   - platform: ledc
     id: wifi_signal_db
+
     pin: 15
     update_interval: 60s
+
     id: gpio_32_backlight_pwm
    entity_category: "diagnostic"
+
     inverted: true
  
  - platform: copy # Reports the WiFi signal strength in %
+
# Define a monochromatic, dimmable light for the backlight
    source_id: wifi_signal_db
+
light:
    name: "WiFi Signal Percent"
+
  - platform: monochromatic
     filters:
+
     output: gpio_32_backlight_pwm
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
+
     name: "ILI9341 Display Backlight"
     unit_of_measurement: "Signal %"
+
     id: back_light
     entity_category: "diagnostic"
+
     restore_mode: ALWAYS_ON
     device_class: ""
 
  
   - platform: dht
+
sensor:
     pin: D4
+
   - platform: wifi_signal
     temperature:
+
    name: "WiFi Signal Sensor"
       name: "DHT Temperature"
+
     update_interval: 10s
    humidity:
+
     on_raw_value:
      name: "DHT Humidity"
+
       then:
    update_interval: 60s
+
        - text_sensor.template.publish:
    model: DHT22
+
            id: uptime_human
 
+
            state: !lambda |-
switch:
+
              int seconds = round(id(uptime_sensor).raw_state);
   - platform: gpio
+
              int days = seconds / (24 * 3600);
     name: "Relay"
+
              seconds = seconds % (24 * 3600);
     pin: D1
+
              int hours = seconds / 3600;
     id: RELAY1
+
              seconds = seconds % 3600;
 +
              int minutes = seconds /  60;
 +
              seconds = seconds % 60;
 +
              return (
 +
                (days ? to_string(days) + "d " : "") +
 +
                (hours ? to_string(hours) + "h " : "") +
 +
                (minutes ? to_string(minutes) + "m " : "") +
 +
                (to_string(seconds) + "s")
 +
              ).c_str();
 +
             
 +
   - platform: uptime
 +
     name: Uptime   
 +
     id: uptime_sensor
 +
     update_interval: 30s
  
   - platform: restart
+
text_sensor:
     name: "Reboot"
+
   - platform: wifi_info
 +
    ip_address:
 +
      name: ESP IP Address
 +
      id: esp_ip
 +
    ssid:
 +
      name: ESP Connected SSID
 +
    bssid:
 +
      name: ESP Connected BSSID
 +
     mac_address:
 +
      name: ESP Mac Wifi Address
 +
    scan_results:
 +
      name: ESP Latest Scan Results
  
binary_sensor:
+
   - platform: template
   - platform: gpio
+
     name: Uptime Human Readable
     name: "Pin D3"
+
     id: uptime_human   
    pin: D3
 
     id: PIND3
 
    filters:
 
      - invert:
 
      - delayed_on: 100ms
 
      - delayed_off: 100ms     
 
           
 
light:
 
  - platform: neopixelbus
 
    type: RGB
 
    variant: WS2812x
 
    pin: D2
 
    num_leds: 1
 
    name: "NeoPixel Light"
 
  
=== ESP8266-01s ===
+
  - platform: mqtt_subscribe
esphome:
+
    name: "TimeStamp"
  name: esp8266-01s-001
+
    id: TimeStamp
  friendly_name: esp8266-01s-001
+
    topic: esp32-azdev-touch-new/TimeStamp
  
esp8266:
+
  - platform: mqtt_subscribe
   board: esp01_1m
+
    name: "Z1"
 +
    id: Z1
 +
    topic: esp32-azdev-touch-new/Z1
 +
    
 +
  - platform: mqtt_subscribe
 +
    name: "Z2"
 +
    id: Z2
 +
    topic: esp32-azdev-touch-new/Z2
  
# Enable logging
+
  - platform: mqtt_subscribe
logger:
+
    name: "Z3"
  level: VERBOSE
+
    id: Z3
 +
    topic: esp32-azdev-touch-new/Z3
  
# Enable Home Assistant API
+
  - platform: mqtt_subscribe
api:
+
    name: "Z4"
  password: !secret api_password
+
    id: Z4
 +
    topic: esp32-azdev-touch-new/Z4
  
ota:
+
  - platform: mqtt_subscribe
   platform: esphome
+
    name: "Z5"
  password: "8024a63c6540bdae0a80f647c7814847"
+
    id: Z5
 +
    topic: esp32-azdev-touch-new/Z5
 +
 
 +
   - platform: mqtt_subscribe
 +
    name: "Z6"
 +
    id: Z6
 +
    topic: esp32-azdev-touch-new/Z6
  
wifi:
+
  - platform: mqtt_subscribe
  ssid: !secret wifi_ssid
+
    name: "Z7"
  password: !secret wifi_password
+
    id: Z7
 +
    topic: esp32-azdev-touch-new/Z7
  
   # Enable fallback hotspot (captive portal) in case wifi connection fails
+
   - platform: mqtt_subscribe
  ap:
+
     name: "Z8"
     ssid: "Esp8266-01S-001 Fallback Hotspot"
+
     id: Z8
     password: "eFcsqiNMK7VE"
+
    topic: esp32-azdev-touch-new/Z8
  
web_server:
+
  - platform: mqtt_subscribe
  port: 80
+
    name: "Z9"
  version: 2
+
    id: Z9
 +
    topic: esp32-azdev-touch-new/Z9
  
captive_portal:
+
  - platform: mqtt_subscribe
 
+
    name: "Z10"
text_sensor:   
+
    id: Z10
   - platform: version
+
    topic: esp32-azdev-touch-new/Z10
     name: "ESPHome Version"
+
    
   - platform: wifi_info
+
   - platform: mqtt_subscribe
     ip_address:
+
     name: "Z11"
      name: ESP IP Address
+
    id: Z11
     ssid:
+
    topic: esp32-azdev-touch-new/Z11
      name: ESP Connected SSID
+
 
     bssid:
+
   - platform: mqtt_subscribe
      name: ESP Connected BSSID
+
     name: "Z12"
     mac_address:
+
    id: Z12
      name: ESP Mac Wifi Address
+
     topic: esp32-azdev-touch-new/Z12
     scan_results:
+
 
      name: ESP Latest Scan Results
+
  - platform: mqtt_subscribe
   - platform: template
+
     name: "Z13"
     name: Uptime Human Readable
+
     id: Z13
     id: uptime_human
+
     topic: esp32-azdev-touch-new/Z13
 +
 
 +
   - platform: mqtt_subscribe
 +
     name: "Z14"
 +
     id: Z14
 +
    topic: esp32-azdev-touch-new/Z14
  
switch:  
+
switch:
   - platform: gpio
+
   - platform: restart
     name: "Pin GPIO2"
+
     name: "Display Restart"
    pin: GPIO2
 
    id: PinGPIO2LED
 
  
  - platform: restart
+
=== ESP32 ===
    name: "Reboot"
 
 
 
=== ESP32-AZDevTouch ===
 
 
esphome:
 
esphome:
   name: "esp32-azdev-touch-4"
+
   name: esp32-azdev-platine-1
  
 
esp32:
 
esp32:
Zeile 974: Zeile 977:
  
 
logger:
 
logger:
   level: verbose
+
   level: VERBOSE
   logs:
+
    
    mqtt.component: DEBUG
 
    mqtt.client: ERROR
 
    component: ERROR
 
 
api:
 
api:
 
   password: !secret api_password
 
   password: !secret api_password
Zeile 984: Zeile 984:
 
ota:
 
ota:
 
   platform: esphome
 
   platform: esphome
   password: "987f1bcf6d2205ac582a6f222ccb2aa4"
+
   password: "edc3ea425a3dd7c5542260a26fa30973"
  
 
wifi:
 
wifi:
Zeile 992: Zeile 992:
 
   - ssid: !secret wifi_ssid_3
 
   - ssid: !secret wifi_ssid_3
 
   - password: !secret wifi_password_3
 
   - password: !secret wifi_password_3
 +
  reboot_timeout: 1min
 
   power_save_mode: none
 
   power_save_mode: none
  use_address: 192.168.1.161
+
# use_address: 192.168.1.235
 +
 
 
   # Enable fallback hotspot (captive portal) in case wifi connection fails
 
   # Enable fallback hotspot (captive portal) in case wifi connection fails
 
   ap:
 
   ap:
     ssid: "Esp32-Azdev-Touch-4"
+
     ssid: "Esp32-Azdev-Platine-1"
     password: "j9mSSo97Zdao"
+
     password: "CfaiDVSb9RSA"
 +
 
 +
captive_portal:
  
 
time:
 
time:
Zeile 1.012: Zeile 1.016:
 
   port: 80
 
   port: 80
 
   version: 2
 
   version: 2
  js_include: "v2/www.js"
 
  js_url: ""
 
 
captive_portal:
 
  
 
mqtt:
 
mqtt:
 
   id: mqtt_client
 
   id: mqtt_client
 
   broker: 192.168.1.59
 
   broker: 192.168.1.59
   port: 1883
+
   port: 1884
 
   username: !secret mqtt_username
 
   username: !secret mqtt_username
 
   password: !secret mqtt_password
 
   password: !secret mqtt_password
  
  birth_message:
+
one_wire:
    topic: esp32-azdev-touch-new/Status
+
  - platform: gpio
    payload: online
+
     pin: GPIO15
  will_message:
 
    topic: esp32-azdev-touch-new/Status
 
     payload: offline
 
 
 
spi:
 
clk_pin: 18
 
mosi_pin: 23
 
miso_pin: 19
 
 
      
 
      
display:
+
# Example configuration entry for ESP32
   - platform: ili9xxx
+
i2c:
    model: TFT 2.4
+
   sda: GPIO21
    cs_pin: 5
+
  scl: GPIO22
    dc_pin: 4
+
  scan: true
    reset_pin: 22
+
  id: bus_a
    rotation: 180
+
 
    id: tft_ha
+
text_sensor:  
     update_interval: 10s     
+
  - platform: version
    lambda: |-
+
     name: "ESPHome Version"
      it.fill(COLOR_BLACK);
+
 
      it.print(0, 0, id(my_font_20), id(my_red), TextAlign::TOP_LEFT,  "ESPHome Display 4 V 1.9");   
+
  - platform: wifi_info
           
+
    ip_address:
      //Zeilen
+
       name: ESP IP Address
      it.print(5, 25, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z1).state.c_str());
+
       id: esp_ip
       it.print(5, 44, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z2).state.c_str());
+
    ssid:
       it.print(5, 63, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z3).state.c_str());
+
       name: ESP Connected SSID
       it.print(5, 82, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z4).state.c_str());
+
    bssid:
       it.print(5, 101, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z5).state.c_str());
+
       name: ESP Connected BSSID
       it.print(5, 120, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z6).state.c_str());
+
    mac_address:
       it.print(5, 139, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z7).state.c_str());
+
       name: ESP Mac Wifi Address
      it.print(5, 158, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z8).state.c_str());
+
    scan_results:
      it.print(5, 177, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z9).state.c_str());
+
       name: ESP Latest Scan Results
      it.print(5, 196, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z10).state.c_str());
+
 
      it.print(5, 215, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z11).state.c_str());
+
  - platform: template
      it.print(5, 234, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z12).state.c_str());
+
    name: Uptime Human Readable
      it.print(5, 253, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z13).state.c_str());
+
    id: uptime_human
      it.print(5, 272, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z14).state.c_str());
+
 
 +
  - platform: mqtt_subscribe
 +
    name: "TimeStamp"
 +
    id: TimeStamp
 +
    topic: esp32-azdev-platine-1/Zeilen/TimeStamp 
 +
 
 +
  - platform: mqtt_subscribe
 +
    name: "Zeile_1"
 +
    id: DisplayZeile_1
 +
    topic: esp32-azdev-platine-1/Zeilen/Zeile-1
  
      // Fusszeile
+
  - platform: mqtt_subscribe
      it.print(0, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
+
    name: "Zeile_2"
      it.print(110, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(TimeStamp).state.c_str());
+
    id: DisplayZeile_2
     
+
    topic: esp32-azdev-platine-1/Zeilen/Zeile-2
      // Rahmen
 
      it.line(0, 23, 239, 23);
 
      it.line(0, 297, 239, 297);           
 
      it.line(0, 23, 0, 297);
 
      it.line(239, 23, 239, 297);
 
     
 
      //if (id(touchscreen).touched)
 
        //it.filled_circle(id(touchscreen).x-2, id(touchscreen).y-2, 10, my_red);
 
  
color: 
+
   - platform: mqtt_subscribe
   - id: my_red
+
     name: "Zeile_3"
     red: 100%
+
     id: DisplayZeile_3
     green: 0%
+
     topic: esp32-azdev-platine-1/Zeilen/Zeile-3
     blue: 0%
+
 
   - id: my_green
+
   - platform: mqtt_subscribe
     red: 0%
+
     name: "Zeile_4"
     green: 100%
+
     id: DisplayZeile_4
     blue: 0%
+
     topic: esp32-azdev-platine-1/Zeilen/Zeile-4
   - id: my_blue
+
 
     red: 0%
+
   - platform: mqtt_subscribe
     green: 0%
+
     name: "Zeile_5"
     blue: 100%
+
     id: DisplayZeile_5
   - id: my_yellow
+
     topic: esp32-azdev-platine-1/Zeilen/Zeile-5
     red: 100%
+
 
     green: 100%
+
   - platform: mqtt_subscribe
     blue: 0%
+
     name: "Zeile_6"
   - id: my_white
+
     id: DisplayZeile_6
     red: 100%
+
     topic: esp32-azdev-platine-1/Zeilen/Zeile-6
     green: 100%
+
 
     blue: 100%   
+
   - platform: mqtt_subscribe
   - id: mygrey 
+
     name: "Zeile_7"
     red: 80%
+
     id: DisplayZeile_7
     green: 80%
+
     topic: esp32-azdev-platine-1/Zeilen/Zeile-7
     blue: 80% 
+
 
      
+
sensor:
font:
+
   - platform: uptime
  - file: "fonts/arial.ttf"
+
     name: Uptime Sensor
    id: my_font_10
+
     id: uptime_sensor
    size: 10
+
     update_interval: 30s
  - file: "fonts/arial.ttf"
+
     on_raw_value:
    id: my_font_12
+
      then:
    size: 12
+
        - text_sensor.template.publish:
  - file: "fonts/arial.ttf"
+
            id: uptime_human
    id: my_font_14
+
            state: !lambda |-
    size: 14
+
              int seconds = round(id(uptime_sensor).raw_state);
  - file: "fonts/arial.ttf"
+
              int days = seconds / (24 * 3600);
    id: my_font_16
+
              seconds = seconds % (24 * 3600);
    size: 16   
+
              int hours = seconds / 3600;
  - file: "fonts/arial.ttf"
+
              seconds = seconds % 3600;
    id: my_font_18
+
              int minutes = seconds / 60;
    size: 18
+
              seconds = seconds % 60;
  - file: "fonts/arial.ttf"
+
              return (
    id: my_font_20
+
                (days ? to_string(days) + "d " : "") +
    size: 20
+
                (hours ? to_string(hours) + "h " : "") +
  - file: "fonts/arial.ttf"
+
                (minutes ? to_string(minutes) + "m " : "") +
    id: my_font_22
+
                (to_string(seconds) + "s")
    size: 22
+
              ).c_str();
  
output:
+
   - platform: sht3xd
   - platform: ledc
+
     temperature:
     pin: 15
+
      name: "SHT3X Temperature"
     id: gpio_32_backlight_pwm
+
    humidity:
     inverted: true
+
      name: "SHT3X Humidity"
 +
     address: 0x44
 +
     update_interval: 60s
  
# Define a monochromatic, dimmable light for the backlight
+
  - platform: dht
light:
+
    pin: GPIO2
   - platform: monochromatic
+
    temperature:
     output: gpio_32_backlight_pwm
+
      name: "DHT Temperature"
     name: "ILI9341 Display Backlight"
+
    humidity:
     id: back_light
+
      name: "DHT Humidity"
     restore_mode: ALWAYS_ON
+
    update_interval: 60s
 +
    model: DHT22
 +
 
 +
   - platform: bmp280
 +
     temperature:
 +
      name: BMP280 Temp"
 +
      oversampling: 16x
 +
     pressure:
 +
      name: "BMP280 Pressure"
 +
     address: 0x76
 +
     update_interval: 60s
  
sensor:
+
   - platform: bmp085
   - platform: wifi_signal
+
     temperature:
     name: "WiFi Signal Sensor"
+
      name: "BMP085 Temperature"
     update_interval: 10s
+
     pressure:
    on_raw_value:
+
       name: "BMP085  Pressure"
       then:
+
    update_interval: 60s
        - text_sensor.template.publish:
+
   
            id: uptime_human
+
  - platform: dallas_temp
            state: !lambda |-
+
    address: 0xfd3ce1d444623328
              int seconds = round(id(uptime_sensor).raw_state);
+
    name: "Dallas Sensor 1"
              int days = seconds / (24 * 3600);
+
 
              seconds = seconds % (24 * 3600);
+
   - platform: adc
              int hours = seconds / 3600;
+
     pin: GPIO34
              seconds = seconds % 3600;
+
     name: "MQ135 ADC"
              int minutes = seconds /  60;
 
              seconds = seconds % 60;
 
              return (
 
                (days ? to_string(days) + "d " : "") +
 
                (hours ? to_string(hours) + "h " : "") +
 
                (minutes ? to_string(minutes) + "m " : "") +
 
                (to_string(seconds) + "s")
 
              ).c_str();
 
             
 
   - platform: uptime
 
     name: Uptime   
 
     id: uptime_sensor
 
 
     update_interval: 30s
 
     update_interval: 30s
 +
    unit_of_measurement: ppm
 +
    filters:   
 +
      - lambda: |-
 +
          return 135.2167 * pow((x / 0.0000015534) / 37835, -2.752747);
  
text_sensor:
+
   - platform: rotary_encoder
   - platform: wifi_info
+
     name: "Rotary Encoder"
     ip_address:
+
     pin_a: GPIO25
      name: ESP IP Address
+
     pin_b: GPIO26
      id: esp_ip
+
     id: Rotary
     ssid:
 
      name: ESP Connected SSID
 
     bssid:
 
      name: ESP Connected BSSID
 
     mac_address:
 
      name: ESP Mac Wifi Address
 
    scan_results:
 
      name: ESP Latest Scan Results
 
  
   - platform: template
+
display:
     name: Uptime Human Readable
+
   - platform: ssd1306_i2c
     id: uptime_human   
+
    model: "SSD1306 128x64"
 +
    address: 0x3C
 +
     rotation: 0
 +
     lambda: |-
 +
     
 +
      //Kopfzeile
 +
      //it.print(0, 0, id(my_font_12), id(my_white), TextAlign::TOP_CENTER, "ESPHome Display V1");
 +
      it.print(1, 0, id(my_font_12), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_1).state.c_str());
 +
     
 +
      //Zeilen
 +
      it.print(2, 11, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_2).state.c_str());
 +
      it.print(2, 19, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_3).state.c_str());
 +
      it.print(2, 27, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_4).state.c_str());
 +
      it.print(2, 35, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_5).state.c_str());
 +
      it.print(2, 43, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_6).state.c_str());     
 +
      //it.print(2, 53, id(my_font_8), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_7).state.c_str());     
  
  - platform: mqtt_subscribe
+
      // Rahmen
    name: "TimeStamp"
+
      it.line(0, 0, 127, 0);
    id: TimeStamp
+
      it.line(0, 12, 127, 12);
    topic: esp32-azdev-touch-new/TimeStamp
+
      it.line(0, 12, 0, 63);
 +
      it.line(0, 0, 0, 12);                 
 +
      it.line(0, 63, 127, 63);
 +
      it.line(127, 12, 127, 63);
 +
      it.line(127, 0, 127, 12);
  
  - platform: mqtt_subscribe
+
      // Fusszeile
    name: "Z1"
+
      it.print(2, 52, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
    id: Z1
+
      it.print(120, 52, id(my_font_10), id(my_white), TextAlign::TOP_RIGHT, id(TimeStamp).state.c_str());
    topic: esp32-azdev-touch-new/Z1
 
 
 
  - platform: mqtt_subscribe
 
    name: "Z2"
 
    id: Z2
 
    topic: esp32-azdev-touch-new/Z2
 
  
   - platform: mqtt_subscribe
+
switch:
     name: "Z3"
+
   - platform: gpio
     id: Z3
+
     name: "Relay"
     topic: esp32-azdev-touch-new/Z3
+
     pin: GPIO13
 +
     id: RELAY
  
   - platform: mqtt_subscribe
+
   - platform: gpio
     name: "Z4"
+
     name: "Ampel-Rot"
     id: Z4
+
     pin: GPIO0
     topic: esp32-azdev-touch-new/Z4
+
     id: AmpelRot
  
   - platform: mqtt_subscribe
+
   - platform: gpio
     name: "Z5"
+
     name: "Ampel-Gruen"
     id: Z5
+
     pin: GPIO14
    topic: esp32-azdev-touch-new/Z5
+
     id: AmpelGruen
 
 
  - platform: mqtt_subscribe
 
    name: "Z6"
 
     id: Z6
 
    topic: esp32-azdev-touch-new/Z6
 
  
   - platform: mqtt_subscribe
+
   - platform: gpio
     name: "Z7"
+
     name: "Ampel-Gelb"
     id: Z7
+
     pin: GPIO12
     topic: esp32-azdev-touch-new/Z7
+
     id: AmpelGelb
  
   - platform: mqtt_subscribe
+
   - platform: restart
     name: "Z8"
+
     name: "Reboot"
    id: Z8
 
    topic: esp32-azdev-touch-new/Z8
 
  
   - platform: mqtt_subscribe
+
binary_sensor:
     name: "Z9"
+
   - platform: gpio
     id: Z9
+
     name: "Pin GPIO16"
     topic: esp32-azdev-touch-new/Z9
+
    pin: GPIO16
 +
     id: GPIO16
 +
     filters:    
 +
      - delayed_on: 100ms
 +
      - delayed_off: 100ms     
  
   - platform: mqtt_subscribe
+
   - platform: gpio
     name: "Z10"
+
     name: "Rotary SW"
     id: Z10
+
    pin: GPIO27
     topic: esp32-azdev-touch-new/Z10
+
     id: Rotarysw
 +
     filters:
 +
      - invert:
 +
      - delayed_on: 100ms
 +
      - delayed_off: 100ms     
 +
 
 +
font:
 +
  - file: "/opt/iobroker/node_modules/iobroker.vis-material-webfont/widgets/material-webfont/fonts/materialdesignicons-webfont.ttf"
 +
    id: test
 +
    size: 10
 +
 
 +
  - file: "/opt/iobroker/iobroker-data/esphome.1/fonts/arial.ttf"   
 +
    id: my_font_10
 +
    size: 10
 
    
 
    
   - platform: mqtt_subscribe
+
   - file: "fonts/arial.ttf"
    name: "Z11"
+
     id: my_font_8
     id: Z11
+
     size: 8   
     topic: esp32-azdev-touch-new/Z11
 
 
    
 
    
   - platform: mqtt_subscribe
+
   - file: "fonts/arial.ttf"
    name: "Z12"
+
     id: my_font_12
     id: Z12
+
     size: 12
     topic: esp32-azdev-touch-new/Z12
 
 
    
 
    
   - platform: mqtt_subscribe
+
   - file: "fonts/arial.ttf"
    name: "Z13"
+
     id: my_font_14
    id: Z13
+
     size: 14
    topic: esp32-azdev-touch-new/Z13
 
 
 
  - platform: mqtt_subscribe
 
    name: "Z14"
 
     id: Z14
 
     topic: esp32-azdev-touch-new/Z14
 
  
switch:
+
color:
   - platform: restart
+
   - id: my_red
     name: "Display Restart"
+
     red: 100%
 
+
    green: 0%
 
+
    blue: 0%
=== ESP32 Wiegand ===
+
  - id: my_green
esphome:
+
    red: 0%
 +
    green: 100%
 +
    blue: 0%
 +
  - id: my_blue
 +
    red: 0%
 +
    green: 0%
 +
    blue: 100%
 +
  - id: my_yellow
 +
    red: 100%
 +
    green: 100%
 +
    blue: 0%
 +
  - id: my_white
 +
    red: 100%
 +
    green: 100%
 +
    blue: 100%   
 +
  - id: mygrey 
 +
    red: 80%
 +
    green: 80%
 +
    blue: 80%
 +
 
 +
 
 +
=== ESP32 Wiegand ===
 +
esphome:
 
   name: esp32-wiegand-test
 
   name: esp32-wiegand-test
 
   friendly_name: esp32-wiegand-test
 
   friendly_name: esp32-wiegand-test
Zeile 1.828: Zeile 1.855:
  
  
== Fehlerbeseitigung ==
+
== Fehlerbeseitigung ==
=== Backup Fehler CIFS ===
+
=== Backup Fehler CIFS ===
  https://www.youtube.com/watch?v=15UbdMcZmp8
+
  https://www.youtube.com/watch?v=15UbdMcZmp8
 
+
 
 
+
 
== USB Devices im ioBroker Docker Container nutzen ==
+
== USB Devices im ioBroker Docker Container nutzen ==
  https://smarthome.buanet.de/2020/02/usb-devices-im-iobroker-docker-container-nutzen/
+
  https://smarthome.buanet.de/2020/02/usb-devices-im-iobroker-docker-container-nutzen/
 
+
 
== Install Python3 Pip ==
+
== Install Python3 Pip ==
  sudo apt-get update
+
  sudo apt-get update
  sudo apt-get upgrade
+
  sudo apt-get upgrade
  sudo apt-get install python3-pip.
+
  sudo apt-get install python3-pip.
 
+
 
== Redis DB ==
+
== Redis DB ==
 +
 
 +
iob setup custom
 +
 
 +
Current configuration:
 +
Objects database:
 +
Type: jsonl
 +
Host/Unix Socket: 127.0.0.1
 +
Port: 9001
 +
States database:
 +
Type: redis
 +
Host/Unix Socket: 172.17.0.5
 +
Port: 6379
 +
Data Directory: ../../iobroker-data/
 +
Host name: e0f8c02b332d
 +
 
 +
 
 +
== Speicher aufräumen ==
 +
 
 +
du -h --max-depth=1 /var/lib | sort -hr
  
  https://smarthome.buanet.de/2020/12/redis-container-unter-portainer-bereitstellen/
+
  sudo apt clean
 +
sudo apt autoclean
  
  https://smarthome.buanet.de/2020/12/iobroker-docker-container-mit-redis-db-verbinden/
+
  npm cache clean --force
  
  iob setup custom
+
  sudo apt install ncdu
 
+
  sudo ncdu /var/lib/docker/overlay2
Current configuration:
 
Objects database:
 
Type: jsonl
 
Host/Unix Socket: 127.0.0.1
 
Port: 9001
 
States database:
 
Type: redis
 
  Host/Unix Socket: 172.17.0.5
 
Port: 6379
 
Data Directory: ../../iobroker-data/
 
Host name: e0f8c02b332d
 

Aktuelle Version vom 27. Mai 2025, 15:46 Uhr

Willkommen auf unserer IO-Broker Wiki Seite

Inhaltsverzeichnis

Home

https://www.iobroker.net/?lang=de

Wiki

https://www.iobroker.net/?lang=de#de/documentation

Forum

https://forum.iobroker.net/

Der kleine ioBroker/Linux-Werkzeugkasten

https://forum.iobroker.net/topic/42952/der-kleine-iobroker-linux-werkzeugkasten

Installieren

https://iotspace.dev/smarthome-teil1-iobroker-installation-und-config/
https://www.dev-metal.ch/?p=1362

TUTORIAL: IOBROKER-INSTALLATION AUF DEM RASPBERRY PI

https://www.allroundbastler.de/projekte/iobroker-installation-auf-dem-raspberry-pi/

Install

Installer version: 2022-02-13
sudo curl -sLf https://iobroker.net/install.sh | bash -
sudo su
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt install -y nodejs
node --version
npm --version
pi@raspberrypi-59:~ $ node --version
v14.18.2
pi@raspberrypi-59:~ $ npm --version
6.14.15

Remove

Iobroker löschen
Deinstallation von ioBroker
ioBroker kann restlos entfernt werden mit:
update-rc.d iobroker.sh remove
rm /etc/init.d/iobroker.sh
rm /opt/iobroker/* -R
In diesem Fall bleibt der Ordner /opt/iobroker bestehen. Falls dieser auch noch entefrnt werden soll kann das mit rmdir /opt/iobroker/ geschehen.

Console commands

https://github.com/ioBroker/ioBroker/wiki/Console-commands

Info

iobroker status
iobroker version

Update

sudo iobroker stop
sudo iobroker update
sudo iobroker upgrade self
sudo iobroker start

ioBroker js-controller (core) updates

With a minimum of ioBroker Docker Image v8.1.0, js-controller v5.0.10 und admin v6.9.1 it is now possible to upgrade js-controller from the admin ui directly by simply clicking the update button at the "Hosts" tab.
Of course you still will be able to perform the js-controller upgrade from command line.
Without the help of maintenance script aka "the hacky way"

pkill -u iobroker
iobroker update
iobroker upgrade self
After this you have to restart your container.
With the help of maintenance script aka "the recommended way"
maintenance on
maintenance upgrade
maintenance off
Depending on your containers restart policy the container will stop/ restart automatically.

Nodejs

[HowTo] Nodejs-Installation und Upgrades unter Debian

https://forum.iobroker.net/topic/35090/howto-nodejs-installation-und-upgrades-unter-debian
cd /opt/iobroker
npm ls | grep -E 'github|ERR'
cd /opt/iobroker && npm prune
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

iobroker stop
sudo nano /etc/apt/sources.list.d/nodesource.list
#node 14
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bullseye main
#node 16
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x bullseye main
sudo apt update
sudo apt upgrade
apt policy nodejs
echad@chet:/opt/iobroker $ apt policy nodejs
nodejs:
Installed: 16.15.1-deb-1nodesource1
Candidate: 16.15.1-deb-1nodesource1
Version table:
        
*** 16.15.1-deb-1nodesource1 500
500 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages
100 /var/lib/dpkg/status
14.19.3-deb-1nodesource1 500
500 https://deb.nodesource.com/node_14.x bullseye/main arm64 Packages
12.22.5~dfsg-2~11u1 500
500 http://deb.debian.org/debian bullseye/main arm64 Packages
500 http://security.debian.org/debian-security bullseye-security/main arm64 Packages
sudo apt install nodejs=VERSIONSNUMMER-deb-1nodesource1
sudo ln -s /usr/bin/node /usr/bin/nodejs
uname -m && type -P nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
echad@chet:~ $ uname -m && type -P nodejs node npm && nodejs -v && node -v && npm -v && whoami && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
aarch64
/usr/bin/nodejs
/usr/bin/node
/usr/bin/npm
v16.15.1
v16.15.1
8.11.0
echad
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian bullseye-updates InRelease
sudo ln -s /usr/bin/node /usr/bin/nodejs
iobroker fix
iobroker start


Install Node.js and Npm on Raspberry Pi

https://www.instructables.com/id/Install-Nodejs-and-Npm-on-Raspberry-Pi/

Node.js auf dem Raspberry Pi installieren

https://maker-tutorials.com/node-js-raspberry-pi-installieren/

Upgrade Node.js/npm in Raspbian on Raspberry Pi

https://medium.com/@bipul.k.kuri/upgrade-node-js-npm-in-raspbian-on-raspberry-pi-f1bcdaa23db5

beginners-guide-to-installing-node-js-on-a-raspberry-pi

https://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/
https://www.youtube.com/watch?v=S4-MhZ1NfYY

my IO-Broker

https://192.168.0.89:8081
https://192.168.0.89:8090 nicht aktiviert
https://178.254.41.94:8081
http://178.254.41.94:8090
http://192.168.0.83:8081

Administration auf Konsole

ioBroker läuft nicht mehr

https://www.iobroker.net/docu/index-26.htm?page_id=3928&lang=de

Command line interface

https://www.iobroker.net/docu/index-98.htm?page_id=3971&lang=de

Hilfreiches

iobroker list instances
iobroker start admin.0
iobroker start admin.1
iobroker stop admin.0
iobroker stop admin.1
echarts.0
sql.1
sql.2
flot.0
linux-control.0
tr-064.0
vis-weather.0
upnp.0
ping.0
cul.0
javascript.0
influx.0
iobroker set admin.1 --secure true
iobroker set admin.1 --secure false
iobroker add admin --port 8090 --enabled
cd /opt/iobroker/node_modules/iobroker.admin
mv iobroker.admin iobroker.admin_old
iobroker install admin@5.2.0
iobroker list instances
iobroker start admin.0

Datenpunkte steuern, aktualisieren, bestätigen und richtig triggern

https://www.machs-smart.de/datenpunkte-steuern-aktualisieren-ack-bestaetigt/

Blockly-Scripte optimieren und Logik-Kurzformen anwenden

https://www.machs-smart.de/blockly-scripte-optimieren-und-logik-kurzformen/

haus-automatisierung.com

https://haus-automatisierung.com/
https://haus-automatisierung.com/iobroker-tutorial-reihe/

Adapter Entwicklung

https://github.com/ioBroker/create-adapter https://adapter-creator.iobroker.in/ https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/adapterdev.md https://herwig.de/anleitungen/smarthome/iobroker/adapter-entwicklung.html https://forum.iobroker.net/topic/17200/aufruf-iobroker-adapter-creator-testen


https://docs.npmjs.com/cli/v7/configuring-npm/package-json https://adapter-creator.iobroker.in/ https://www.iobroker.net/#de/documentation/dev/adapterdev.md


https://gist.github.com/selbstgemacht/5e33a691627540add6f6101dec931ce3 https://forum.iobroker.net/topic/8538/zugriff-auf-werte-in-einem-json-objekt https://forum.iobroker.net/topic/3813/json-verarbeiten https://forum.iobroker.net/topic/15505/http-request-json/6 https://forum.iobroker.net/topic/6165/temperatur-aus-json-auslesen/6 https://forum.iobroker.net/topic/6107/gel%C3%B6st-frage-json-datei-auslesen/9 https://forum.iobroker.net/topic/14169/json-daten-auslesen/4

Docker

docker run -p 8081:8081 --name iobroker-1 -v iobrokerdata1:/opt/iobroker buanet/iobroker:latest
docker run -p 8082:8081 --name iobroker-2 -v iobrokerdata2:/opt/iobroker buanet/iobroker:latest
docker run -p 8083:8081 --name iobroker-3 -v iobrokerdata3:/opt/iobroker buanet/iobroker:latest
docker run -p 9091:8081 --name iobroker-Master -v iobrokerdatam:/opt/iobroker-4 buanet/iobroker:latest
docker run -p 9092:8081 --name iobroker-Slave-1 -v iobrokerdatas1:/opt/iobroker-5 buanet/iobroker:latest

Fujitsu

docker run -p 8081-8099:8081-8099 -p 6062-6063:6052-6053 -p 9100-9101:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
docker run -p 8181-8199:8081-8099 -p 6162-6163:6052-6053 -p 9200-9201:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu -v iobrokerdata-2:/opt/iobroker buanet/iobroker:latest
docker run -p 8281-8299:8081-8099 -p 6262-6263:6052-6053 -p 9300-9301:9000-9001 --cap-add=NET_ADMIN --privileged --name iobroker-Fujitsu-Test -v iobrokerdata-test:/opt/iobroker buanet/iobroker:latest

Fujitsu mit fester IP

docker run -d --name iobroker-Fujitsu-Test-2 --network=FujitsuFesteIP --ip=192.168.0.8 --cap-add=NET_ADMIN --privileged -v iobrokerdata-test-2:/opt/iobroker buanet/iobroker:latest


IOB Docker auf QNAP

docker run --network qnet-dhcp-bond0-6d6da6 --cap-add=NET_ADMIN --privileged --name iobroker-Qnap  –-hostname iobroker-qnap -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
docker run --network qnapFesteIP --cap-add=NET_ADMIN --privileged --name iobroker-QNAP-2  --hostname iobroker-qnap-2 -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
Portweiterleitungen:
ESPHome : 49158 -> 6052
Konsole : 49157 -> 8088 / 9088
Admin : 49156 -> 8081
Web : 49159 -> 8082
Bridge Mode

Parameter

Ports : 6052, 8081 - 8089, 8099, 9000 - 9001
Container capabilities NET_ADMIN
Privileged mode = true
/opt/iobroker
-–hostname iob-qnap
--network qnet-dhcp-bond0-6d6da6

Maintenance

In Portainer eine Console auf IOBROKER starten
iobroker maintenance on
iob maint on
iob m on
maintenance upgrade
maintenence --help

Multihost

https://www.iobroker.net/docu/index-24.htm?page_id=3068&lang=de
IOB_MULTIHOST	master
IOB_OBJECTSDB_TYPE	file
IOB_STATESDB_TYPE	file
IOB_OBJECTSDB_HOST	0.0.0.0
IOB_OBJECTSDB_PORT	9001
IOB_STATESDB_HOST	0.0.0.0
IOB_STATESDB_PORT	9000
OB_MULTIHOST	slave
IOB_OBJECTSDB_TYPE	file
IOB_STATESDB_TYPE	file
IOB_OBJECTSDB_HOST	172.17.0.7
IOB_OBJECTSDB_PORT	9001
IOB_STATESDB_HOST	172.17.0.7
IOB_STATESDB_PORT	9000

Installation

Wichtig: Die verschiedenenen Hosts müssen unbedingt eindeutige Hostnamen besitzen.
Dazu installiert man zuerst auf allen verwendeten hosts ganz normal ioBroker.
Auf dem Master wird anschließend iobroker setup custom ausgeführt und die folgenden Eingaben gemacht:
Type of objects DB [file, couch, redis], default [file]: ENTER
Host of objects DB(file), default[127.0.0.1]: <0.0.0.0>
Port of objects DB(file), default[9001]: ENTER
Type of states DB [file, redis], default [file]: ENTER
Host of states DB (file), default[0.0.0.0]: ENTER
Port of states DB (file), default[9000]: ENTER
Host name of this machine [hostname]: ENTER
Auf den untergeordneten hosts führt man nach der Installation ebenfalls den folgenden Befehl aus:
iobroker setup custom
und trägt dort ein:
IP für Fujitsu Master : 192.168.0.20
Type of objects DB [file, couch, redis], default [file]: ENTER
Host of objects DB(file), default[127.0.0.1]: <IP ADRESSE> vom Hauptsystem
Port of objects DB(file), default[9001]: ENTER
Type of states DB [file, redis], default [file]: ENTER
Host of states DB (file), default[cubie]:<IP ADRESSE> vom Hauptsystem
Port of states DB (file), default[9000]: ENTER
Host name of this machine [hostname]: ENTER
Nun das untergeordnete System neu starten.
Ab der Version des js-controller v1.1.3 wird die Einrichtung eines Multihost-Systems noch weiter vereinfacht.
Man gibt beim Master nur noch ein: 
sudo iobroker multihost enable
Anschließend auf dem slave: 
sudo iobroker multihost browse
Jetzt müssten vorhandene Master angezeigt werden.
Daraufhin wird mit 
sudo iobroker multihost connect 
der entsprechenden Master ausgewählt
Damit ist die Multihost-Verbindung fertig.

client Löschen

iobroker list hosts
iobroker stop
iobroker host remove <host>
iobroker fix
iobroker start


IOB_MULTIHOST	slave
IOB_OBJECTSDB_HOST	192.168.0.20
IOB_OBJECTSDB_PORT	9001
IOB_OBJECTSDB_TYPE	jsonl
IOB_STATESDB_HOST	192.168.0.20
IOB_STATESDB_PORT	9000
IOB_STATESDB_TYPE	jsonl
Um einen Host in einer IOBroker-Multihost-Umgebung zu löschen, wenn der Master in einem Docker-Container läuft
Schritte zum Löschen eines Slaves in einer Multihost-Umgebung mit Docker-Master:
Docker-Container starten / betreten
Falls Du den Befehl direkt im Container ausführen willst:
docker exec -it iobroker bash
iobroker del <hostname>

ESP-Easy

https://www.smarthome-tricks.de/esp8266/espeasy-datenaustausch-mit-iobroker/
https://iotspace.dev/espeasy-sensordaten-per-mqtt-an-iobroker-senden/

ESPHome

Pillow

sudo apt update
sudo apt-get install pip -y
pip install Pillow==4.0.0 
sudo apt-get install python3-pil -y
pip3 list|grep -i pillow
sudo pip install pillow==10.1.0
cd /opt/iobroker/node_modules/iobroker.esphome
nano main.js
pillow==10.2.0
esphome restart

Fonts

/opt/iobroker/iobroker-data/esphome.0/fonts
/var/lib/docker/volumes/iobrokerdata/_data/iobroker-data/esphome.1
/home/pi/iobroker-data/esphome.0/fonts

D1Mini

sensor:
  - platform: dht
    pin: D4
    temperature:
      name: "DHT Temperature"
    humidity:
      name: "DHT Humidity"
     update_interval: 60s
wifi:
  networks:
  - ssid: !secret wifi_ssid
  - password: !secret wifi_password

  - ssid: !secret wifi_ssid_2
  - password: !secret wifi_password_2

  - ssid: !secret wifi_ssid_3
  - password: !secret wifi_password_3

  - ssid: !secret wifi_ssid_4
  - password: !secret wifi_password_4
binary_sensor:
  - platform: gpio
    name: "Pin D3"
    pin: D3
    id: PIND3


text_sensor:   
  - platform: version
    name: "ESPHome Version"    
  - platform: wifi_info
    ip_address:
     name: ESP IP Address
     ssid:
     name: ESP Connected SSID
    bssid:
     name: ESP Connected BSSID
    mac_address:
     name: ESP Mac Wifi Address
    scan_results:
     name: ESP Latest Scan Results


switch:
  - platform: gpio
    name: "Relay"
    pin: <PIN_RELAY_IS_CONNECTED_TO>


ESP8266

esphome:

 name: esp8266-relais-dht-btn

esp8266:

 board: d1_mini
 framework:
   version: recommended
       
  1. Enable logging

logger:

 level: verbose
 logs:
   mqtt.component: DEBUG
   mqtt.client: ERROR
   component: ERROR
  1. Enable Home Assistant API

api:

 password: "12Tango34#1" #!secret api_password

ota:

 platform: esphome
 password: "987fbfb6485cbc09fbc44a8b870dabcf"

wifi:

 networks:
 - ssid: !secret wifi_ssid
 - password: !secret wifi_password

 - ssid: !secret wifi_ssid_2
 - password: !secret wifi_password_2

 - ssid: !secret wifi_ssid_3
 - password: !secret wifi_password_3

 - ssid: !secret wifi_ssid_4
 - password: !secret wifi_password_4
 power_save_mode: none
 use_address: 192.168.1.236
 
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp8266-Relais-Dht-Btn"
   password: !secret ap_password

web_server:

 port: 80
 version: 2

captive_portal:

text_sensor:

 - platform: version
   name: "ESPHome Version"
 - platform: wifi_info
   ip_address:
     name: ESP IP Address
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
 
 - platform: template
   name: Uptime Human Readable
   id: uptime_human
       

sensor:

 - platform: uptime
   name: Uptime Sensor
   id: uptime_sensor
   update_interval: 30s
   on_raw_value:
     then:
       - text_sensor.template.publish:
           id: uptime_human
           state: !lambda |-
             int seconds = round(id(uptime_sensor).raw_state);
             int days = seconds / (24 * 3600);
             seconds = seconds % (24 * 3600);
             int hours = seconds / 3600;
             seconds = seconds % 3600;
             int minutes = seconds /  60;
             seconds = seconds % 60;
             return (
               (days ? to_string(days) + "d " : "") +
               (hours ? to_string(hours) + "h " : "") +
               (minutes ? to_string(minutes) + "m " : "") +
               (to_string(seconds) + "s")
             ).c_str();
 
 - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
   name: "WiFi Signal dB"
   id: wifi_signal_db
   update_interval: 60s
   entity_category: "diagnostic"
 - platform: copy # Reports the WiFi signal strength in %
   source_id: wifi_signal_db
   name: "WiFi Signal Percent"
   filters:
     - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
   unit_of_measurement: "Signal %"
   entity_category: "diagnostic"
   device_class: ""
 - platform: dht
   pin: D4
   temperature:
     name: "DHT Temperature"
   humidity:
     name: "DHT Humidity"
   update_interval: 60s
   model: DHT22

switch:

 - platform: gpio
   name: "Relay"
   pin: D1
   id: RELAY1
 - platform: restart
   name: "Reboot"

binary_sensor:

 - platform: gpio
   name: "Pin D3"
   pin: D3
   id: PIND3
   filters:
     - invert:
     - delayed_on: 100ms
     - delayed_off: 100ms       
           

light:

 - platform: neopixelbus
   type: RGB
   variant: WS2812x
   pin: D2
   num_leds: 1
   name: "NeoPixel Light"

ESP8266-01s

esphome:

 name: esp8266-01s-001
 friendly_name: esp8266-01s-001

esp8266:

 board: esp01_1m
  1. Enable logging

logger:

 level: VERBOSE
  1. Enable Home Assistant API

api:

  password: !secret api_password

ota:

 platform: esphome
 password: "8024a63c6540bdae0a80f647c7814847"

wifi:

 ssid: !secret wifi_ssid
 password: !secret wifi_password
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp8266-01S-001 Fallback Hotspot"
   password: "eFcsqiNMK7VE"

web_server:

 port: 80
 version: 2

captive_portal:

text_sensor:

 - platform: version
   name: "ESPHome Version"
 - platform: wifi_info
   ip_address:
     name: ESP IP Address
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
 - platform: template
   name: Uptime Human Readable
   id: uptime_human

switch:

 - platform: gpio
   name: "Pin GPIO2"
   pin: GPIO2
   id: PinGPIO2LED
 - platform: restart
   name: "Reboot"

ESP32-AZDevTouch

esphome:

 name: "esp32-azdev-touch-4"

esp32:

 board: esp-wrover-kit
 framework:
   type: arduino

logger:

 level: verbose
 logs:
   mqtt.component: DEBUG
   mqtt.client: ERROR
   component: ERROR

api:

  password: !secret api_password

ota:

 platform: esphome
 password: "987f1bcf6d2205ac582a6f222ccb2aa4"

wifi:

 networks:
 - ssid: !secret wifi_ssid
 - password: !secret wifi_password
 - ssid: !secret wifi_ssid_3
 - password: !secret wifi_password_3
 power_save_mode: none
 use_address: 192.168.1.161
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp32-Azdev-Touch-4"
   password: "j9mSSo97Zdao"

time:

 - platform: sntp
   id: sntp_time
   servers:
     - 192.168.0.130
   timezone: "Europe/Berlin"
   on_time_sync:
     then:
       - logger.log: "Synchronized system clock"

web_server:

 port: 80
 version: 2
 js_include: "v2/www.js"
 js_url: ""

captive_portal:

mqtt:

 id: mqtt_client
 broker: 192.168.1.59
 port: 1883
 username: !secret mqtt_username
 password: !secret mqtt_password
 birth_message:
   topic: esp32-azdev-touch-new/Status
   payload: online
 will_message:
   topic: esp32-azdev-touch-new/Status
   payload: offline

spi:

clk_pin: 18
mosi_pin: 23
miso_pin: 19
   

display:

 - platform: ili9xxx
   model: TFT 2.4
   cs_pin: 5 
   dc_pin: 4 
   reset_pin: 22 
   rotation: 180
   id: tft_ha
   update_interval: 10s      
   lambda: |-
     it.fill(COLOR_BLACK);
     it.print(0, 0, id(my_font_20), id(my_red), TextAlign::TOP_LEFT,  "ESPHome Display 4 V 1.9");    
           
     //Zeilen
     it.print(5, 25, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z1).state.c_str());
     it.print(5, 44, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z2).state.c_str());
     it.print(5, 63, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z3).state.c_str());
     it.print(5, 82, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z4).state.c_str());
     it.print(5, 101, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z5).state.c_str());
     it.print(5, 120, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z6).state.c_str());
     it.print(5, 139, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z7).state.c_str());
     it.print(5, 158, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z8).state.c_str());
     it.print(5, 177, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z9).state.c_str());
     it.print(5, 196, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z10).state.c_str());
     it.print(5, 215, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z11).state.c_str());
     it.print(5, 234, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z12).state.c_str());
     it.print(5, 253, id(my_font_18), id(my_white), TextAlign::TOP_LEFT, id(Z13).state.c_str());
     it.print(5, 272, id(my_font_18), id(my_yellow), TextAlign::TOP_LEFT, id(Z14).state.c_str());
     // Fusszeile
     it.print(0, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
     it.print(110, 300, id(my_font_14), id(mygrey), TextAlign::TOP_LEFT, id(TimeStamp).state.c_str());
     
     // Rahmen
     it.line(0, 23, 239, 23);
     it.line(0, 297, 239, 297);            
     it.line(0, 23, 0, 297);
     it.line(239, 23, 239, 297);
     
     //if (id(touchscreen).touched)
       //it.filled_circle(id(touchscreen).x-2, id(touchscreen).y-2, 10, my_red);

color:

 - id: my_red
   red: 100%
   green: 0%
   blue: 0%
 - id: my_green
   red: 0%
   green: 100%
   blue: 0%
 - id: my_blue
   red: 0%
   green: 0%
   blue: 100%
 - id: my_yellow
   red: 100%
   green: 100%
   blue: 0%
 - id: my_white
   red: 100%
   green: 100%
   blue: 100%    
 - id: mygrey  
   red: 80%
   green: 80%
   blue: 80%  
   

font:

 - file: "fonts/arial.ttf"
   id: my_font_10
   size: 10
 - file: "fonts/arial.ttf"
   id: my_font_12
   size: 12
 - file: "fonts/arial.ttf"
   id: my_font_14
   size: 14
 - file: "fonts/arial.ttf"
   id: my_font_16
   size: 16    
 - file: "fonts/arial.ttf"
   id: my_font_18
   size: 18
 - file: "fonts/arial.ttf"
   id: my_font_20
   size: 20
 - file: "fonts/arial.ttf"
   id: my_font_22
   size: 22

output:

 - platform: ledc
   pin: 15
   id: gpio_32_backlight_pwm
   inverted: true
  1. Define a monochromatic, dimmable light for the backlight

light:

 - platform: monochromatic
   output: gpio_32_backlight_pwm
   name: "ILI9341 Display Backlight"
   id: back_light
   restore_mode: ALWAYS_ON 

sensor:

 - platform: wifi_signal
   name: "WiFi Signal Sensor"
   update_interval: 10s
   on_raw_value:
     then:
       - text_sensor.template.publish:
           id: uptime_human
           state: !lambda |-
             int seconds = round(id(uptime_sensor).raw_state);
             int days = seconds / (24 * 3600);
             seconds = seconds % (24 * 3600);
             int hours = seconds / 3600;
             seconds = seconds % 3600;
             int minutes = seconds /  60;
             seconds = seconds % 60;
             return (
               (days ? to_string(days) + "d " : "") +
               (hours ? to_string(hours) + "h " : "") +
               (minutes ? to_string(minutes) + "m " : "") +
               (to_string(seconds) + "s")
             ).c_str();
             
 - platform: uptime
   name: Uptime    
   id: uptime_sensor
   update_interval: 30s

text_sensor:

 - platform: wifi_info
   ip_address:
     name: ESP IP Address
     id: esp_ip
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
 - platform: template
   name: Uptime Human Readable
   id: uptime_human    
 - platform: mqtt_subscribe
   name: "TimeStamp"
   id: TimeStamp
   topic: esp32-azdev-touch-new/TimeStamp
 - platform: mqtt_subscribe
   name: "Z1"
   id: Z1
   topic: esp32-azdev-touch-new/Z1
 
 - platform: mqtt_subscribe
   name: "Z2"
   id: Z2
   topic: esp32-azdev-touch-new/Z2
 - platform: mqtt_subscribe
   name: "Z3"
   id: Z3
   topic: esp32-azdev-touch-new/Z3
 - platform: mqtt_subscribe
   name: "Z4"
   id: Z4
   topic: esp32-azdev-touch-new/Z4
 - platform: mqtt_subscribe
   name: "Z5"
   id: Z5
   topic: esp32-azdev-touch-new/Z5
 
 - platform: mqtt_subscribe
   name: "Z6"
   id: Z6
   topic: esp32-azdev-touch-new/Z6
 - platform: mqtt_subscribe
   name: "Z7"
   id: Z7
   topic: esp32-azdev-touch-new/Z7
 - platform: mqtt_subscribe
   name: "Z8"
   id: Z8
   topic: esp32-azdev-touch-new/Z8
 - platform: mqtt_subscribe
   name: "Z9"
   id: Z9
   topic: esp32-azdev-touch-new/Z9
 - platform: mqtt_subscribe
   name: "Z10"
   id: Z10
   topic: esp32-azdev-touch-new/Z10
 
 - platform: mqtt_subscribe
   name: "Z11"
   id: Z11
   topic: esp32-azdev-touch-new/Z11
 
 - platform: mqtt_subscribe
   name: "Z12"
   id: Z12
   topic: esp32-azdev-touch-new/Z12
 
 - platform: mqtt_subscribe
   name: "Z13"
   id: Z13
   topic: esp32-azdev-touch-new/Z13
 
 - platform: mqtt_subscribe
   name: "Z14"
   id: Z14
   topic: esp32-azdev-touch-new/Z14

switch:

 - platform: restart
   name: "Display Restart"

ESP32

esphome:

 name: esp32-azdev-platine-1

esp32:

 board: esp-wrover-kit
 framework:
   type: arduino

logger:

 level: VERBOSE
 

api:

  password: !secret api_password

ota:

 platform: esphome
 password: "edc3ea425a3dd7c5542260a26fa30973"

wifi:

 networks:
 - ssid: !secret wifi_ssid
 - password: !secret wifi_password
 - ssid: !secret wifi_ssid_3
 - password: !secret wifi_password_3
 reboot_timeout: 1min
 power_save_mode: none
# use_address: 192.168.1.235
 
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp32-Azdev-Platine-1"
   password: "CfaiDVSb9RSA"

captive_portal:

time:

 - platform: sntp
   id: sntp_time
   servers:
     - 192.168.0.130
   timezone: "Europe/Berlin"
   on_time_sync:
     then:
       - logger.log: "Synchronized system clock"

web_server:

 port: 80
 version: 2

mqtt:

 id: mqtt_client
 broker: 192.168.1.59
 port: 1884
 username: !secret mqtt_username
 password: !secret mqtt_password

one_wire:

 - platform: gpio
   pin: GPIO15
   
  1. Example configuration entry for ESP32

i2c:

 sda: GPIO21
 scl: GPIO22
 scan: true
 id: bus_a

text_sensor:

 - platform: version
   name: "ESPHome Version"
 
 - platform: wifi_info
   ip_address:
     name: ESP IP Address
     id: esp_ip
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
 
 - platform: template
   name: Uptime Human Readable
   id: uptime_human
 
 - platform: mqtt_subscribe
   name: "TimeStamp"
   id: TimeStamp
   topic: esp32-azdev-platine-1/Zeilen/TimeStamp  
 
 - platform: mqtt_subscribe
   name: "Zeile_1"
   id: DisplayZeile_1
   topic: esp32-azdev-platine-1/Zeilen/Zeile-1
 - platform: mqtt_subscribe
   name: "Zeile_2"
   id: DisplayZeile_2
   topic: esp32-azdev-platine-1/Zeilen/Zeile-2
 - platform: mqtt_subscribe
   name: "Zeile_3"
   id: DisplayZeile_3
   topic: esp32-azdev-platine-1/Zeilen/Zeile-3
 - platform: mqtt_subscribe
   name: "Zeile_4"
   id: DisplayZeile_4
   topic: esp32-azdev-platine-1/Zeilen/Zeile-4
 - platform: mqtt_subscribe
   name: "Zeile_5"
   id: DisplayZeile_5
   topic: esp32-azdev-platine-1/Zeilen/Zeile-5
 
 - platform: mqtt_subscribe
   name: "Zeile_6"
   id: DisplayZeile_6
   topic: esp32-azdev-platine-1/Zeilen/Zeile-6
 - platform: mqtt_subscribe
   name: "Zeile_7"
   id: DisplayZeile_7
   topic: esp32-azdev-platine-1/Zeilen/Zeile-7

sensor:

 - platform: uptime
   name: Uptime Sensor
   id: uptime_sensor
   update_interval: 30s
   on_raw_value:
     then:
       - text_sensor.template.publish:
           id: uptime_human
           state: !lambda |-
             int seconds = round(id(uptime_sensor).raw_state);
             int days = seconds / (24 * 3600);
             seconds = seconds % (24 * 3600);
             int hours = seconds / 3600;
             seconds = seconds % 3600;
             int minutes = seconds /  60;
             seconds = seconds % 60;
             return (
               (days ? to_string(days) + "d " : "") +
               (hours ? to_string(hours) + "h " : "") +
               (minutes ? to_string(minutes) + "m " : "") +
               (to_string(seconds) + "s")
             ).c_str();
 - platform: sht3xd
   temperature:
     name: "SHT3X Temperature"
   humidity:
     name: "SHT3X Humidity"
   address: 0x44
   update_interval: 60s
 - platform: dht
   pin: GPIO2
   temperature:
     name: "DHT Temperature"
   humidity:
     name: "DHT Humidity"
   update_interval: 60s
   model: DHT22
 - platform: bmp280
   temperature:
     name: BMP280 Temp"
     oversampling: 16x
   pressure:
     name: "BMP280 Pressure"
   address: 0x76
   update_interval: 60s
 - platform: bmp085
   temperature:
     name: "BMP085 Temperature"
   pressure:
     name: "BMP085  Pressure"
   update_interval: 60s
   
 - platform: dallas_temp
   address: 0xfd3ce1d444623328
   name: "Dallas Sensor 1"
 - platform: adc
   pin: GPIO34
   name: "MQ135 ADC"
   update_interval: 30s
   unit_of_measurement: ppm
   filters:    
     - lambda: |-
         return 135.2167 * pow((x / 0.0000015534) / 37835, -2.752747);
 - platform: rotary_encoder
   name: "Rotary Encoder"
   pin_a: GPIO25
   pin_b: GPIO26
   id: Rotary

display:

 - platform: ssd1306_i2c
   model: "SSD1306 128x64"
   address: 0x3C
   rotation: 0
   lambda: |-
     
     //Kopfzeile
     //it.print(0, 0, id(my_font_12), id(my_white), TextAlign::TOP_CENTER, "ESPHome Display V1");
     it.print(1, 0, id(my_font_12), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_1).state.c_str());
     
     //Zeilen
     it.print(2, 11, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_2).state.c_str());
     it.print(2, 19, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_3).state.c_str());
     it.print(2, 27, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_4).state.c_str());
     it.print(2, 35, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_5).state.c_str());
     it.print(2, 43, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_6).state.c_str());      
     //it.print(2, 53, id(my_font_8), id(my_white), TextAlign::TOP_LEFT, id(DisplayZeile_7).state.c_str());      
     // Rahmen
     it.line(0, 0, 127, 0);
     it.line(0, 12, 127, 12);
     it.line(0, 12, 0, 63); 
     it.line(0, 0, 0, 12);                  
     it.line(0, 63, 127, 63);
     it.line(127, 12, 127, 63);
     it.line(127, 0, 127, 12);
     // Fusszeile
     it.print(2, 52, id(my_font_10), id(my_white), TextAlign::TOP_LEFT, id(esp_ip).state.c_str());
     it.print(120, 52, id(my_font_10), id(my_white), TextAlign::TOP_RIGHT, id(TimeStamp).state.c_str());

switch:

 - platform: gpio
   name: "Relay"
   pin: GPIO13
   id: RELAY
 - platform: gpio
   name: "Ampel-Rot"
   pin: GPIO0
   id: AmpelRot
 - platform: gpio
   name: "Ampel-Gruen"
   pin: GPIO14
   id: AmpelGruen
 - platform: gpio
   name: "Ampel-Gelb"
   pin: GPIO12
   id: AmpelGelb
 - platform: restart
   name: "Reboot"

binary_sensor:

 - platform: gpio
   name: "Pin GPIO16"
   pin: GPIO16
   id: GPIO16
   filters:      
     - delayed_on: 100ms
     - delayed_off: 100ms       
 - platform: gpio
   name: "Rotary SW"
   pin: GPIO27
   id: Rotarysw
   filters:
     - invert:
     - delayed_on: 100ms
     - delayed_off: 100ms       

font:

 - file: "/opt/iobroker/node_modules/iobroker.vis-material-webfont/widgets/material-webfont/fonts/materialdesignicons-webfont.ttf"
   id: test
   size: 10
 - file: "/opt/iobroker/iobroker-data/esphome.1/fonts/arial.ttf"    
   id: my_font_10
   size: 10
 
 - file: "fonts/arial.ttf"
   id: my_font_8
   size: 8    
 
 - file: "fonts/arial.ttf"
   id: my_font_12
   size: 12
 
 - file: "fonts/arial.ttf"
   id: my_font_14
   size: 14

color:

 - id: my_red
   red: 100%
   green: 0%
   blue: 0%
 - id: my_green
   red: 0%
   green: 100%
   blue: 0%
 - id: my_blue
   red: 0%
   green: 0%
   blue: 100%
 - id: my_yellow
   red: 100%
   green: 100%
   blue: 0%
 - id: my_white
   red: 100%
   green: 100%
   blue: 100%    
 - id: mygrey  
   red: 80%
   green: 80%
   blue: 80%


ESP32 Wiegand

esphome:

 name: esp32-wiegand-test
 friendly_name: esp32-wiegand-test

esp32:

 board: esp32dev
 framework:
   type: arduino
  1. Enable logging

logger:

 level: DEBUG
 logs:
   mqtt.component: DEBUG
   mqtt.client: ERROR
   component: ERROR

web_server:

 port: 80
 version: 2
 
  1. Enable Home Assistant API

api:

 password: !secret api_password

ota:

 platform: esphome
 password: "74253b6265c887a9987a91328080eb08"

wifi:

 networks:
   - ssid: !secret wifi_ssid
   - password: !secret wifi_password
   - ssid: !secret wifi_ssid_3
   - password: !secret wifi_password_3
   - ssid: !secret wifi_ssid_8
   - password: !secret wifi_password_8
 reboot_timeout: 15min
 power_save_mode: none
 use_address: 192.168.1.87
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp32-Wiegand-Test"
   password: !secret ap_password

time:

 - platform: sntp
   id: sntp_time
   servers:
     - 192.168.0.130
   timezone: "Europe/Berlin"
   on_time_sync:
     then:
       - logger.log: "Synchronized system clock"

mqtt:

 id: mqtt_client
 broker: 192.168.1.59
 port: 1883
 username: !secret mqtt_username
 password: !secret mqtt_password
 discovery: True
 reboot_timeout: 1min


captive_portal:

switch:

 - platform: restart
   name: "Reboot"
 - platform: gpio
   name: "LED"
   pin: GPIO02
   id: LED
 
 - platform: gpio
   name: "Relay"
   pin: GPIO13
   id: RELAY

text_sensor:

 - platform: version
   name: "ESPHome Version"
 
 - platform: wifi_info
   ip_address:
     name: ESP IP Address
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
  
 - platform: template
   name: Uptime Human Readable
   id: uptime_human
 - platform: template
   name: "RFID Tag"
   id: rfid_tag
   update_interval: never
 - platform: template
   name: "Card ID"
   id: card_id
   update_interval: never
 - platform: template
   name: "Pin"
   id: pin
   update_interval: never
 
 - platform: template
   name: "PinStaus"
   id: pinstate
   update_interval: never
 - platform: template
   name: "Berechtigung"
   id: berechtigung
   update_interval: 60s
 - platform: template
   name: "Benutzer"
   id: Benutzer
   update_interval: 60s
 - platform: template
   name: "UPTimeSSID"
   id: uptimessid
   update_interval: 60s
 - platform: template
   name: "UPTimeIP"
   id: uptimeip
   update_interval: 60s
 - platform: template
   name: "Date/Time"
   id: datetime 
   lambda: |-
     char str[17];
     time_t currTime = id(sntp_time).now().timestamp;
     strftime(str, sizeof(str), "%Y-%m-%d %H:%M", localtime(&currTime));
     return  { str };
   update_interval: 60s
   

wiegand:

 - id: reader
   d0: GPIO22
   d1: GPIO21
   on_tag:
     - lambda: ESP_LOGD("TEST", "received tag %s", x.c_str());
     - text_sensor.template.publish:
         id: rfid_tag
         state: !lambda 'return x;'
     - text_sensor.template.publish:
         id: card_id
         state: !lambda 'return x;'
     - mqtt.publish:
         topic: esp8266-wiegand-haustuere/RFID-TAG
         payload: !lambda 'return x;'
   on_key:
     - lambda: ESP_LOGD("TEST", "received key %d", x);
   on_raw:
     - lambda: ESP_LOGI("RAW", "received raw %d bits, value %llx", bits, value);
     

key_collector:

 - id: pincode_reader
   source_id: reader
   min_length: 4
   max_length: 4
   end_keys: "#"
   end_key_required: true
   back_keys: "*"
   clear_keys: "C"
   allowed_keys: "0123456789"
   timeout: 5s
   on_progress:
     - logger.log:
         format: "input progress: '%s', started by '%c'"
         args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
   on_result:
     - logger.log:
         format: "input result: '%s', started by '%c', ended by '%c'"
         args: [ 'x.c_str()', "(start == 0 ? '~' : start)", "(end == 0 ? '~' : end)" ]
     - text_sensor.template.publish:
         id: pin
         state: !lambda 'return x;'
     - mqtt.publish:
         topic: esp8266-wiegand-terrasse/Pin
         payload: !lambda 'return x;'
   on_timeout:
     - logger.log:
         format: "input timeout: '%s', started by '%c'"
         args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]


ESP32-C3

esphome:

 name: esp32-c3-001
 friendly_name: esp32-c3-001

esp32:

 board: esp32-c3-devkitm-1
 framework:
   type: arduino
  1. Enable logging

logger:

 level: DEBUG
  1. Enable Home Assistant API

api:

 password: !secret api_password


  1. New

ota:

 platform: esphome
 password: "30834645e0a8f75a6e29fc98df857223"

wifi:

 ssid: !secret wifi_ssid
 password: !secret wifi_password
 # Enable fallback hotspot (captive portal) in case wifi connection fails
 ap:
   ssid: "Esp32-C3-001 Fallback Hotspot"
   password: "L7YYDz7jD0Q7"

time:

 - platform: sntp
   id: sntp_time
   servers:
     - 192.168.0.130
   timezone: "Europe/Berlin"
   on_time_sync:
     then:
       - logger.log: "Synchronized system clock"

web_server:

 port: 80
 version: 2

captive_portal:

sensor:

 - platform: wifi_signal
   name: "WiFi Signal Sensor"
   update_interval: 10s
   on_raw_value:
     then:
       - text_sensor.template.publish:
           id: uptime_human
           state: !lambda |-
             int seconds = round(id(uptime_sensor).raw_state);
             int days = seconds / (24 * 3600);
             seconds = seconds % (24 * 3600);
             int hours = seconds / 3600;
             seconds = seconds % 3600;
             int minutes = seconds /  60;
             seconds = seconds % 60;
             return (
               (days ? to_string(days) + "d " : "") +
               (hours ? to_string(hours) + "h " : "") +
               (minutes ? to_string(minutes) + "m " : "") +
               (to_string(seconds) + "s")
             ).c_str();
 
 - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
   name: "WiFi Signal dB"
   id: wifi_signal_db
   update_interval: 60s
   entity_category: "diagnostic"
 - platform: copy # Reports the WiFi signal strength in %
   source_id: wifi_signal_db
   name: "WiFi Signal Percent"
   filters:
     - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
   unit_of_measurement: "Signal %"
   entity_category: "diagnostic"
   device_class: ""
 - platform: uptime
   name: Uptime    
   id: uptime_sensor
   update_interval: 10s

switch:

 - platform: gpio
   name: "Pin GPIO2"
   pin: GPIO2
   id: PinGPIO2LED
 - platform: restart
   name: "Reboot"

text_sensor:

 - platform: version
   name: "ESPHome Version"
 
 - platform: wifi_info
   ip_address:
     name: ESP IP Address
   ssid:
     name: ESP Connected SSID
   bssid:
     name: ESP Connected BSSID
   mac_address:
     name: ESP Mac Wifi Address
   scan_results:
     name: ESP Latest Scan Results
 
 - platform: template
   name: Uptime Human Readable
   id: uptime_human    
 
 - platform: template
   name: "Date/Time"
   id: datetime 
   lambda: |-
     char str[17];
     time_t currTime = id(sntp_time).now().timestamp;
     strftime(str, sizeof(str), "%Y-%m-%d %H:%M", localtime(&currTime));
     return  { str };
   update_interval: 60s

Tasmota

https://www.engineer-but-still-human.com/der-sonoff-adapter-tasmota-geraete-im-iobroker-einbinden/

ZigBee

ZIGBEE 3.0 USB DONGLE PLUS

https://sonoff.tech/product/diy-smart-switch/sonoff-dongle-plus/

ZigBee CC2652P2

https://shop.codm.de/automation/zigbee/40/zigbee-cc2652p2-tcp-ethernet-coordinator
https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin 
https://www.pusr.com/products/low-cost-ttl-to-ethernet-modules-usr-k6.html
https://github.com/xyzroe/ZigStarGW-MT
https://shop.codm.de/media/pdf/c3/76/5e/codm-zigbee-cc2652p2-tcp-0-2-Datenblatt-Anleitung-1-1.pdf
Update
IP Adresse ändern
192.168.0.6:20108
Auto BSL abwählen
Erase
Write
Verify
anwählen
Start drücken
IEEE
00:12:4B:00:2A:2E:C4:EE

CC2531

lsusb
ttyACM1 / ttyACM0

ls -l /dev/serial/by-id
usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001CDE5891-if00 -> ../../ttyACM1
IOBroker
/dev/serial/by-id usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001CDE5891-if00
(17412) Starting zigbee-herdsman problem : "Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001
zigbee.0	2021-08-27 09:24:25.450	info	(17481) Zigbee started
zigbee.0	2021-08-27 09:24:25.448	info	(17481) Currently no devices.
zigbee.0	2021-08-27 09:24:25.438	info	(17481) --> transmitPower : normal
zigbee.0	2021-08-27 09:24:25.429	info	(17481) Coordinator firmware version: {"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20201127}}
zigbee.0	2021-08-27 09:24:23.431	info	(17481) Installed Version: iobroker.zigbee@1.6.0
zigbee.0	2021-08-27 09:24:23.060	info	(17481) Starting Zigbee npm ...
zigbee.0	2021-08-27 09:24:22.927	info	(17481) starting. Version 1.6.0 in /opt/iobroker/node_modules/iobroker.zigbee, node: v12.22.4, js-controller: 3.3.15
zigbee.0	2021-08-27 09:23:48.341	warn	(17463) Terminated (UNCAUGHT_EXCEPTION): Without reason
zigbee.0	2021-08-27 09:23:48.339	info	(17463) terminating
zigbee.0	2021-08-27 09:23:47.851	info	(17463) Zigbee: disabling joining new devices.
zigbee.0	2021-08-27 09:23:47.847	info	(17463) cleaned everything up...
zigbee.0	2021-08-27 09:23:47.816	error	(17463) SRSP - SYS - osalNvRead after 0,2ms
zigbee.0	2021-08-27 09:23:47.815	error	(17463) Error: SRSP - SYS - osalNvRead after 0,2ms at Timeout._onTimeout (/opt/iobroker/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35) at listOnTimeout (internal/timers.js:554:17)
zigbee.0	2021-08-27 09:23:47.785	error	(17463) unhandled promise rejection: SRSP - SYS - osalNvRead after 0,2ms
zigbee.0	2021-08-27 09:23:47.784	error	(17463) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
zigbee.0	2021-08-27 09:23:47.777	info	(17463) Zigbee started

ConBee 2

CC2652RB

Der CC2652RB hat gegenüber dem CC2652P und dem CC2652R1 einen großen Vorteil. Er besitzt eine 2,4-GHz-Wireless-MCU mit kristalllosem BAW-Resonator
Zu den hervorgehobenen Merkmalen der TI Bulk Acoustic Wave (BAW)-Resonatortechnologie gehören:
• Unübertroffene HF-Leistung mit hochleistungsfähiger Frequenzstabilität (±40 PPM) über die Temperatur (-40 °C bis 85 °C) und volle Betriebsspannung (1,8 V bis 3,8 V), extrem geringer Jitter und Phasenrauschen für verschiedene Anforderungen an die Uhr für drahtlose Kommunikationsstandards.
• Effiziente Entwicklungs- und Produktionszyklen durch Eliminierung der Beschaffung von Quarzoszillatoren und Reduzierung kostspieliger Platinen-Redesigns und Re-Zertifizierung aufgrund externer Kristall-Layout- und Montageprobleme.
• Optimierte Einsparungen bei der Stückliste (BOM) und PCB-Fläche (durchschnittlich 12%).
• Überlegene Langzeit-Taktstabilität und Alterungsleistung (10 Jahre) im Vergleich zu den meisten Standardquarzen Kristall (längste 5 Jahre Alterung) ermöglicht längere Produktlebenszyklen.
• Robuste Vibrations- und mechanische Stoßfestigkeit (3× niedrigere PPM-Varianz gegenüber externem Quarz) reduziert Produktersatzkosten durch externe Quarzfehler und ermöglicht den Betrieb in rauen Umgebungen, wie zB. in Motoren oder schweren Maschinen.
• Abschwächung potenzieller Timing-bezogener Seitenkanalangriffe durch externe Taktmanipulation.
USB Stick CC2652RB ZigBee 3.0 für ZigBee2mqtt, iObroker,  nodeRed, Hassio
Der Coordinator ist für unterschiedlichen SmartHome Server wie Zigbee2MQTT, ioBroker, Home Assistant, Domoticz, FHEM zu verwenden.
Es können bis zu 150 Geräte an einem Stick angemeldet werden, das ist ein Vielfaches mehr als beim CC2531. Neben seiner verbesserten Sendeleistung gegenüber des CC2531 bietet der CC2652RB auch eine stärkere Rechenleistung.
Der Stick wurde auf Funktion im ioBroker geprüft.
Unter ioBroker werden derzeit > 300 (dokumentiert) Geräte von über 70 verschiedenen Anbietern unterstützt (github.com/ioBroker/ioBroker.zigbee/wiki/Supported-devices)
Unterstützte Geräte bei Zigbee2MQTT (www.zigbee2mqtt.io/information/supported_devices.html) 
Neue Firmware Flashen
Firmware
Laden Sie die richtige FW mit der Z-Stack-Firmware 3.x.0 herunter:
von koenkk
KOORDINATOR
(https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin)
ROUTER
(https://github.com/Koenkk/Z-Stack-firmware/tree/develop/router/Z-Stack_3.x.0/bin)
In beiden Fällen benötigen wir die CC2652 **RB- Datei.**
Herunterladen und extrahieren.

Es gibt mehrere Möglichkeiten zum Flashen:
Das serielle Bootload-Tool von JelmerT wird empfohlen
https://awesomeopensource.com/project/JelmerT/cc2538-bsl?mode=desktop&ref_=m_ft_dsk
UniFlash v6.xx oder höher!
Das Flash-Tool von TI SmartRF Flash Programmer2
Verwendung eines JTAG-Programmer

simpleAPI

https://www.smarthome-tricks.de/software-iobroker/iobroker-simple-api-adapter/
http://ipaddress:8087/help
http://192.168.0.83:8087/help
{
getPlainValue: "http://192.168.0.83:8087/getPlainValue/stateID",
get: "http://192.168.0.83:8087/get/stateID/?prettyPrint",
getBulk: "http://192.168.0.83:8087/getBulk/stateID1,stateID2/?prettyPrint",
set: "http://192.168.0.83:8087/set/stateID?value=1&prettyPrint",
toggle: "http://192.168.0.83:8087/toggle/stateID&prettyPrint",
setBulk: "http://192.168.0.83:8087/setBulk?stateID1=0.7&stateID2=0&prettyPrint",
setValueFromBody: "http://192.168.0.83:8087/setValueFromBody?stateID1",
objects: "http://192.168.0.83:8087/objects?pattern=system.adapter.admin.0*&prettyPrint",
states: "http://192.168.0.83:8087/states?pattern=system.adapter.admin.0*&prettyPrint",
search: "http://192.168.0.83:8087/search?pattern=system.adapter.admin.0*&prettyPrint",
query: "http://192.168.0.83:8087/query/stateID1,stateID2/?dateFrom=2019-06-06T12:00:00.000Z&dateTo=2019-06-06T12:00:00.000Z&noHistory=false&prettyPrint"
}


get

import requests
url = "http://192.168.0.83:8087/get/0_userdata.0.Test.Test_001/&prettyPrint"
payload={}
headers = 
{
'Content-Type': 'text/html'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)

set

import requests
url = "http://192.168.0.83:8087/set/0_userdata.0.Test.Test_001/?value=100&prettyPrint"
payload={}
headers = 
{
'Content-Type': 'text/html'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)


set/get

import json
import requests
#       0_userdata.0.Test.Test_001
url = "http://192.168.0.83:8087"
point = "0_userdata.0.Test.Test_001/"
cmd = "/get/"
pp = "&prettyPrint"
apiurl_1 = url + cmd + point  + pp
print(apiurl_1)
headers = {'Content-Type': 'text/html'}
payload={}
#Making http post request
response = requests.request("GET", apiurl_1, headers=headers, data=payload)
print(response.json())
cmd = "/set/"
value = "?value=700"
apiurl_2 = url + cmd + point + value  + pp
print(apiurl_2)
payload={}
response = requests.request("GET", apiurl_2, headers=headers, data=payload)
print(response.json())
response = requests.request("GET", apiurl_1, headers=headers, data=payload)
print(response.json())

rest

0_userdata.0.Auto.Corolla.ToyotaAPI.JSON
http://192.168.0.83:8087/get/0_userdata.0.Auto.Corolla.ToyotaAPI.JSON/?prettyPrint
{
val: {
ack: false
},
ack: false,
ts: 1639638323318,
q: 0,
c: "script.js.common.Skript_1",
from: "system.adapter.admin.0",
user: "system.user.admin",
lc: 1639638524759,
common: {
name: "JSON",
desc: "Manuell erzeugt",
role: "state",
type: "json",
read: true,
write: true
},
type: "state",
_id: "0_userdata.0.Auto.Corolla.ToyotaAPI.JSON",
acl: {
object: 1636,
state: 1636,
owner: "system.user.admin",
ownerGroup: "system.group.administrator"
}
}
http://192.168.0.83:8087/set/0_userdata.0.Auto.Corolla.ToyotaAPI.JSON/?value=100&prettyPrint
http://192.168.0.83:8087/get/0_userdata.0.Auto.Corolla.ToyotaAPI.JSON/?prettyPrin

Tuya Integration

Integration in Home Assistant

https://iot.tuya.com/
https://www.home-assistant.io/integrations/tuya/#configuration-of-the-tuya-iot-platform

Integration in HomeBridge

https://www.simon42.com/homebridge-smart-life/

Integration in IO-Broker

Fehlerbeseitigung

Backup Fehler CIFS

https://www.youtube.com/watch?v=15UbdMcZmp8


USB Devices im ioBroker Docker Container nutzen

https://smarthome.buanet.de/2020/02/usb-devices-im-iobroker-docker-container-nutzen/

Install Python3 Pip

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip.

Redis DB

iob setup custom
Current configuration:
Objects database:
Type: jsonl
Host/Unix Socket: 127.0.0.1
Port: 9001
States database:
Type: redis
Host/Unix Socket: 172.17.0.5
Port: 6379
Data Directory: ../../iobroker-data/
Host name: e0f8c02b332d


Speicher aufräumen

du -h --max-depth=1 /var/lib | sort -hr
sudo apt clean
sudo apt autoclean
npm cache clean --force
sudo apt install ncdu
sudo ncdu /var/lib/docker/overlay2