Mi(Xiaomi) Smart home bindings?

Great! This is one of the key issues we need to solve since right now we know there’s a miio device but we cannot create thing until it is identified. Most of the devices do not expose their token and we must enter it somewhere manually…

Interesting indeed.

I see the 4 four devices respond differently wrt to the token than the vacuum. (with all 00’s )
I’ll make quick update that will avoid that it is considered a valid token.

I guess you did not enter tolkens for these items right? If you did, was the reply the same as quoted here (no rrsponse).

Yes, it will be a bit tricky, I think it can be done.
Will do bit of experimenting see if my idea for it works out

Only Mi Air Purifier 2 added as thing, filled the token, and device id, and the ip address. I did not add the other 4 where the token 000 mi item (3 yeelight bulb and a gateway)

Hi,
I’m trying to follow you guys guidelines for wifi smart socket but can’t get my hand on token.
How do you get it?

mmm, this looks like the token is no longer accepted,
Motly that means that it was able to send the message[quote=“Variamus, post:374, topic:4711”]
I’m trying to follow you guys guidelines for wifi smart socket but can’t get my hand on token.

How do you get it?
[/quote]

Assuming it is similar, you can read the tolken info in the first post

Thanks, I could find the token with your help.
No way to implement wifi socket yet as I understand your reply?
Also, I don’t have device id…

I’ve created rules for existing xiaomi gateway channels, but could not find information a command I should send to arm it’s embedded alarm

I can confirm that the Smoke Sensor does not work with 2.2.0 binding,

same here… smoke sensor doesnt work.
(oh 2.1 and binding 2.1)

what do would you like to do?
if you want to have an alarm go off when you have movement then take a look at the documentation, it has very good examples, see :

http://docs.openhab.org/addons/bindings/mihome/readme.html

I found this on the HASS forum:

Did anybody try this and made it work with openhab?
I like to use it as confimation for my away, home setting ect.
I’m going to try later this evening.

It’s worth to check official documentation sometimes :wink:

rule "Play quiet knock-knock ringtone with the Xiaomi Gateway"
when
    // Item ExampleSwitch changed to ON
then
    sendCommand(Gateway_SoundVolume, 2)
    sendCommand(Gateway_Sound, 11)
    Thread::sleep(2000) /* wait for 2 seconds */
    sendCommand(Gateway_Sound, 10000)
    sendCommand(Gateway_SoundVolume, 0)
end

Hello,
it will possible add local radio station (m3u8) or other file. To play with gateway ?

thanks

This weekend I noticed that one of my temp sensors was giving a humidty of 87% (bedroom of one of the kids). When I looked in the Mi App on my phone, I saw that the device was offline. I think someone pushed the buttons… Is there a way that openHAB notices that the device is offline and sent an alert?

Oh Thanks, yes, I missed that part in the very nice documentaion :slight_smile:

// Selection for Xiaomi Gateway Sounds
// 10000 is STOP
// >10001 are own sounds you uploaded to the gateway

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