Posts Tagged ‘home’

Xiaomi Smart Home

Posted: January 6, 2018 in HA, Hardware
Tags: ,

The OpenHAB community have been taking about Xiaomi and the raft of components that you can get relatively cheaply (even cheaper direct from China!). It’s ZigBee based, so it shouldn’t interfere with current devices.

I’m not keen on the idea of adding another hub/gateway to my setup, but for roughly £20, it might be worth a punt. I always tell myself that “worse case I can sell it on eBay”. Never actually happens though…. So AliExpress and GearBest both list the gateway, but the one on GearBest appears to be the 3rd generation. From reading the notes on the OpenHAB documents and forums it seems that gen 2 or later is supported. AliExpress may have the gen 2 and gen 3, but as all the suppliers use the same stock photo, it’s quite difficult to see. Being Christmas, there’s a sale on, so I’ve also picked up a button and 2 door sensors. Total cost ~ £30 with shipping.

Let’s be honest I couldn’t get 2 Z-Wave door sensors in the UK for that price!

The downside to all this is the time for delivery. I ordered the kit on 21st December and it finally arrived on 4th January. Not long really given the Xmas holidays, but I get impatient waiting for new toys!


When the parcel finally arrived, it contained 4 small white boxes. The largest – probably 10cm a side contained the new hub.


Xiaomi Smart Hub with UK Adapter

The other 3 were the same size, each containing a device.

Each box also contained a small instruction leaflet in Chinese, and if appropriate some spare double-sided tape to mount the device.

The Hub includes a LED ring for light effects, an ambient light sensor as well as a speaker. The idea is to plug it into the wall socket somewhere central and use these features as part of the whole home solution.


The installation of the hub and devices is a little ’round-the-houses’, but is outlined in the OH documentation here.

Slightly disconcerting is the female Chinese voice bellowing out of the hub when you try to add devices. Once you jumped through the hoops of adding the hub to OpenHAB, any new devices appear in the Inbox for inclusion. As per the binding documents, I’ve blocked the hub from any external access. It means I can’t use the app, but I don’t need it as OH handles it all for me.

Using in OH

One of the things that took me a while to figure out was the alarm timer channel for the door sensor.

Number DoorSwitch_AlarmTimer <clock> { channel="mihome:sensor_magnet:<ID>:isOpenAlarmTimer" }

This value needs to be set on the hub by OH and determines how long the door should be in an OPEN state before the ‘isOpenAlarm’ switch to be triggered. I believe it’s currently defaults to 300 seconds, but I recommend experimenting.

In my rules I set the value on system startup

or in the newer format
So the alarm will trigger if the door is open for more than 120 seconds.
I’m happy with the kit so far, but finding somewhere to put the hub is an issue – it only comes with an integrated plug for use in China, so a China -> UK adapter is needed, which adds to the height of the device. With an adapter it is now about 15cm high, so far too big to just plug into the wall!

Next Steps

I’ve got a couple of Z-Wave Fibaro motion detectors that also supply temperature and humidity info that go through batteries at an incredible rate. To be honest, the temperature and humidity data is more important that the motion sensor, so I’ve ordered a couple of temp & humidity sensors to replace them as well as 2 more buttons.


FYI – These devices are NOT always CE certified for use in the UK, so using them is at your own risk.





Posted: June 16, 2017 in Audio, HA, House, Work Stuff

Well, apparently it’s been almost 6 months since I last posted…. where did the time go? New job, new projects and general family I guess.

Anyway, I had been playing with the HiFiPi, but I got sidetracked by trying to get it working with Logitech Media Server that runs on the family server… that way I can integrate it with OpenHAB and control it around the house (read turn off the kids music after bedtime!). That diverted into trying to get a touchscreen working and then the Pi got requisitioned for a different project…

A MagicMirror project…. that then involved me writing a couple of public transport modules – bus stop info and railway info just because I felt the need to write something! The not being a developer/R&D engineer occasionally bites.

That led to me rebuilding OpenHAB (again) using the new OpenHABian RPi image and then trying to tidy up the sprawl that our OH installation had become. Basically trying to make it a bit more ‘logical’; grouping rooms by floor and use, new targeted site maps and stuff like that rather than having one huge file for all items, one for rules, one multi-level sitemap etc etc. I’m now involved in helping to test a new OH binding that is used to control the Honeywell EvoHome system.

