Can you place the gateway to the first floor and the temp-sensor in the last corner of your cellar?
There maybe is no zigbee connection anymore? And then place the plug in the ground floor and look if it is connecting?
Can you place the gateway to the first floor and the temp-sensor in the last corner of your cellar?
There maybe is no zigbee connection anymore? And then place the plug in the ground floor and look if it is connecting?
Do you have the âOriginal Xiaomi Mi Home Smart WiFi Socketâ or the âOriginal Xiaomi Mi Smart WiFi Socket - ZigBee Versionâ ?
Are there really 2 different Versions or is this all the same?
I guess, there are two versions. I have no ZigBee (at least not aware of) in my outlet. Itâs WiFi only.
Perhaps the ZigBee version also functions as a gateway, as the Aqara smart IP cam (https://m.gearbest.com/ip-cameras/pp_978606.html?wid=21) is.
I have the Xiaomi Mi Smart Socket Plug 2 ZigBee Edition and i can confirm that it works as a repeater. Garage temp sensor was offline last night until i plugged that Smart socket with an Schuko-China adapter to nearby room and it automatically fixed the connection in about 5mins.
Unfortunately IKEA trÄdfri dimmable bulb didnŽt bring this sensor up, i had that bulb switched on for whole night at the same location as that xiaomi smart plug.
Having trouble with the motion sensorâŠ
i OH2.2, i added it as thing, and assigned items to Motion and Timer.
i can see the motion updates fine the Item, however i have no visible events in logs, and rules doesnât applyâŠ
any ideas?
rule "YeeLightMotion Trigger"
when
Channel "mihome:sensor_motion:158d0000f41d32:motion" triggered ON
then
sendNotiication("l******@gmail.com", "motion trigered")
end
tried also using the item
rule "YeeLightMotion Trigger"
when
Item corridormotion changed
then
logInfo("YeeLight.Rules","motion activated")
sendNotiication("l*******@gmail.com", "motion trigered")
end
UPDATE: had to change the Item associated to the Motion Sensor from CONTACT to SWITCH - did the trick⊠getting now updates from the sensor.
Also consider changing sendNotiication to sendNotification
If your motion sensor is placed inside a frequently used room, youâll get notifications every few minutes.
The sensor itself sends motion ON, waits for a interval (3mins in default, if I remember correctly) - then itâll trigger OFF. if thereâs still movement, itâll trigger ON again.
I defined a proxy item with an expire-binding value of 10mins. Itâll go OFF if thereâs no further ON coming from the sensor. Play around with the expire to suit your needs.
Hello Thomas @binderth,
Iâd be interested in having examples of how exactly you do the below to detect when an item becomes offline and Iâd like to understand if there is a way to make a one generic rule that works for all sensors or if I need systematically a rule per sensor?
Thanks for your help,
at first, try to understand how it works with single configuration:
items:
Number MiWeather_Temperature "Temperatur innen [%.1f C]" <temperature> (xiaomi) { channel="mihome:sensor_weather_v1:34cexxxxxx:158dxxxxxxxxxx:temperature",expire="2h" }
That means, if the item âMiWeather_Temperatureâ doesnât get updated within 2h it will âexpireâ - meaning itâll change to UNDEF.
That way, you can trigger some action on that:
rule "MiWeather failure"
when
Item MiWeather_Temperature changed to UNDEF
then
// do something like:
var String message = "MiWeather Temperature sensor is offline!"
logInfo("Xiaomi Mi offline", "message: "+message)
sendNotification("john@deere.com", message)
end
Now: if you know, how this works - you can put all your Sensors or whatever expiring in one Group and do some action, if the Group goes UNDEF:
items:
Group:Switch:OR(ON, OFF) gXiaomi "Xiaomi Sensors"
note: the âORâ is key here, that means if one sensor inside the group changes, the whole group changes With AND youâll only get a UNDEF on the Group if all items within fail.
rule "Xiaomi sensors failure"
when
Item gXiaomi changed to UNDEF
then
// do something like:
gXiaomi?.allMembers.filter(s | s.state == UNDEF).forEach[i|
var String message = "Xiaomi sensor offline: " + i.name
logInfo("Xiaomi Mi offline", "message: "+message)
sendNotification("john@deere.com", message)
]
end
this means, youâll get on every change of the Group gXiaomi
a log-entry and a notification of all UNDEF items (presumably only one). If thereâs more than one failure, youâll only get the first one. If youâd like to have multiple notifications and log-entries, youâll have to rewrite the trigger of the rule to Item gXiaomi received update
- and youâll have to have an IF to ask, if the update was UNDEF
. To my Knowledge you canât have âItem gXiaomi received update to UNDEFâ⊠I hope, you understand, what I meanâŠ
Thanks for the explanation! I already used these kind of rules to receive notification about my low batteries, but never used the âexpireâ binding.
Will test this asap
Thank you Thomas, this is great. Iâll put in in place immediately.
Gents, I canât find anywhere the loudness of the gateway.
Can it be used as a siren? Is it loud enough?
Thanks!
As an alarm to scare someone off I would say no. More like loudly announce presence.
Hello everyone
I am new to openhab and try to set up my smart home. Most of my equipment is from Xiaomi and the subcontractors. Unfortunately, I have a problem and I canât make any items out of it at the switches. Of course, nothing can be combined in a meaningful way. Anybody got any advice?
yes - read the docs!
honestly - please read them thoroughly - otherwise we repeat ourselves daily here in the forum.
But please - if you find something difficult to understand in the docs or think somethingâs missing there - please tell us, so the docs can be improved.
For the time being:
https://docs.openhab.org/addons/bindings/mihome/readme.html
tl;dr> You canât have items for events like button presses. you have to take the channel in a rule and there you can do something with your pressed button.
but you can have items for âbattery levelâ and âlow Batteryâ
Mi Gateway is compulsory for using Mi Sensors. It works on Zigbee Protocol which connects to Mi Gateway and Mi Gateway through wifi connects to your router.
Hi again,
I have a strange situation where a Aqara Temp sensor is showing the following:
Did any of you already see this? There must be something wrong in my setup but Iâm not sure what?
@binderth, this makes the rules to detect offline etc⊠not triggering of course
Thanks,
And I have another question, on a different front : Is there a way for me to find in MiHome the id of the sensor that are then used by openhab? I miss this to have a manageable mapping between openhab and mihome for the (rare) cases when I need to go to mihome. I have clicked everywhere in mihome I think and did not find the info.
Thanks,
Hi,
So you are using another Gateway as Zigbee Repeater or directly connected to wifi ?
Unfortunately not. You have to either add them one by one (and write the ID in a list or something) or you have to guess which device by either pressing buttons, checking information or something like that. I donât see nor a ID or MACadress or something in MiHome for a Aqara-Device.