New Xiaomi Aqara Button and Hass.io

UPDATE 2016-10-29

As of version 0.81, the new buttons and wireless wall switches are fully supported, so no need for this hack anymore

\UPDATE

I bought a new Xiaomi Aqara button, model WXKG11LM, and added it to my gateway. No worries, gateway picked it up and sees press, double press and hold.

Hass.io, on the other hand, knows nothing about it… I was getting a detection error with a payload of {‘cmd’: ‘read_ack’, ‘model’: ‘remote.b1acn01’, ‘sid’: ‘158d0001e79089’, ‘short_id’: 2100, ‘data’: ‘{“voltage”:3165}’} It turns out there are two different 2nd gen buttons, One which is detected as sensor_switch.aq2 and the newer one which is detected as remote.b1acn01. And while the sensor_switch.aq2 only has single and double click_types, the remote.b1acn01 has all of the click_type of the 1st generation button.

Checking the PyXiaomiGateway project on GitHub, the new 2nd generation button has been added to the xiaomi_gateway __init__.py, but this hasn’t made it through to Hass.io yet.

No problem… grab the __init__.py file from GitHub, create a directory called xiaomi_gateway under config, and put the file in there (Note, NOT config/custom-components/xiaomi_gateway). Sometimes the very last line loses its indentation which breaks everything Xiaomi, so check it and make sure it’s still indented correctly. But all of this this still didn’t work, the button was still not detected….

Further digging showed that it also has to be added to xiaomi_aqara.py file in binary_sensor. No problem, head over to to the raw file on GitHub and grab it. If you don’t already have one, create a directory called custom_components under config. In this directory, create a new directory called binary_sensor in in this directory create a new file called xiaomi_aqara.py, and paste the raw file into it. Then edit line 39 and change it from:

                           'sensor_switch.aq2', 'sensor_switch.aq3']:

to

                           'sensor_switch.aq2', 'sensor_switch.aq3', 'remote.b1acn01']:

And restart Home Assistant

Why NZ Businesses are Trying to Lower the Import Tax Threshold

I need a few parts for my car to renew the suspension. Usually one would be able to just press out the bushes and ball joints and replace them, and while it’s possible to do the bushes, the ball joints are not replaceable and require new upper and lower control arms.

I sourced a kit of parts a few months back from the US, but haven’t yet got around to installing them, From memory the entire kit, which consisted of two lower control arms, two upper control arms, two tie rods, two stabiliser bar linkages and two rear stabiliser linkages cot me a total of around NZ$400. Local prices had just ONE lower control arm costing more than the entire kit cost.

I also decided to renew the stabiliser bar bushes. Four are required as each one is effectively half a bushing. I sourced these from Ireland, Febi parts which are OEM. Each one cost me about NZ$ 5.00. The price at a local dealer is around NZ$ 30.00 each.

On reading up the manufacturers procedures for replacing the suspension components I realised I would have to fit some new bolts as they are Torque-To-Yield, not Torque-To-Spec, and new nuts as they are one-shot lock nuts. I’d also need to replace the clamps for the tie rod boots, and I decided to replace the boots as well due to the mileage of the car (One of the “clunk” culprits is a badly worn inner tie rod ball joint). I got all the part numbers and contacted the local dealers for prices. NZ$ 342 was the total. I got on to an overseas dealer to get a quote and wasn’t too surprised to found out that all of the same parts, plus shipping was immensely cheaper – NZ$ 265.

The long and short of it is that we are being ripped off on a daily basis by importers who have almost no domestic competition, so they cream huge markups. They are crying because the internet has opened up a literal world of possibilities to the NZ consumer. I am quite happy to bypass them and order whatever I need from overseas, and screw them.

I’ll document the replacement of the suspension components here when the last parts arrive and I get the job done