Mi(Xiaomi) Smart home bindings?

It lasted a verly long time to get values for voltage, it always was NaN… Now it works. Thank you!

Triggering scenes is not possible at the moment. the gateway does no report this back. I just activated the alarm and logged the messages the openHAB binding reveiced. nothing to find there.

perhaps things will develop as with the voltage values…

Thanks for your great efforts here.

What I don’t understand with the Things:
Whats the difference between “Xiaomi Mi Smart Home Bridge” and “Xiaomi Mi Smart Home Gateway” ? Isn’t this the same device ?

yeah this one is a bit strange, but @pboos answered this sometime ago in the PR discussion over at github

About Gateway/Bridge. I know that is kind of weird. The problem is that one. The BRIDGE (speaking in openhab/smarthome terms) can only route to other devices, but has no functionality. Now the xiaomi gateway has lights! So it is a BRIDGE + A THING. So I needed to create two different ones. Or at least I didn’t figure out how to do it in one. Because adding channels to the bridge gave me errors.

1 Like

thanks for clarification :+1:

Just updated to last bridge firmware and motion sensor stopped working. I had it linked with hue lights

Which version is it? 1.4.1. 145?
I have motion sensors myself and everything is fine with them…

Hi

Does anyone know the xiaomi IR Blaster device (all-in-one media control center http://files.xiaomi-mi.com/files/All_in_one/All_in_one-EN.pdf)?
It would be great to be able to integrate openHAB and be able to handle air conditioning, tv, portraits, audio equipment, etc.
Do you know if there is an API to be able to integrate it?

The only “open” devices I know of are Yeelights and MiHome ZigBee devices…
There is some possibility to include every wifi enabled device but complex. have a look at this previous post

strange. tried removing all things and readding them again?

It worked again after some time :confused:

I just update home bindings with the last version, but since then the temperature and humidity values stanys constant (not updated anymore). I tried to remove things in Paper UI and restart openHab but I still have this issue.

The only error I have in the logs is:

“[ERROR] [nternal.DiscoveryServiceRegistryImpl] - Cannot trigger scan for thing types ‘[mihome:bridge]’ on ‘XiaomiBridgeDiscoveryService’!”

Any idea about this problem?

Thanks.

1 Like

We had this issue over at github in the PR discussion
The user there managed to get rid of it by reinstalling the binding.
But still it was a bug in the code.
I have made a bugfix for that and opened a pull request on @pboos repository.

NEWS

The OH2 binding will be available on the new IOT Marketplace!
Follow the instruction provided in the link above to get the IOT Marketplace binding.

At the moment the jar in the marketplace is old, it will get updated as soon as @pboos merges something in or closes and reopens his PR on the openHAB repo.

For now please be patient, you can check if its up to date on comparing the date of the build to this post :smile:

1 Like

Hi,
Just installed last JAR available, 2.1.0 SNAPSHOT.
I can see the gateway and all sensors in InBox and I can add things.
I added a Temperature/Humidity Sensor and a Windows Contact, but opening detail I got NaN for Umidity and Temp and no status for window:

Perhaps I miss something in Item config:

Contact MANSARDA_FINESTRA_BAGNO "Finestra Bagno [%s]" <flash> { channel="mihome:sensor_magnet:158d000183724f:isOpen" }

Number CUCINA_TEMP "Temperatura Cucina [%.1f °C]" <temperature> 	{ channel = "mihome:sensor_ht:158d000187234a:temperature" } 
Number CUCINA_HUMI "Umidità Cucina [%d %%]" <water>		 			{ channel = "mihome:sensor_ht:158d000187234a:humidity" }

And I do not have Battery Voltage. I have latest firmware version on the gateway.

Someone can help me?

Thanks

Hi,
I installed latest OH2 snapshot and installed latest Bindings from IOT Market.
I have this isseues:

  1. Temperature and Humidity are NaN, and contact have no value as for screenshoot
  2. Opening Things I cannot get voltage channel

but in the log I see value was read:
Item got update: {“cmd”:“read_ack”,“model”:“sensor_ht”,“sid”:“158d000187234a”,“short_id”:50889,“data”:"{“voltage”:3085,“temperature”:“2097”,“humidity”:“3800”}"}

  1. For Magnet sensor same thing. I got only 1 channel and value isOpen was not retrieved:

    but in the log I can see values arriving:
    Item got update: {“cmd”:“read_ack”,“model”:“magnet”,“sid”:“158d000183724f”,“short_id”:60271,“data”:"{“voltage”:3095,“status”:“close”}"}

I just removed and added binding and things 10 times, but result is always the same.

Marco

Hi @marcolino7, please read carefully and don’t repeat yourself. As I already wrote, please be patient and wait for the latest build in IOT marketplace. it will be updated the next few days…

Hello!
Try it this way:

Contact MANSARDA_FINESTRA_BAGNO "Finestra Bagno" <flash>  { channel="mihome:sensor_magnet:158d000183724f:isOpen" }

If you finish [%s] it works in BasicUI
But does not work in the PaperUI to work there and there,
Then in the item without [%s]
But in the sitemap file:

Text item=MANSARDA_FINESTRA_BAGNO label="Finestra Bagno [%s]"

Correct me if I’m wrong, but I only work in this version.

Number WindowSwitch_AlarmTimer <clock> { channel="mihome:sensor_magnet:158d00013e5f82:isOpenAlarmTimer" }
Number MotionSensor_MotionTimer <clock> { channel="mihome:sensor_motion:158d000128b345:motionOffTimer" }

What here should be?
I could not get the values to change here …

Switch Gateway_LightSwitch <light> { channel="mihome:gateway:286c078921f5:brightness" }

If you press this button, the light goes out, no more how to turn it off, only through the application, I’m doing something wrong?

@Olymp
with the Timer values you can change the time, after which the motion sensor switches off again. default (if no value is set) is 120sec for motion. with window sensors, an alarm event is triggered, when the sensor report “open” but not “closed” in a certain time, default is 300sec.
There is a desciption text in paperUI for these channels.
But we should make it more clear in the readme, thanks for your feedback!

The thing with the switch is, it comes together with a dimmer on the same channel, see next line in the readme example. function is: set some dimmer value, the switch can then switch off and on and will retain the brightness value you set before. If you don’t have anything set, it should switch to full brightness. it seems that doesn’t happen. will have to fix that…