Xiaomi Gateway Integration

Send them feedback too! If many people report the problem, it’s more probably that they fix it. On the app, open the gateway and then go to its settings and select the last option “Feedback”.
To see their replies later, go to “Profile” on the app’s main screen, then to “Help & Feedback” and then tap the little list icon on the top right side of the screen. There you will see your requests and, if you open them, you can see the answer (if they reply).

Not really. They don’t show it in the app either

I also notice another weird behavior - once in a while my temperature sensor will report 100ºC / 0% humidity to HASS, but again such a measurement is missing in the iOS app. Anyone else experiencing this issue?

Do you use the latest version of the xiaomi component?
We should filter out those values: https://github.com/lazcad/homeassistant/blob/master/components/sensor/xiaomi.py#L49

Edit: Made a change, so you should not get the 0/100 values any more: https://github.com/lazcad/homeassistant/pull/26
Would be great if you could test the change?

My bad! I was a few versions behind! I just noticed this in the latest version!

However, now I’m getting “unavailable” for my sensor. I presume this will go away once the temperature sensor reports its status to the gateway.

I did already 2 times, thought you have some connection over the forum. i just got the answer that my network is the issue and i have instable connection. They seems to not care much what the cause is, i wrote another feedback.

The wireless buttons are fine, they’re triggers not sensors

So i had ghost openings again, the gateway was blinking 4-5 times blue, does it mean it makes a restart? or it had some troubles with wifi?.. all sensors are changing bit by bit to open.

Gotcha! new logs:

17-02-23 13:46:36 ERROR (MainThread) [custom_components.xiaomi] Cannot connect to Gateway
17-02-23 13:46:36 ERROR (MainThread) [custom_components.xiaomi] No data in response from hub None
17-02-23 13:46:36 DEBUG (Thread-10) [custom_components.xiaomi] PUSH >> <Entity Door Window Sensor_xxxxxxxxxxxx: off>: {'status': 'open'}

@Danielhiversen @rave how do you interpret the debug output?

and i got additional ghost movements, i will update to the latest code now as i have anyway ghost movements additionally, as i missed a couple commits.

Just to make sure, i have still the setup with multiple interfaces. wifi and lan.

i don’t know why i get connection errors to the gateway frequently even when wifi is working proper.

17-02-23 14:27:45 ERROR (MainThread) [custom_components.xiaomi] Cannot connect to Gateway
17-02-23 14:27:45 ERROR (MainThread) [custom_components.xiaomi] No data in response from hub None

Is there any news on this making it into the main branch? Would be great as it means somewhat of a commitment to update the component.

~Cheers

Can i suggest locking this thread and start to post individual threads for the different problems that are occuring?

This one has too many different issues in it to be a good resource in the future.

just my two cents.

Getting into the main component doesn’t mean someone will update it. After all, HA is a community based project. And I’m updating it now because i have full control of my repo. Getting it into the main component means i have to do pull request and wait for the HA reviewer to merge into the code base. It will take even longer time to get an update

1 Like

Need more logging done. Cannot connect to gateway means some action from HA cannot reach the gateway. I will update the code to log more information.

Btw, Did you try to reconnect your sensor?

I’ve just discovered that if you turn off the gateway light via HA, the button on the gateway no longer works to activate the light.

Does anyone know if there is a fix for this or if I can exclude the xiaomi gateway light from discovery?

I don’t agree to that. Adding it to the main repository, makes it easy for more people to contribute and improve the quality of the code. More users will also increase the chance that we find and solve more issues.

3 Likes

I second that! There will always be a delay in bringing in new features or fixing existing ones if someone without write access submits a patch. Getting it in in the main branch means that there will be several people to review and accept changes. It will also increase the “visibility” of the component and get more testers on board, ultimately leading to a better quality code.

1 Like

I believe on the idea of making it into the main branch but for different reasons than @PhyberApex. I think that in the long run is benefitial for both end-users and developers.

However, that is something that should not be rushed. Once the codebase is stable and less updates are required (both due to Xiaomi firmware updates and completed features), I believe on main-branch-ing it. But that is my personal opinion. And we are not there… yet.

Edit: Re-reading myself maybe I am writing a mess…: I am completely amazed on how good the xiaomi component is working! Great job on that :slight_smile: I am also eager to have features like the battery indicator on sensors (that was on Xiaomi shoulders, wasn’t it?) or other stuff… and if @rave prefers to work in its own repo for those updates while there are many changes, then so be it. When there are less changes per time unit, then I may change my mind on this issue.

2 Likes

You have to understand that even if it is integrated into the HA repo, not all the code will be in there. Only things that’s related to HA. All non HA code must be placed in another repo outside of HA.

Better code quality and more contributors is a good point but what good does it do if most of the code is placed outside of HA repo?

And since xiaomi is actively developing it’s API, developing a new feature means changes is required on both repo. That also applies to fixing a bug. In my view, it will be more pain for the user trying to get a patch because first, the user has to know how to update the main HA code. How many actually knows how to do that? Scroll to the first 20 or 30 post and you’ll know. That’s how i implement it first.

When the API gets stable, I’ll move the HA code to HA repo but in the meantime, i just want to quickly push out whatever new feature or bug fix directly without going through a lot of reviews and etc.

1 Like

Btw, xiaomi is working with Honeywell and they’ll be coming up with 2 new zigbee devices in April. They’re crowdsourcing it now. It will be a smoke and gas sensor. Looks beautiful and the price is great! Gonna get the smoke sensor :slight_smile:

3 Likes

That’s not exactly true about bringing new features. Read my post above. But i do agree that it will increase visibility

Your point of the API being actively developed and changed is valid. It could change at any point. I also think there are still some bugs to iron out (I upgraded the component and that broke the recorder component so I had to roll back).

1 Like