Xiaomi Gateway Integration

Thanks a lot sir.

This is exactly what I wanted. Still, do I edit the automations file or another file?

:slight_smile:

BTW, I see nothing related to playing sounds on Aqara GW. Is there smth I can use?

Please can we close this thread? :tired_face: It’s out of control. The gateway is no longer in Beta for a start

2 Likes

Hi,

I’m glad you solved. Instead I still have the issue:

2017-09-27 19:49:02 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:02 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:02 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:02 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:02 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:05 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:05 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:05 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:05 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:05 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:09 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:09 ERROR (Thread-5) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:09 ERROR (Thread-6) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:09 ERROR (Thread-8) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:09 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:11 ERROR (Thread-4) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:11 ERROR (Thread-2) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:11 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:11 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:11 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:13 ERROR (Thread-6) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:14 ERROR (Thread-7) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:14 ERROR (Thread-12) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:14 ERROR (Thread-11) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}
2017-09-27 19:49:14 ERROR (Thread-8) [PyXiaomiGateway] Got error element in data {"error":"Invalid key"}

after a lot of clicks at the end the xiaomi button worked and switched on my xiaomi switch as configured in automation.
HA is running on a RaspberryPi0W with a CPU load from 10% to 40% and a Free RAM of 270MB (it worked well before the update)

Could you create a new thread for this issue? It would be nice to have a possible solution separated.

3 Likes

:+1: from me.
@admins is there a way we can lock this thread please?
And perhaps create a new subcategory for Xiaomi somewhere to group the Xiaomi topics.
As @syssi stated, it’s nice to be able to mark a topic as solved… it really helps the community.

Thanks!

6 Likes

Hi there.

I actually don’t have my config on github, as it has been growing since I started and I have not had the time to do it yet.

If I do, I’ll share it with you.

If you have any questions/doubts, ask away.

1 Like

any one can understand what is worng with my code here via Automation Trigger?
that stop to work .

  • alias: “Front door is open”
    trigger:
    • platform: state
      entity_id: binary_sensor.door_window_sensor_158d000127ae25
      state: ‘255’
    • platform: state
      entity_id: binary_sensor.door_window_sensor_158d000127ae25
      state: ‘on’
      action:
      service: notify.xiaomi
      data:
      message: “Front door open”
      target: “device/LGE Nexus 5X”

Do we still need to use mainland China server or we can use the Singapore server too?

The first trigger should be removed.

Have you tried hass --script check_config ?
Are you sure the entity ids are correct? Do you find “binary_sensor.door_window_sensor_158d000127ae25” at YOUR_IP:8123/dev-state ?

yes yes all my list is ok, that work fine for very long time!
Yesterday he stop working and I do not understand why.

about the log i do not find what worng :frowning:

https://paste.ofcode.org/wen4MQrx7Wmy2Uvgn7BsYD

edit @syssi resove my issue :slight_smile:

Change your config from xiaomi to xiaomi_aqara

he told me to change the code to that work,
i dont know why Suddenly that stop working but work :slight_smile:

  • alias: Front door is open
    trigger:
    • platform: state
      entity_id: binary_sensor.door_window_sensor_158d000127ae25
      from: ‘off’
      to: ‘on’
      action:
    • service: notify.xiaomi
      data:
      message: “Front door open”
      target: “device/LGE Nexus 5X”

And not only on the platform itself, but also on the platform services actioned elsewhere (play/stop_ringtone).

Home Assistant does not complain if you don’t change it on the platform services, but then services obviously don’t work.

Hi all! Could you help me please? My sensor still has a 60 sec timeout after a trigger!..

- alias: Mega test
  trigger:
    platform: event
    event_type: motion
    event_data:
      entity_id: binary_sensor.motion_sensor_158d000128d656
  action:
    service: light.toggle
    entity_id: light.yeelight_rgb_34ce00883768