Xiaomi Gateway Integration

The Dooya DT82 are the tracks which the Xiaomi motor is compatible with. No idea if they have their own motor/control system as well but I suspect that they do. Installation of the Xiaomi curtain system would require, as best I can figure out, DT82 tracks, AC cabling for the motor, the Xiaomi curtain motor/controller and a Xiaomi Smart Home gateway.

2 Likes

Can confirm gateway now working with the 0.5 update and docker.

I was able to use it in 0.49 as long as I didn’t put the key: XXXX in the config, now working with both key and mac in my config. All stopped working after my last update a week or so ago when I updated both the gateway firmware, app and the custom component.

Does anyone know where the setting is in latest app to turn off all the notifications - it’s getting a to be a bit much.

Everything is working now once I updated to .50. Thank you everyone

1 Like

I have just upgraded to 0.50. I haven’t had time to test it thoroughly yet, but just a note to others - I had to remove poll_motion: True from my config. Might have been deprecated, I haven’t kept up with every change. I hadn’t been using daniel’s repo yet, so I’ll be making quite a jump.

1 Like

All of a sudden the button ‘single’ and ‘double’ dont get through HA anymore. Long press still works and in the mi app i can see ‘single’ and ‘double’ clicks in the gateway logbook. Anyone had this prpblem before? (I run 0.48 with custom components for 3 weeks now)

Does anyone know if the wall switches require Neutral wire? And is there dimming?

we should remove the (beta) from the title … finally

There are two versions. With and without neutral wire. Dimming is not possible - just switching.

1 Like

I had this after the upgrade today, was working yesterday under 0.49 and for the last 6? months. My problem was spacing so if you have copied the automations some time back you might have the same errors. Also the ‘hold’ click is now called ‘long_click_press’.

My automations had to have the event data fixed from

- alias: kitchen click
  trigger:
    platform: event
    event_type: click
    event_data:
        entity_id: binary_sensor.switch_158d00012abba4 **#EXTRA SPACES HERE**
        click_type: single **#EXTRA SPACES HERE**
  action:

to

- alias: kitchen click
  trigger:
    platform: event
    event_type: click
    event_data:
      entity_id: binary_sensor.switch_158d00012abba4
      click_type: single
  action:

Both events (hold and long_click_press) are still available with unchanged behaviour. hold triggers if you release the key press. long_click_press triggers before button release and will always be followed by hold.

1 Like

Unfortunately, this was not the solution, the ‘single’ and ‘double’ are not even recorded by HA (in the logbook I don’t even see the events). The event are recorded int he Mi app though.

I have also upgraded to 0.50 and removed the custom component now, no effect.

Please enable debugging for the xiaomi component:


logger:
  default: warn
  logs:
    components.xiaomi: debug
    components.sensor.xiaomi: debug
    components.binary_sensor.xiaomi: debug
    components.light.xiaomi: debug
    components.switch.xiaomi: debug

And post the content of your home-assistant.log. Does the component receive MCAST events? I don’t think so.

I added the logger component, but no xiaomi warnings show up.

The following errors have been logged this session
2017-07-30 12:21:58 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/aiohttp/web_protocol.py”, line 434, in start
yield from resp.prepare(request)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/aiohttp/web_fileresponse.py”, line 177, in prepare
st = filepath.stat()
File “/usr/lib/python3.4/pathlib.py”, line 1048, in stat
return self._accessor.stat(self)
File “/usr/lib/python3.4/pathlib.py”, line 323, in wrapped
return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/homeassistant/.homeassistant/home-assistant.log’

edit (12:49): as if by magic (I restarted HA, no changes in config) it started working again

Thanks very much! Is the one that doesn’t require Neural called something different?

Will the switch still operate as a standard switch? (Without any network connection)

This is the one with neutral wire: http://www.gearbest.com/access-control/pp_626699.html
This one is without: http://www.gearbest.com/alarm-systems/pp_610096.html

Check the available wires of your current installation before you buy. Sometimes there is no neutral wire available. Per default each key is connected to one of the relays. There is a mode called “decoupled mode” where you can decouple the button press from the switch. The decoupled mode isn’t support at the moment. You are asking for the default/coupled mode.

1 Like

Thank you, I have no neutral wire, don’t really need dimming but want the switch to still work if network fails so sounds perfect

It finally happen!
Thank you everyone involved in especial to @danielhiversen for his hardwork :blush:
Just switched from the custom to the main component, adjusted the config and everything keeps working as expected :stuck_out_tongue:

Yes…A very BIG Thanks to @Danielhiversen for making this an official component finally :joy::clap:
I also wanted to say we should also thank @rave for starting this. I do hope he will some day come back and continue to contribute to this component. And not forgetting others like @syssi, @jcastro & @DanielGalle.

5 Likes

Is there a way to get “faster” information from the motion sensors. Not sure if this is a HA thing but once triggered they stay active for the next 60 seconds, while in the Xiaomi app I can see the sensor being retriggered within this period of time I think.

And yes a big Thank you! to the people involved for all the work on this great component. It’s highly appreciated!

Just wondering, the switch you linked to has two paddle keys but connects one circuit? What do the individual keys do in default coupled mode? Thanks