Physical Buttons for Home Assistant

Hi All,

I have home assistant setup for about a month now, mainly in the testing phase right now. I have presence working pretty well with netgear and owntracks, and i have a mixture of different weather services combining to create a decent enough environment data for later triggers. I have a Broadlink RM Pro and a couple of TC2 switches, which are all setup and working great. I love the TC2, because while its smart, remote accessible and automatible, at the end of the day you still have a physical button on the wall to press to turn lights on (it gets the wife seal of approval!).

My problem is that I have two sonoff relays that I want to put inline with my bedside lamps. This will enable all the great automation on these to match the ceiling lights controlled by the TC2. However, I will have no physical buttons to control the sonoffs and i know that at some point the lamps will just get turn off by their pull cords and bang goes the automation. To fix this i want a row of buttons somewhere on our headboard that can control all the lights in the room (TC2 and Sonoff), so essentially I want to be able to trigger the services on home assistant from these buttons. (of course their will be alexa/siri voice automation to turn off the lights, but waking my wife at 2am when i am going to bed is a bad idea).

Aoetec minimotes seem like one possibility, but i haven’t invested in zwave yet, and cost is looking a little prohibitive with the older v1 minimotes looking hard to find and the v2’s are pricey.Flic could also be an option, but again they are pricey for a single action clicker.

So my question: What are other users using for physical buttons to remotely trigger services on home assistant? anyone built an MQTT button setup with a NodeMCU or similar? got a good design? something off the shelf that’s not as expensive as Flic, Aoetec, etc…?

~Mick

The xiaomi/Aqara zigbee devices are nice.
You need to buy from China, and need a gateway ($25) the the switches are starting from ~$7 for push switch, which has three actions - click, double click and click/hold as three separate binary sensors.

Check in the xiaomi gateway thread or search them on GearBest.com

7 Likes

I use 433MHz remotes and this circuit to receive the signal and send it to HA.

There is a list of compatible devices to the receiver here

1 Like

This is reallly cool, thanks Hijinx. Started kits for hub + button + door sensor + motion detector for $49 is not bad. extra switches at $9 a pop. Now I need to find out where does them close for Ireland :wink:

~Mick

I used GearBest.com
Shipped free to UK and took about 2 weeks to arrive

1 Like

You can configure a switch on the GPIO14 on your Sonoff to allow you the physical switch control too.

2 Likes

I was looking at exactly that Michael on SuperHouseTV’s youtube channel: https://www.youtube.com/watch?v=8mz5sCAvDAY. Its definitely an option for the Sonoff’s but I would love to be able to build an integrate button setup for multiple device types. Leaning towards the Xiaomi stuff.

I bought them from gearbest too,
Took more that 2 weeks to get them to Italy (but that could be our postal service fault) but arrived.
Keep also in mind that you need a proper adapter (china or australian tripolar) to plug the gateway to the wall

The next stop is the xiaomi component forum:

https://community.home-assistant.io/t/beta-xiaomi-gateway-integration

Where you’ll find the code.
I use them to drive my bathroom lights and fan and they work very well, despite the fact that is beta code, it’s very reliable

I’ve set up the buttons in lots of ways.
e.g. one at top of stairs that will turn off all downstairs lights/switches with a single click, turn on hallway light at low brightness from double click (night emergencies) etc.
There are even some scripts to cycle light brightness whilst holding the switch.

As you say… head over to the xiaomi thread. Its long and not well structured, but there is LOADS of info there.

Ordered starter kit and a bunch of extra buttons. €100 all in for 10 smart devices is pretty good (also includes a pack of 5 3 pin to UK/IRL plug adapters which i added to the order).

The Xiaomi thread is quite intimidating :slight_smile: this seems to be a good starting point: https://github.com/lazcad/homeassistant

Isn’t it possible to use amazon dash buttons to do something similar too ? And it only costs 5€/pc

Yes, amazon dash would work but:

  • It has some latency as it needs to wake up.
  • The battery is non-replaceable is built to sustain a few hundred clicks.

tanks, I did not know that. Just bought one yesterday to try it on some simple stuff…

I’ve got both xiaomi and dash buttons using dasher.
The dash buttons are a fun hack but the 5-10 sec lag is pretty annoying. Also a small % of the presses don’t get caught by dasher.
Even though the xiaomi are more expensive I still rate over the dash hack

which xiaomi button are you talking about ? Has it replacable batteries or can you recharge it ? Does it works with wi-fi ?

1 Like

Zigbee (requires hub) not wifi.
Requires coin battery.
http://www.gearbest.com/smart-light-bulb/pp_257679.html

See this thread for (a lot) more info:

Is it possible to use them with any other ZigBee bridge? The one from Xiaomi seems to have quit some overhead to be setup and is still in beta.

Potentially yes. Some French guy has managed to do it and published details. I think some smartthings users have it working.
Practically at the moment no. E.g. No support from ha native zigbee, hue etc
This lack of interoperability is typical of zigbee in general- it’s very frustrating!

I should add also that the “beta” label is really only there now because the originator is unwilling or unable to make a pull request on HA to move support into ha main.
The add on is considered to be good to go. It’s very stable. You’ll see loads of comments to this effect in that thread

I’ve just read is article, pretty impressive reverse engineering he achieved!
So according to that article it should be possible to support xiaomi devices with a bridge compatible with Zigbee ZHA since Xiaomi used the default encryption key. But that would still need time until it’s ported to HA in any manner.
He is also preparing a Kickstarter for a bridge supporting Xiaomi device, Philips Hue and other zigbee device. He plan a price around 40€ and his device would output the data through serial out.

Original article (in french):

1 Like