[OBSOLETE] KuKu Mi - supports 'Xiaomi Universal IR Remote’

‘KuKu Mi’ Install Guide

‘KuKu Mi’ project consists of DTH and SmartApp and API server.

It makes SmartThings to control Xiaomi product.
(Currently supports ‘Xiaomi Universal IR Remote’)

0. Preparing

To use ‘KuKu Mi’, need below environments.

  • Register ‘Mi Remote’ device at ‘MiHome’ application
  • ‘Docker’ system tool
  • NAS or Micro or Mini Server

1. Install ‘KuKu Mi’ Daemon

1-1) ‘KuKu Mi’ Docker Image download

[X86 Platform]
# docker pull turlvo/kukumi

or

[ARM Platform]
# docker pull turlvo/kukumi-rasp

1-2) Execute ‘KuKu Mi’ API server by running container

[X86 Platform]
# docker run --name=KuKuMi --net=host turlvo/kukumi

or

[ARM Platform]
# docker run --name=KuKuMi --net=host turlvo/kukumi-rasp

1-3) Enable auto run ‘KuKu Mi’ container when rebooted (Optional)

# sudo vim /etc/systemd/system/kukumi.service

<kukumi.service File content>

[Unit]
Description=KuKuMi container
Requires=docker.service
After=docker.service

[Service]
Restart=always
ExecStart=/usr/bin/docker start -a KuKuMi
ExecStop=/usr/bin/docker stop -t 2 KuKuMi

[Install]
WantedBy=multi-user.target
# sudo systemctl enable /etc/systemd/system/kukumi.service

2. Setting of ‘Mi Remote’ at ‘KuKu Mi Web server’

2-1) Connect to ‘http://[KuKu Mi api Server’s IP]:8484/miremote’ using Web browser

2-2) Add a ‘Mi Remote’ device (Discover or Manual)
(Should not contain’s space in the name field)


2-3) Add a commands by learning or add a commands by manually
(Should not contain’s space in the name field)


2-4) Added devices and commands screenshot

3. Installation of ‘KuKu Mi’ DTH and SmartApp at ST IDE

3-1) Add ‘KuKu Mi’ DTH in ST IDE

3-2) Add a ‘KuKu Mi’ SmartApp in ST IDE

GitHub Repository Integration
- Owner : turlvo
- Name : KuKuMi
- Branch : master

4. Installation of ‘KuKu Mi’ SmartApp at SmartThings Application

4-1) Install ‘KuKu Mi’ SmartApp

  • ‘Add a SmartApp’ → ‘My SmartApp’ → select a ‘KuKu Mi’

  • Input server’s IP (KuKuMi-api server is running)
    ex) 192.168.1.137:8484
  • Select ‘Save’ to complete installation

4-2) Add a device at ‘KuKu Mi’ SmartApp

  • ‘Automation’ → ‘SmartApps’ → ‘KuKu Mi’
  • ‘Add a device…’
  • Enter ‘Xiaomi Device Type’

  • Select ‘Mi Remote’
  • Enter ‘Xiaomi Device’
  • Select your Mi Remote device (added in KuKu Mi Web Server)

  • Enter ‘device name’ that you want
  • Enter ‘DTH Type’ and select DTH that you want to install

  • Select to ‘Next’ to set up command
  • Mapping your command to button (added in KuKu Mi Web Server)

  • If you want synchronize device state by Plug and Contact Sensor,
    configure ‘State Monitor’ menu
  • To complete adding device, 'select ‘Save’ button
  • You can confirm added device

4-3) Installed Device Screenshot(Custom DTH)

6 Likes

I’m sorry…Mi Remote? as in the Android App? That would require you to have your phone pointed at your TV and to have a phone with an IR blaster on it, right? Maybe I’m missing something here.

The ‘Mi Remote’ is a IR blaster device made by Xiaomi like a Logitech Harmony.

1 Like

Awesome alternative to Harmony (which is limited in its functionality) and the Broadlink Rm. Right on the same price point as the Broadlink.

2 Likes

Ok, props on the heavy documentation! However, I’m a bit confused… how do you program remotes/commands? Does the smart app just allow you to use remotes you configured in the ios/android app or can you capture commands and build remotes in the smartapp? Also, how many devices can you control? (Harmony has a laughably low 8… can this go higher?)

Hello, @preuninger,

I made this tool by using miio library.
Almost function is worked in kukumi-api server and ‘Xiaomi Universal IR Remote’.
For example, the server send ‘learn’ command to ‘Xiaomi Universal IR Remote’ device,
and read learned command from ‘Xiaomi Universal IR remote’ device by using miio libary and save itself database.
Also server sends command to device and device that received ‘send’ command sends IR signal.

Because ll learned commands are saved in api sever’s database,
I think that there is no limitation of number of commands.
(It does not depend on device, it just learns any IR command and send learned IR command)

Thank you.

How do you install Xiaomi BT thermometer on ARM?