Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
    • APC Back-UPS ES 700G
    • ARM
    • AVM
    • AX88772A Fast Ethernet USB Adapter
    • AXIS M1144-L
    • Adaptec RAID controller
    • Android
    • Archive
    • Bionx
    • Bluetooth
    • Brother
    • Cisco
    • DCPMM / NVRAM
    • Dell
    • ESP32 / ESP8266
    • HP (Hewlett Packard)
    • IPMI
    • Intel NVMe
    • LSI MegaRAID
    • Lenovo ThinkPad
    • Linpack
    • Linux Benchmark
    • Logitech Squeezebox Touch
    • Logitech
    • Mellanox
    • Micron
    • NVMe
    • OpenWRT
    • RaLink RT2500
    • Raspberry Pi
    • SmartHome
    • Snom 320 / 370
    • Solar
    • Sonoff Mini R2
    • Supermicro
    • Surface
    • TEMPer (usb temperatur)
    • USB Serial adapter
    • Ubiquiti
    • Update Intel NIC firmware
    • Yamaha
    • ZyXEL NSA320
    • ahoy DTU
    • batteries
    • hdparm
    • iDRAC
    • memtest86+
    • smartmontools
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • esphome
  • hardware
  • smarthome

Configuration

esphome:
  name: mini-r2
  friendly_name: Sonoff Mini R2

esp8266:
  board: esp01_1m        # Mini R2 = ESP8285, 1 MB flash

logger:
  baud_rate: 0

wifi:
  ssid: !secret wifi_ssid_2
  password: !secret wifi_password_2
  # manual_ip:
  #   static_ip: ${device_ip}
  #   gateway: 192.168.x.x
  #   subnet: 255.255.255.0
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "ESPHOME"
    password: "12345678"

api:
  reboot_timeout: 15min
  # encryption:
  #   key: !secret api_encryption_key

ota:
  platform: esphome
  # password: !secret ota_password

# the web_server & sensor components can be removed without affecting core functionaility.

web_server:
  port: 80

sensor:
  - platform: wifi_signal
    name: ${device_name} Wifi Signal Strength
    update_interval: 60s
  - platform: uptime
    name: ${device_name} Uptime

#######################################
# Device specific Config Begins Below #
#######################################

binary_sensor:
  - platform: gpio
    pin: GPIO00
    id: reset
    internal: true
    filters:
      - invert:
      - delayed_off: 10ms
    on_press:
      - switch.toggle:
          id: relay_1

  - platform: gpio
    name: ${device_name}_status
    pin: GPIO04
    id: switch_1
    on_press:
      then:
        - switch.toggle:
            id: relay_1
    on_release:
      then:
        - switch.toggle:
            id: relay_1

switch:
  - platform: gpio
    name: ${device_name}_switch
    icon: "mdi:lightbulb_outline"
    pin: GPIO12
    id: relay_1
    restore_mode: restore_default_off

status_led:
  pin:
    number: GPIO13
    allow_other_uses: true
    inverted: true

output:
  - platform: esp8266_pwm
    id: blue_led
    pin:
      number: GPIO13
      allow_other_uses: true
    inverted: True

light:
  # the 4 lines below define the Blue LED light on Sonoff Mini, to expose in HomeAssistant remove line "internal: true"
  - platform: monochromatic
    name: ${device_name}_blueled
    output: blue_led
    internal: true # hides the Blue LED from HomeAssistant

Configuration

source esphome/bin/activate
esphome run sonoff_mini_r2.yaml --device 192.168.178.51

Links
https://community.home-assistant.io/t/flash-sonoff-minir2-firmware-3-6-0-with-esphome-over-the-air/311042
https://community.home-assistant.io/t/flash-sonoff-minir2-firmware-3-6-0-with-esphome-over-the-air/311042
https://devices.esphome.io/devices/sonoff-mini-relay/

Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung