Configuration

In Gladys, the first thing that you have to do is to configure your house. You need to declare each room in Gladys.


Configure Xiaomi devices

Activate developer mode

Activating developer mode allows Gladys to access Xiaomi API.

You first need to install the “Mi Home” application to activate the developer mode:

Xiaomi icon

  • Start the app
  • Define your region to “Mainland China” when creating your account.
  • Connect all your devices.
  • Finally, upgrade the firmware.

The Gateway

Open the gateway by clicking on its icon. Follow the steps:

Step 1

Xiaomi Tuto 2

Click on the 3 dots.

Step 2

Xiaomi icon

Click on “About”

Step 3

Xiaomi icon

Click multiple time on the red zone to display additionnal menus.

Step 4

Xiaomi icon

First menu will bring you to step 5, second menu to step 6.

Step 5

Xiaomi icon

Activate the developer mode with the button, keep the password, then validate “ok”.

Step 6

Xiaomi icon

In this menu, you’ll find the mac address of your gateway, its sid, useful to link the password you got in the previous step to the gateway (if you have several gateway, it can be useful).

You are now ready to integrate your Xiaomi devices in Gladys!


Configure Owntracks with Gladys Plus

Owntracks is an open-source mobile app which sends the phone location to a server, periodically.

Gladys Plus allows you to receive Owntracks message and create location in Gladys.

Download Owntracks

First download Owntracks on iOS or Android.

Create an API key in Gladys Plus

Go to plus.gladysassistant.com, connect.

Then go to “settings” => “Open API”, and create a key.

Go to Owntracks

Click on the button in the top-left corner:

Open API owntracks Gladys

Click on settings:

Open API owntracks Gladys

Select “HTTP”, and in the “URL” input, enter:

https://api.gladysgateway.com/v1/api/owntracks/[YOUR-API-KEY]

In the UserID and DeviceID input, you can put anything you want (those fields are mandatory).

I put “iphone” for the DeviceID, and “pierre-gilles” for the UserID.

Gladys uses the API key to identify who is making the request.

Open API owntracks Gladys

See your location in Gladys

You should see your location in Gladys in the “Maps” tab.


Configure Sonoff devices

Flash with Tasmota firmware

Follow instructions on Sonoff-Tasmota installation user guide.

Configure device

Once flashed with new firmare, go to the device web page and configure MQTT as describe at Sonoff-Tasmota MQTT configuration.

Enter your MQTT broken information and fill the Topic field with the expected unique device identifier.

Once saved, go back to Gladys -> Integration -> Sonoff -> Discover devices page and you should see your new device.