Mi(Xiaomi) Smart home bindings?

here is it what I´m I´m trying to do:

  1. I issue a voice command to google home assistant to “arm home alarm”
  2. IFTTT triguers a command to Openhab2 to the xiaomi home gateway item to arm the gateway alarm

I don’t know about the google home thing, but I program the alarm myself:

  1. set a dummy item as alarm.
  2. make a rule, e.g. if movement or door open (see http://docs.openhab.org/addons/bindings/mihome/readme.html)
    then sound the alarm, like the documentation also says:

e.g. (generic code that properly don’t work)

rule "Xiaomi Motion Sensor"
when
    Item MotionSensor_MotionStatus changed
then
if (MotionSensor_MotionStatus.state == ON) {
  if(DumyAlarmItem.state == ON) {
    sendCommand(Gateway_SoundVolume, 2)
    sendCommand(Gateway_Sound, 11)
    Thread::sleep(2000) /* play for 2 seconds */
    sendCommand(Gateway_Sound, 10000)
    sendCommand(Gateway_SoundVolume, 0)        
  }
}
end

Still looking for a way to add wifi smart plug if anyone has a solution and would be kind enough to explain as I am a total newbie…

1 Like

me too :frowning:
if someone succeeded, please let us know.

1 Like

I´m on latest snapshot build and i bought some new square aqara temp sensors. But the will not appear in paper ui.

Are these new sensors not implemented yet? With mi home app i can see the values including pressure.

Support for more devices is coming - @danielwalters86 is working on a pull request which hopefully soon should be finished and merged.
See also this thread.

This binding is only supporting zigbee not wifi. So the wifi plug is not supported, but @marcel_verpaalen is working on intergrating them. See Xiaomi Robot Vacuum Binding for more information.

1 Like

Hi, I need help on the window sensor (the round one).

I included it into the App, thus to the gateway which worked. Yet OH2 won’t discover it. Is there anything I can do the wrong way?
How do I include the item manually? How do I find the Client ID I need für manual inclusion?

Have you followed the readme? http://docs.openhab.org/addons/bindings/mihome/readme.html
And added the Developer key in PaperUI?

Yes i did. I configured the gateway last week and included 2 switches, a temp. sensor and a movement sensor which all work perfectly fine.
I just received the window sensor today and wanted to add it to the system.

Have you added the sensor to the mi app, did that work? , i have many off all kinds, and have not had any problems with discovery, i had one switch button that was defdct, probably the battery…

Yes i first added it via the app, worked in the app, recognized open/close. No detection in OH. Then removed it from the app, added it manually to gateway (press gateway button 3 times and press button on device for 3 seconds). No detection.
That is what confuses me.

Why did you remove it from the mi app?, i found that as soon as i added a sensor in the mi app, i saw it appear in the inbox in OH, i did not have to manualy add it to the gateway…
Strange, though i also have noticed that sometimes discovery takes some time…

I removed it to test the manual Connection. I couldnÄt find it after i included it in the app. Was a different approach with the same negative result.

Just gave it another try, inclusion and config via app. Check.
No Appearance in Inbox.

Problem solved:
OH2 lost connection to the gateway (remained initializing forever). After removing and re-including the gateway everything works fine.
Thanks for your help.

Hi There,

Does anybody now how much memory the gateway 2 has for storing your own mp3’s?
For test I uploaded a complete song (Psycho Killer - Talking Heads) :stuck_out_tongue_winking_eye: as MP3, and it works!
Nice ringtone for my doorbell (although it plays the song completely)

How did you upload the MP3?

Thats not an answer to my question, thats a question! :stuck_out_tongue:
In the Mi Home App: “My Devices”, “Devices” select the gateway, “Ringtone Settings” “Doorbell Ringtone” “Add Ringtone” “Phone Music List” (I did this on my tablet) then select an MP3 file and confirm with “Yes” !!!
My MP3 was 56mb…

You’re absolutely right. Thank you :slightly_smiling_face:

Can someone tell me which ‘Xiaomi Smart Plug’ is supported. I saw several types online and also in the Mi Home app. I just want to order the correct one.