I’ve also finally got a reasonable amp and speakers in the lounge… but of course that meant cleaning up the rats nest of cables behind the AV cupboard and retiring as part of installing the amp!

So I have been doing stuff… I’ve just been too busy actually doing it to blog about it.

Repurposing Wireless Doorbell Button

Posted: January 14, 2016 in HA, Hardware
Tags: , ,

Because I found myself turning things off or down when I went to bed, I added a simple button on the OH app to run a very simple script to turn off lights and arm the motion detectors. Once I got my head around the heating API I also added calls to turn the heating in certain rooms to night mode.

This was all great, but I still had to go through the hoops of finding a device, opening the app, and pressing the button. I wanted a physical button to do this!

Enter the Nexa Push Button (LMLT-711) from Clas Olson. This is a 433Mhz device that is designed to work with various other Nexa doorbells. BUT as it is 433Mhz, and Nexa is supported by the excellent RFXCom plugin on my Veralite, it should work.

Other Nexa items – several temperature/humidity sensors have al worked perfectly with the Vera and are happily reporting from around the house (and they are a LOT cheaper than the Z-Wave equivalent).

Anyway although the device is supported and appears in the Vera console, pressing the button seems to trigger the ‘group-on’ button that automatically ties itself to Scene 100. Trouble is that scene 100 doesn’t exist… and I’ve never figured out how to create a specifically numbered scene!

Screen Shot 2016-01-14 at 09.07.32

Trying to create a new automation scene and then change the scene that gets triggered didn’t work either; it just reset back to 100. This meant that I couldn’t do much in Vera and then even less in OH.

Anyway – after discussions with Guessed & Lolodomo on the OH forum I figured out a way around the issue.

