Skip to content

Search the documentation

Kit
Firmware

Smart Home Wi-Fi setup

The Smart Home uses your Wi-Fi. The MoBot app, your computer and your programs all talk to the house over that network. You tell the house your Wi-Fi once, from the app, and it remembers it.

  1. Switch the house on and look at its screen. With no saved Wi-Fi, the screen shows the MoBot logo and, at the bottom, a line like ID ab12 btn=OK. The four characters after ID are the id of this house, and ab12 is only an example. The same four characters end the house’s Bluetooth name, MoBot-IOT-ab12.
  2. In the MoBot app, choose Connect the house. Allow Bluetooth when your phone asks, because the house is found over Bluetooth the first time. Type the name and the password of your Wi-Fi. The house only joins 2.4 GHz networks. If your router makes two networks, pick the one without “5G” in its name.
  3. If the app shows a list of houses, tap the one whose id matches the id on your house’s screen.
  4. When the app says Press the button on your house, press the button on the board once and let go. The house only accepts Wi-Fi from your phone after you press its own button, so that the wrong phone cannot set up a house in a room full of houses. It listens for one minute after the press. Do not hold the button for five seconds: that makes the house forget its Wi-Fi.
  5. Wait while the house joins. It can take about fifteen seconds. When it works, the screen shows the MoBot logo with the house’s address at the bottom, for example 192.168.1.20.

The app’s wording can change a little between versions.

The house joins your saved Wi-Fi by itself, and it does not start Bluetooth setup. It remembers up to four networks, the newest first. If it has saved more than one, it looks around once and tries the strongest one it can see first.

As soon as the house is on Wi-Fi, it starts its own web page. See Your own web page.

The house goes back to its setup screen, the logo with a line like ID ab12 btn=OK. It may show WiFi failed and hold btn 5s for a moment first. The house keeps its saved networks and keeps trying them in the background while it waits for setup, the first time after 10 seconds and then every 30 seconds. So a router that starts slowly after a power cut is not a problem: wait a minute.

If the network is gone for good, set up a new one as above. A new network is added to the saved ones, up to four.

Hold the button on the board for 5 seconds. The screen shows WiFi reset and rebooting.... The house forgets every saved network and restarts, and then it waits for setup like the first time.

A program can forget networks too: home.wifi.forget() forgets all of them, and home.wifi.forget("MyNetwork") forgets one by name. It only forgets. It does not restart the house.

home.wifi has six calls.

Call What you get
home.wifi.is_connected() True when the house is on Wi-Fi with an address.
home.wifi.ip() The house’s address as text, such as "192.168.1.20", or None.
home.wifi.hostname() The house’s name on the Wi-Fi network.
home.wifi.house_id() The four characters that name this house, the end of MoBot-IOT-xxxx.
home.wifi.networks() The names of the networks the house remembers, newest first. Never their passwords.
home.wifi.forget(ssid=None) Forgets one network by name, or all of them when you give no name.

The house’s name on the Wi-Fi network looks like mobot-iot-ab12, with the same four characters as its id.

if home.wifi.is_connected():
print("The house is at", home.wifi.ip())
else:
print("The house is not on Wi-Fi")
print("This house is", home.wifi.house_id())
print("Saved networks:", home.wifi.networks())

On 2.x, only connected() has a different name. The other calls are named the same. The reference page for each call is Wifi.