Mi(Xiaomi) Smart home bindings?

Perhaps your router blocks them? I know nothing on Macs, but I assume, they should be able to receive UDP packets… :grin:

Edit: I forgot your tcdump… Then perhaps the problem lies in oh2 runtime on MacOS… I have no clue on that.

Hi to all

i am trying to showing up my xiaomi windows sensor in my apple homekit but i am unable to find tags for this
xiaomi string:
Contact WindowSwitch_Status { channel=“mihome:sensor_magnet::isOpen” }
but i do no know or [“door”] or what ever is working
also i am unable to get working xiaomi gateway lamp
i have it in my homekit app but i am unable to turn it in or off
but when i turn it on from xiaomi app they show up like turned on in homekit app

it seems that xiaomi lamp is unable to manage from homekit

do you have any experiences with xiaomi integration ?

thanks

If I understand you correctly (do not know English):

That’s no specialty of a specific binding. The tags you can use are listed in the docs - along with the supported item types:
https://docs.openhab.org/addons/ios/homekit/readme.html

@binderth
thanks i saw this document and that’s mean i am not able to add contact sensor via openhab to homekit ?

@Olymp
i had this string and xiaomi ID
but i am unable to integrated it via homekit bindings
do you have your xiaomi devices working with homekit ?
my xiaomi temerature is fine with this
Number HT_Temperature_studio “Studio temperature” [ “CurrentTemperature” ] { channel=“mihome:sensor_ht:158d0001f4ec83:temperature” }

i never tried Contact, but my guess is, it won’t work: ['Switchable'] will return ON/OFF and not OPEN/CLOSED… you could still try. but there’s definitely no ['Door'] in homekit.

you could either change your item to Switch instead of Contact or you could expose a proxy item as Switch to the homekit and have a rule Change your Contact item accordingly.

I’m sorry, I did not exactly translate your question, I unfortunately do not have a homecit.

If TCPDump gives you the heartbeat data then heartbeats are received. No problem on the network part.
So something must be wrong on the Mac, somewhere between the wifi driver and OH.
Could be a firewall, a routing problem, or maybe the Java runtime of OH requires configuration to receive UPD data. Or a bug in the Mac’s JVM.

Maybe try another JVM (if there is one)?

added the mi binding found things to add but cant retrieve token,tryed with MiToolkit,says error db is too small,i took miio2.db from my rooted phone but seems empty.Any ideas?

look herehttps://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/442

Have you seen the link in the xiaomi mihome vacuum cleaner (wlan) binding already?

There is a way to send playlist-files to the gateway and play own webradio streams…

Maybe it is possible to include this into this binding?

1 Like

Hi,

Has anyone updated the gateway’s firmware to 1.4.1_153.0143 ?

And if you have, are there any issues with it?

I updated yesterday, I did not find any problems.

I did the update as well. Looks ok. Thanks

I updated, now the Gateway_AmbientLight.state is not working any more, channel="mihome:gateway:illumination. Anyone else with this problem?

update: no error. simply too dark :smiley:

@OlivierFr
regarding your log, I am pretty sure you are NOT seeing heartbeats but mDNS messages. This brings me to the conclusion, that your network setup blocks multicast messages.
It’s unfortunately the most common problem with this gateway/binding.
The explanation, why you see the very first value is, that the binding activaley polls the value from the gateway, in which case the gateway answers “directly” to your machine, not via multicast messaging.
Many routers simply block multicast messages - I’m guessing, that it’s a simple security measure, so that no device can spam the network babbling over multicast.
PS:
I submitted an update for the binding today, you will soon be able to trigger the gateways device inclusion mode from OH. no need to stand up and push the button a couple of times to add a new device :slight_smile:
please see here
Cheers!

Hi!
I do not understand, from where do the units at the outlet come from?
mi.items:

Switch box_power           "On/Off [%s]"       <switch>    { channel="mihome:sensor_plug:id:power" }
Switch box_inuse           "inuse [%s]"        <switch>    { channel="mihome:sensor_plug:id:inUse" }
Number box_provided_power  "Provided Power"    <time>      { channel="mihome:sensor_plug:id:loadPower" }
Number box_power_consumed  "Power consumed"    <time>      { channel="mihome:sensor_plug:id:powerConsumed" }

mi.sitemap:

    Frame {
        Switch  item=box_power
        Switch  item=box_inuse
        Text    item=box_provided_power
        Text    item=box_power_consumed
    }

2

box_provided_power- should not be - current (A)?
Thanks!

You are confusing the concepts of power (W) and current (A). What is shown is power which had the correct unit, likewise for the consumption kWh which is the energy consumed.

Hello!
I have some strange problem. I tryed to connect gateway to the openhab 2 and it’s look like connected. I saw gateway and switches in the inbox - but after that my mi home app lost connection to the gateway. And I still can’t connect it again. I restarted it more that 10 times. It connects to mi home andoird app. I specify wifi, it connect to wifi and nothing more. Just “connection timed out”. Did anybody face this problem?
Thanks.
P.S. Looks like it’s not openhab issue. When I connect gateway to mobile internet it connected without problem, so it’s look like microtik/firewall or other network issue.
P.P.S. Sorry for bad english.