1. Connect the Nexa doorbell button to the Vera (device #134)
2. Create a virtual switch in Vera (device #140)

Screen Shot 2016-01-14 at 09.07.47

3. Create a new scene & trigger in Vera – the trigger is tied to the actual Group On/Activated event from the doorbell button. When it is triggered it runs the follow LUUP script:

status = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status", 140)
 luup.call_action("urn:upnp-org:serviceId:VSwitch1", "SetTarget", {newTargetValue = "0"}, 140)
 luup.call_action("urn:upnp-org:serviceId:VSwitch1", "SetTarget", {newTargetValue = "1"}, 140)

This basically toggles the state of the virtual switch…. an event that I can detect and use in OH very simply.

Switch Bedtime "Bedtime" (gSettings) {mios="unit:house,device:140/service/SwitchPower1/Status"}

4. When OH Bedtime is ‘ON’ – run the script….

I currently just use a timer to reset the switch back to ‘OFF’ after 30 minutes, it doesn’t do anything, just changes the status of the switch across the different devices so it’s ready for use the next night.

Alternatively I could get it to run ‘wake up’ events instead – push on at night and then push off in the morning, but I’ve not really thought about what I could do until now…..


UK Clas Olson Nexa button – here

New Equipment Cupboards

Posted: February 2, 2015 in House
Tags: ,

As part of various discussions about the house, it was made clear that the “dust trap” that is my AV shelves is not the best solution. I looked at various options to replace the units with something that would allow me to keep the equipment closed away. Not only would this lower the dust on the equipment, it would also improve the “minimalist” look my wife desires.

After checking out some really good Ikea hacks, I thought my best solution was something like the Besta range, but then modified for better cooling and internal cable runs. When I actually sat down to figure out the details it became apparent that there was no way in hell that I could actually fit the equipment into the cupboards unless I left the back off or magically made the units deeper.

Non Ikea AV racks/cupboards of the size I want are so expensive that there’s absolutely no way I could afford them, so even trying to justify them would be utterly pointless!

A scurry around my favourite forums revealed that several people had the same issue but had ended up having bespoke units made for a lot less. One of the companies that kept coming up was

Thankfully the focus has now moved on from the AV cupboard to other things, so I’m no longer in the market, but I am still planning on getting a unit from them one day.

HA Adventures

Posted: December 16, 2014 in HA, Hacking and playing
Tags: ,

So the foray into other HA platforms continues. I wrote in November that I was playing with Domoticz. I eventually bought a new Aeon Labs Z-Stick, excluded a couple of sensors and a switch from my Veralite and built up a small Z-Wave system controlled by the Domoticz platform running on a RPi.

Loved the system, clean but usable interface, didn’t seem to struggle running on the RPi. Lots of updates, so obviously still actively developed and the ‘blocky language’ allowed me to build some fairly complex queries and rules without resorting to Lua. I have to say that I came very close to moving everything off of the Veralite and across on to the RPi.

I then managed to throw myself a curveball. EvoHome.

I also wrote about us installing this new heating system and while loitering around various forums I saw that people had managed to persuade their EvoHome systems to spit out the temperature data via simple scripts.

A bit of a play later and I had some JSON with the reported temperatures for every room in the house direct from EvoHome. Niiiice!

The trouble was that I couldn’t figure out how to get the info back into Domoticz. To be honest I didn’t even bother with the Veralite – that just wasn’t going to happen. I hoped that I could create a virtual object or some kind mapping that would allow for the live temperature data to be integrated into the platform. I couldn’t figure out a way to do it without seriously re-writing blocks of the Domoticz source code. I even tried to go around the problem by pushing the data into my Mosquitto MQTT broker on the same device and then trying to access it from there. While I could see the data, I had no way to get it into the system where it could be used.

While I’m struggling and failing with this particular scenario at home, I’ve been asked to get involved with a discussion about Automated Homes at work. Now I should stress this was without doubt the most painful professional experience of my life – a bunch of “creatives” and “strategists” trying to discuss HA…. and having absolutely sweet bugger all idea of what it is. They obviously have watched Iron Man and decided that J.A.R.V.I.S. was doable on a RPi and wouldn’t it be just fabulous to do it. To be fair, this was almost the same group that I had to help with “gaming” the week before (the second most painful professional experience, although it was the first until this week). That particular meeting started with me having to explain the difference between a console and a PC as a gaming platform, why the XBox (360 & One) weren’t PCs and that Amazon TV wasn’t quite the same as a PS4….. Suffice to say it went downhill from there…..

Anyway, rant aside, one thing I did end up doing as an “action” from that meeting was to compile a list of HA platforms for them to examine (which they will ignore… and then they’ll probably send someone to the US to look at what is available over there, buy a Wink hub and wonder why it doesn’t work anyway…. ). Sorry, you can tell I’m a bit jaded by this whole fiasco.

Bottom line, I ended up looking at the OpenHAB platform again.


Posted: December 16, 2014 in HA
Tags: ,
I’ve been busy…. and things have moved on.
We’ve recently installed a Honeywell EvoHome heating system and apart from a few niggles it has been brilliant. It is amazing how much of a difference you can feel as you walk around the house. Not running the heating upstairs during the day and vice-versa will hopefully save me money in he long term.
The system is expensive…. but it cost me roughly the same amount to install as I spent on gas last year. If I can save even 20% a year, I’ll pay it off in 5 years… and that assumes the gas prices won’t increase. And we all know how likely that is!
More information on the system here and reviews here. Plenty of other reviews are available as well.

Adventures in HA – Part Two – DomotiGa (2)

Posted: November 4, 2013 in HA
Tags: ,

So after playing with DomotiGa for a week or so I got the hump. It’s a good stable system, but it didn’t recognise any of my Z-Wave devices, making it a right pain to set up. I liked the weather integration and the useful data it would throw up, but the struggle to persuade it to log the temperature from my 3-in-1 sensor or act when motion was detected was irritating.

I can spend hours building and updating and configuring, but that isn’t actually turning my lights off or telling me the temperature in a bedroom over the course of a day. I’m sure I could do it, if I wanted to spend hours playing and configuring, but I’m of the opinion that I need to DO, not BUILD with this stuff. The point is to get a measurable return on investment, NOT to spend all the time getting it to work.

I also need something that can be controlled from a tablet, and the included interfaces wouldn’t pass the WAF.

If this was a curiosity project, I’d love to keep playing with it, but it is supposed to be the foundation of a serious use, so playing isn’t an option. I want to be able to buy a device, add it, have the platform recognise it, and use it in the way it is designed. Time to move on to the next platform and give it a try.

DomotiGa –