Code Monkey home page Code Monkey logo

kukumi's Introduction

'KuKu Mi'

'KuKu Mi' project consists of DTH and SmartApp and API server.

It makes SmartThings supports Xiaomi products.

  • Mi Remote

  • Xiaomi BT Temperature / Humidity Sensor

'KuKu Mi' Architecutre

0. Preparing

To use 'KuKu Mi', need below environments.

- Common

  • 'Docker' system tool
  • NAS or Micro or Mini Server

- Mi Remote

  • Registered 'Mi Remote' device at 'MiHome' application

- Xiaomi BT Temperature / Humidity Sensor

  • BT dongle for Xiaomi BT Temperature / Humidity Sensor (if there is no WiFi/BT module in system)
  • Aduino(ESP32s) to exetend BT coverage Arduino Installation

1. Install 'KuKu Mi' Server

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 --privileged --net=host turlvo/kukumi

or

[ARM Platform] (Xiaomi BT version is not released)
# docker run --name=KuKuMi  --privileged --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/' using Web browser

2-2) Add a 'Mi Remote' device (Discover or Manual)

2-3) Add a commands by learning or add a commands by manually

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

https://github.com/turlvo/KuKuMi

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)

kukumi's People

Contributors

turlvo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kukumi's Issues

Make usage for home Assistant

Dear author.. nice server ..how could we make use of it with home Assistant? I'd like to extend this with esp32 and use this server to read out the ble temperature sensors..any idea, there's an API bit I dunno how I could connect this to my home Assistant system

Any ideas are welcome ;)

This never works!

I use your code and just removed the LCD and pubsub code.

This is the output:

Advertised Device: Name: MJ_HT_V1, Address: 58:2d:34:34:0f:a1, serviceUUID: 0000180f-0000-1000-8000-00805f9b34fb
Payload:fe95c12d3f3acea2
Found device count : 4
Start BLE scan for 60 seconds...


Advertised Device: Name: MJ_HT_V1, Address: 58:2d:34:34:0f:a1, serviceUUID: 0000180f-0000-1000-8000-00805f9b34fb
Payload:fe95c12d3f3acea2
Found device count : 4
Start BLE scan for 60 seconds...


Advertised Device: Name: MJ_HT_V1, Address: 58:2d:34:34:0f:a1, serviceUUID: 0000180f-0000-1000-8000-00805f9b34fb
Payload:fe95c12d3f3acea2
Found device count : 4
Start BLE scan for 60 seconds...


strServiceData.length() is always 6. How can this work?

CPU usage

I have the Kukumi running on a docker on a Raspberry Pi 3, and I see when I use "top" command that Kukumi python script is using between 8-10% CPU usage consistently.
I'm wondering if there's anything we can do to optimize this.

API request...

Can you help me please? After I add a Xiaomi HT how can I get the temperature data and hummidity which url? how? Also on Xiaomi BT settings the ST IP Address: what is that? which IP needs to fill there?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.