IO-Broker: Unterschied zwischen den Versionen

Aus
Wechseln zu: Navigation, Suche
(ZigBee)
 
(37 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 61: Zeile 61:
 
  sudo iobroker upgrade self
 
  sudo iobroker upgrade self
 
  sudo iobroker start
 
  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 ==
 
== Nodejs ==
Zeile 232: Zeile 249:
 
=== Fujitsu ===
 
=== 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 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 ===
 
=== 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 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:
 
  Portweiterleitungen:
Zeile 252: 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 273: 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 313: Zeile 351:
 
  Damit ist die Multihost-Verbindung fertig.
 
  Damit ist die Multihost-Verbindung fertig.
  
 +
=== 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
 +
 +
 +
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 ==
 
== ESP-Easy ==
Zeile 324: Zeile 381:
  
 
== ESPHome ==
 
== 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 ===
 
=== Fonts ===
 
 
  /opt/iobroker/iobroker-data/esphome.0/fonts
 
  /opt/iobroker/iobroker-data/esphome.0/fonts
  
Zeile 384: Zeile 454:
 
     name: "Relay"
 
     name: "Relay"
 
     pin: <PIN_RELAY_IS_CONNECTED_TO>
 
     pin: <PIN_RELAY_IS_CONNECTED_TO>
 +
 +
 +
=== ESP8266 ===
 +
esphome:
 +
  name: esp8266-relais-dht-btn
 +
 +
esp8266:
 +
  board: d1_mini
 +
  framework:
 +
    version: recommended
 +
       
 +
# Enable logging
 +
logger:
 +
  level: verbose
 +
  logs:
 +
    mqtt.component: DEBUG
 +
    mqtt.client: ERROR
 +
    component: ERROR
 +
 +
# 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
 +
 +
# Enable logging
 +
logger:
 +
  level: VERBOSE
 +
 +
# 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
 +
 +
# 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
 +
   
 +
# 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
 +
 +
# Enable logging
 +
logger:
 +
  level: DEBUG
 +
  logs:
 +
    mqtt.component: DEBUG
 +
    mqtt.client: ERROR
 +
    component: ERROR
 +
 +
web_server:
 +
  port: 80
 +
  version: 2
 +
 
 +
# 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
 +
 +
# Enable logging
 +
logger:
 +
  level: DEBUG
 +
 +
# Enable Home Assistant API
 +
api:
 +
  password: !secret api_password
 +
 +
 +
# 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 ==
 
== Tasmota ==
Zeile 394: Zeile 1.638:
 
  https://sonoff.tech/product/diy-smart-switch/sonoff-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 ===
 
=== CC2531 ===
Zeile 599: Zeile 1.862:
 
== 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 ==
 +
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

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