Sonoff 4Ch R2 Pro - wifi problem

Have a Sonoff 4Ch R2 Pro and can flash it per instructions on my house wifi ssid “Web-Cube”.

Once I have it up an running / configured, I need to move it to my shed which has a different ssid “WebCube”.

I change the ssid of the config yaml and use the OTA Esphome dashboard to upload and change the ssid for the sonoff. However this will not work despite having done a similar procedure with an ESP32.

Is it possible to change the ssid of a sonoff (ESP8266) via OTA?

sonoff.yaml

esphome:
  name: sonoff4ch
  platform: ESP8266
  board: esp01_1m

wifi:
  domain: .local
  ssid: WebCube
  password: pass123
  manual_ip:
    static_ip: 192.168.1.201
    gateway: 192.168.1.1
    subnet: 255.255.255.0

api:

logger:

ota:

binary_sensor:
- platform: gpio
  pin:
    number: GPIO0
    mode: INPUT_PULLUP
    inverted: True
  name: "Sonoff 4CH Button 1"
  on_press:
    - switch.toggle: relay_1
- platform: gpio
  pin:
    number: GPIO9
    mode: INPUT_PULLUP
    inverted: True
  name: "Sonoff 4CH Button 2"
  on_press:
    - switch.toggle: relay_2
- platform: gpio
  pin:
    number: GPIO10
    mode: INPUT_PULLUP
    inverted: True
  name: "Sonoff 4CH Button 3"
  on_press:
    - switch.toggle: relay_3
- platform: gpio
  pin:
    number: GPIO14
    mode: INPUT_PULLUP
    inverted: True
  name: "Sonoff 4CH Button 4"
  on_press:
    - switch.toggle: relay_4
- platform: status
  name: "Sonoff 4CH Status"

switch:
- platform: gpio
  name: "Sonoff 4CH Relay 1"
  pin: GPIO12
  id: relay_1
- platform: gpio
  name: "Sonoff 4CH Relay 2"
  pin: GPIO5
  id: relay_2
- platform: gpio
  name: "Sonoff 4CH Relay 3"
  pin: GPIO4
  id: relay_3
- platform: gpio
  name: "Sonoff 4CH Relay 4"
  pin: GPIO15
  id: relay_4

output:
- platform: esp8266_pwm
  id: blue_led
  pin: GPIO13
  inverted: True

light:
- platform: monochromatic
  name: "Sonoff 4CH Blue LED"
  output: blue_led

I run into this when replacing my router, maybe it’ll work for you.

I had to reconnect my old router and add BOTH SSIDs for the old and new routers. See here under Connecting to Multiple Networks

Then I uploaded with old router, swapped to new router and it connected.
Then edit the YAML and remove the old SSID (not really necessary).

If I’d known about this in advance, I would have added both SSIDs before removing old router

Give this a try - Add both SSIDs and passwords and it will connect to either, once connected to new one, remove the old SSID so it won’t connect to it.

wifi:
  networks:
  - ssid: Web-Cube
    password: pass123
  - ssid: WebCube
    password: pass123
  manual_ip:
    static_ip: 192.168.1.201
    gateway: 192.168.1.1
    subnet: 255.255.255.0
1 Like

Thanks, will try that!

Wasn’t the solution but a very useful config where you have multiple ssids

Turns out it was the DD-WRT firmware running on an old Asus router.
Needed to disable WMM in the router, reboot and it connected.
Some background.
https://github.com/arendst/Sonoff-Tasmota/issues/5050

An ESP32 connected ok but the Sonoff ESP8266 did not like WMM.

Thanks again.