Xiaomi Gateway Integration

Thank you for the tips Wayne,

I took your advice, logged out of the app, verified my locale is set to Mainland China. Logged back in. Regeneraged key. Didn’t help.
Removed the gateway from my list of devices and added it again, Enabled LAN protocol, regenerated key. Didn’t help.
I’m afraid this problem persists. I do appreciate your willingness to assist though.

I have single quotation marks around my key. eg ‘a321654df321’

Also the colons for sid, gateway and key all line up with mine so add an extra space at the front of sid (before the -) and key.

I’m not sure if all those matter but it’s the only difference I can see (apart from yours is v3).

Thanks Artudst!

Just tried your suggestions and alas, no help.
Out of curiosity, I installed Domoticz which also claims to support the Xiaomi gateway. Added the GW there and it’s detected just like in HA, but I can’t control the light. Reason: " Error: XiaomiGateway: unable to write command - Invalid Key"

I’m thinking that there has to be something wrong with the gateway itself. Has anyone else got the latest 1.4.1_145 FW working? Any sightings of changelogs or updated protocol documentation? Does anybody else even have a v3 gateway?

Damn. Yes 145 is working fine for me (v2).

I just had a look at mine and it’s also saying

model:lumi.gateway.v3

Here’s other info (left out quotation marks)

Version code : 129
ID45175291
Zigbee: 26
hw_ver: MW300
mcu_fw_ver: 0141
wifi_fw_ver: SD878x-14.76.36.p84-702.1.0-WM

You did follow all the instructions from below link?
http://bbs.xiaomi.cn/t-13198850

Well now, your gateway is pretty much identical to mine, aside from the ID number of course.
I did follow all the instructions down to step 8, after which starts the raspberry pi related stuff. In my screenshot you can see that the lan protocol mode is active.
Now I’m starting to get thoroughly puzzled, because I can’t think of anything that would be different. I appreciate your assistance a lot!

Does anyone know what’s new in 145 firmware?

Hello @moskovskiy82 I think not much. I see that gateway reports illumination values. We need to add new sensor to xiaomi component.

Hi there, late reply…

Can’t seem to get the brightness on cube working with this automation:

alias: Cube Brightness Chambre
trigger:
  platform: event
  event_type: cube_action
  event_data:
      entity_id: binary_sensor.cube_158d00011064e0
      action_type: rotate

action:
  service: homeassistant.turn_on
  data_template:
      entity_id: group.lights_chambre
      brightness: >
                    {% set state = states.group.lights_chambre.attributes.brightness + (trigger.event.data.action_value|float) -%}
                    {%-  if state > 255 -%}
                       {%- set state  = 255 -%}
                    {%-  elif state < 0 -%}
                       {%- set state  = 0 -%}
                    {%- endif %}
                    {{ state }}

maybe changing
service: homeassistant.turn_on
for
service: light.turn_on

Illumination is now supported
https://github.com/Danielhiversen/homeassistant/pull/5

1 Like

Thanks. Did a quick test. seems to be working well so far. :grinning:

Oh yes, great!

Is it working well?

For 30 bucks you get radio, nightlight, and light sensor

Question.

Can 2/3 gateway do a single Zigbee mesh? Or it will be two/three separate mesh

Which is the best way to install your fork?

The two important differences are this sensor and the ghost solution, correct?

1 Like

I wonder why this component is still not part of the official release

I just found out that the Zigbee outlet has also a temperature sensor. IS it supported?

There are also some improvements for thread handling.

All changes can be seen here: https://github.com/lazcad/homeassistant/compare/master...Danielhiversen:master

@anon35356645 cloud you please post example of data output (from debug log) for plug.

I jusr red it here, maybe I misunderstood (?)

illumination is “light sensor” correct?