In Gladys, the first thing that you have to do is to configure your house. You need to declare each room in Gladys.
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:
- Start the app
- Define your region to “Mainland China” when creating your account.
- Connect all your devices.
- Finally, upgrade the firmware.
Open the gateway by clicking on its icon. Follow the steps:
Click on the 3 dots.
Click on “About”
Click multiple time on the red zone to display additionnal menus.
First menu will bring you to step 5, second menu to step 6.
Activate the developer mode with the button, keep the password, then validate “ok”.
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!
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.
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:
Click on settings:
Select “HTTP”, and in the “URL” input, enter:
DeviceID input, you can put anything you want (those fields are mandatory).
I put “iphone” for the
DeviceID, and “pierre-gilles” for the
Gladys uses the API key to identify who is making the request.
See your location in Gladys
You should see your location in Gladys in the “Maps” tab.
Flash with Tasmota firmware
Follow instructions on Sonoff-Tasmota installation user guide.
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.