I got it working but only with the key insert I had to install a android emulator to get the key.
one of the two gateway I have is not working. This is the error
17-02-16 23:23:05 ERROR (Thread-13) [custom_components.xiaomi] Unknown gateway ip 192.168.1.231
I can connect with Mi Home app without problems.
WHat can that be ?
I do somthing similar. I have it on my bedside table:
Single click Toggle normal light
Double click night (dim light)
Long night light with 1 minute timer (not used this much)
@kiwinol Do you mind sharing your automation codes? I really want to have double press for dim but can’t figure it out… I’ll I’ve worked out is toggle for on off.
Sure
- alias: "Bedroom Light Dim"
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d00010aca1b
click_type: double
action:
- service: light.turn_on
entity_id: light.bedroom_lamp
data:
flash: short
brightness: 90
xy_color: [0.4084,0.5168]
rgb_color: [162,161,49]
- service: light.turn_on
entity_id: light.bedroom_lamp
data:
transition: 2
brightness: 90
xy_color: [0.6374,0.3252]
I couldnt figure out the toggle. Can you show me how you use toggle? I have 2 automations to do the toggle.
The error means that you are receiving data from a gateway that was not added during startup. For some reason your gateway was not added during start up of HA. Any errors or warnings during startup?
Hello,
is it possible to use the “HomeAssistant Xiaomi Hub Component by Rave (Lazcad)” to arm and disarm the alarm of the gateway ?
By simulating a double click on the gateway or a single click on a switch button ?
In advance, thanks for your reply!
Ricardo
All my motion and door sensors are currently set to active when they aren’t. I’ve been away from home for a week and they’ve been set to active/open for that entire time and resetting home assistant doesn’t do anything. I don’t have any logging or anything though, was this issue recognised in an update or just something to figure out because no one else is having issues?
I had the ghost opening today There is nothing on the Mi Home app. I don’t have any debug logs since I don’t like to run HA with debug all the time and this issue is so rare
Also, I think the component should pool the gateway when HA starts to get the current state of sensors.
How do you install the PIR sensor diagonally? (not horizontal nor vertical)
Anyone thought about how?
Yeah ghost openings happened to me as well today. 2 out of 8 sensors. The strange thing is, that i recabled my firewall/switch etc. so it lost for some moments internet connection. I don’t know if its connected, but i had already the feeling that loosing internet connection might cause some troubles. It happened especially like 4h afterwards. Oh well just realized my AP didn’t have POE so the ghost openings happens without xiaomi gateway.
Okay after replugging the gateway, because it didn’t connect to wifi anymore, all sensors are open even the pirs.
Interesting. My wifi has been a little shaky for a while, since sometimes the router simply disconnects all devices and wifi stops working for some seconds or a minute. But this happens a lot, and I had ghost openings only 3 times in about a month… Anyway, I’ll try to check if the ghost openings happen while wifi goes down.
If you don’t have the key, your first one line configuration is fine.
You can use Android emulator to install mi home app and find out the key
It does. The problem is not HA. The gateway is reporting a wrong status. The only way to fix that is to retrigger the device physically. E.g. Window sensor is stuck at open, open and close the window will fix it. This seems like a gateway firmware issue. Only encountered it once when I’m away from home for 2 weeks. I have a post about it above
Hey @rave, looks like LouisZL updated his github, stating that “Playing ringtones” has been added on the gateway. Not sure if this is on the current firmware or an upcoming firmware update.
Yeah that, was what i thought to. But i could not connect to the gateway before i had the key.
Not even with the one line configuration.
I’ve missed your post about that.
If it is a firmware problem then there is not much to do except wait It there any way we could open bug reports or contact Xiaomi support?
Just checked. Seems like there will be a few new features. Battery consumption included. Pretty sure it’s only for the next firmware
I just realized it’s not because you didn’t have the key, it’s because you’ll need to enable developer mode first…
Oh, by the way, i just checked and it is now possible to enable developer mode and get the key from ios (previously will throw an error)
Maybe you can try using the suggestion tool in the mi home app