Configure multiple WiFi networks

In an earlier Mongoose OS release it was possible to configure multiple WiFi networks. The ESP8266 tries these networks one by one and store the latest config for quicker startup.

I tries it with an older app and checked the configuration. But somehow it is not working… Only the first network config is used; all other configs are ignored.

Do you see a mistake or anything missing?

config_schema:
  - ["wifi", "o", {hide: true}]
  - ["wifi.ap", "o", {title: "WiFi Access Point Config"}]
  - ["wifi.ap.enable", "b", false, {title: "WiFi AP mode"}]
  - ["wifi.sta", "o", {title: "WiFi Station Config"}]
  - ["wifi.sta.ssid", "s", "ssid1111", {title: "WiFi station SSID"}]
  - ["wifi.sta.pass", "s", "pass1111", {title: "WiFi station pass"}]
  - ["wifi.sta.enable", "b", true, {title: "WiFi station mode"}]
  - ["wifi.sta1", "wifi.sta", {title: "WiFi Station Config 1"}]
  - ["wifi.sta1.ssid", "s", "ssid2222", {title: "WiFi station SSID"}]
  - ["wifi.sta1.pass", "s", "pass2222", {title: "WiFi station pass"}]
  - ["wifi.sta1.enable", "b", true, {title: "WiFi station mode"}]
  - ["wifi.sta2", "wifi.sta", {title: "WiFi Station Config 2"}]
  - ["wifi.sta2.ssid", "s", "ssid3333", {title: "WiFi station SSID"}]
  - ["wifi.sta2.pass", "s", "pass3333", {title: "WiFi station pass"}]
  - ["wifi.sta2.enable", "b", true, {title: "WiFi station mode"}]

Do not redefine the config:

config_schema:
  - ["wifi.ap.enable", false]

  - ["wifi.sta.ssid", "ssid1111"]
  - ["wifi.sta.pass", "pass1111"]
  - ["wifi.sta.enable", true]

  - ["wifi.sta1.ssid", "ssid2222"]
  - ["wifi.sta1.pass", "pass2222"]
  - ["wifi.sta1.enable", true]

  - ["wifi.sta2.ssid", "ssid3333"]
  - ["wifi.sta2.pass", "pass3333"]
  - ["wifi.sta2.enable", true]

Thanks!

Perhaps this file could be updated accordingly…

No.
That file is ok. It defines the config.

Then I don’t get it… That file exactly contains the lines that you suggested to remove - after removing it works.