Integration of Xiaomi SmartMi Evaporative Humidifier with Loxone (How-To)

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • TomekWaw
    LoxBus Spammer
    • 25.07.2019
    • 428

    Integration of Xiaomi SmartMi Evaporative Humidifier with Loxone (How-To)

    Hi,
    I’ve managed to integrate Xiaomi Evaporative Humidifier with Loxone. This is a no-fog, no-mist, no-ultrasound device that costs ~120 EUR and doesn’t need new filter every N months. Has a large 4L water container and is recommended for rooms up to 40m2. This integration is made with ioBroker and MQTT Gateway, both run on LoxBerry.

    This is how the device looks like. 22x22cm footprint (same as Xiaomi Air Purifier 3H, just ~1/3 lower):

    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 01_smartmi_humi1.jpg
Ansichten: 1792
Größe: 30,7 KB
ID: 241589

    You may pour water in straight through the grilles on top. Device has a water level sensor and it’s available over API. There are some plates inside that rotate and a fan that pushes humidified air out:

    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 02_smartmi_humi2.jpg
Ansichten: 1554
Größe: 67,1 KB
ID: 241590


    This is how it looks in the Loxone app:

    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 03_app_screen1.png
Ansichten: 1481
Größe: 74,0 KB
ID: 241591


    Tracker shows last 40 devices status changes. Water level field has statistics enabled. Average level over 1 hours is enough to see water consumption rate:

    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 04_app_screen2+3.png
Ansichten: 1440
Größe: 141,2 KB
ID: 241592


    Maintenance Counter shows current run time and total run time. I use it to see when I should clean the plates in fresh water (or put them to dishwasher). As I’ve created own automation, I made a switch to disable it in case I wanted to set specific mode permanently. There is also a pause switch that actually powers device off and locks my custom automation. Status field is updated over MQTT so pressing physical button on the device or using Xioami Home app results in instant status change in Loxone app.

    Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 05_app_screen4+5.png
Ansichten: 1469
Größe: 102,0 KB
ID: 241593


    (Post 1 of 3)
    Noch ein oder zwei Jahre mit Loxone und ich werde Deutsch sprechen
  • TomekWaw
    LoxBus Spammer
    • 25.07.2019
    • 428

    #2
    Diagram #1 – basic device operations. Mainly data monitoring and mode control:

    Click image for larger version  Name:	07_diagram_1.png Views:	0 Size:	100.1 KB ID:	241595


    The same diagram #1 but with shown configuration of non-obvious blocks:

    Click image for larger version  Name:	08_diagram_1b.png Views:	0 Size:	165.7 KB ID:	241596



    Diagram #2. I’m not sure if I should be proud or ashamed of myself 🤣😂 I won’t even try to describe what it does, next screen clarifies 😉

    Click image for larger version  Name:	09_diagram_2.png Views:	0 Size:	139.2 KB ID:	241597


    So I came up with such an algorithm for now (see table below). I use different device modes (Levels 1, 2, 3) depending on Loxone operating mode and current average humidity in the living room. I don't know if it will work well in the long run – I will find out. The control is done with pulses, so if I find current mode to loud I able to manually change it to other and it stay until conditions change (humidity range or operating mode)

    Click image for larger version  Name:	10_diagram_2b.png Views:	0 Size:	166.1 KB ID:	241598


    (Post 2 of 3)
    Zuletzt geändert von TomekWaw; 23.03.2020, 21:10.
    Noch ein oder zwei Jahre mit Loxone und ich werde Deutsch sprechen

    Kommentar

    • TomekWaw
      LoxBus Spammer
      • 25.07.2019
      • 428

      #3
      Internals. It was pretty easy this time since I’ve found an ioBroker adapter that worked out of the box:

      Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 10_iobroker1.png
Ansichten: 1593
Größe: 166,1 KB
ID: 241600


      Configuration requires device IP and token. Obtaining token is not the easiest task but there are some good manuals on the net.
      Another challenge is if you have Chinese/ untrusted IoT devices in a separate VLAN. Miio discover doesn’t work then and ioBroker won’t see your Xiaomi device.
      I overcame that issue creating a virtual IP within my IOT VLAN and configuring outbound NAT for ioBroker to that virtual IP for all udp/54321 connections to Xiaomi device.


      Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 10_iobroker2.png
Ansichten: 1442
Größe: 84,2 KB
ID: 241601


      After successful connection humidifier is shown in the list of objects. The rest is easy - configure MQTT-client settings for all relevant objects then add appropriate subscriptions to MQTT Gateway plugin on Loxberry

      Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 12_iobroker3.png
Ansichten: 1475
Größe: 144,6 KB
ID: 241602


      Summary of MQTT topics I’ve used in integration shown above:
      Klicke auf die Grafik für eine vergrößerte Ansicht

Name: 13_mqtt_topics.png
Ansichten: 1476
Größe: 78,9 KB
ID: 241603
      Noch ein oder zwei Jahre mit Loxone und ich werde Deutsch sprechen

      Kommentar

      • Rou90
        Azubi
        • 13.11.2020
        • 1

        #4
        Hi Tomek, I'm looking forward to buying this model but I have doubts... How does it compare with this Levoit humidifier? Thanks

        Kommentar

        • TomekWaw
          LoxBus Spammer
          • 25.07.2019
          • 428

          #5
          I'm pretty much satisfied with this device.
          Noch ein oder zwei Jahre mit Loxone und ich werde Deutsch sprechen

          Kommentar

          Lädt...