Smart Home Toilet Upgrade Project

We have a small toilet near the front door of our house and accessed by the entrance hall. It rarely used by myself and my family and is mainly for use by guests. Over 20 years ago, my wife painted it bright orange in a rush of post natal hormones. It seemed like a good idea at the time an I wasn't going to argue with her!

Over the years, I have been through the house, redecorating and making things smarter where I can but, this room has not been a priority and has been left alone until now. With the Coronavirus lock down upon us, my wife thought it was time to redecorate it. Each time I redecorate a room in our current home, I look at the opportunities to add technology to improve our quality of life. This is a key test I use in adding any smart home technology and it must deliver a great user experience, which means it must be simple, intuitive and invisible (or stylish where it has to be visible).

I never install point technology solutions, every smart home feature has to be integrated and part of our wider contextual smart home and add to its whole home context.

Lighting

Whilst we are decorating, I started looking at the options to upgrade the lighting. My goal is to make this a zero touch user experience but to also leave the manual controls (a pull cord switch) in place so that people can still use it if they want to. This aligns with my general thinking of delivering a great smart home user experience. In practice the light will be on before the door has been opened a fraction of an inch and even after all this time this still feels a bit like magic to me.

My smart home will track occupancy of this room as part of its wider functions and will automatically turn off the light when the room is no longer occupied. If the person in the room decides to turn it off using the pull cord, then that works too. Basically, the light can't be left on by accident.

Most automated lighting is also driven by ambient light levels using our smart home's twilight sensor but, because this room has a very small window that doesn't let in much light, the light will come on during the day time as well.

Access to the roof and the ability to run new wires in this room is very limited. I resigned myself to using wireless technologies for now. My default smart home wireless technology is Z-Wave.

This small room has a centrally mounted ceiling rose and my wife would like to keep this and a standard LED bulb and lamp shade. Having removed the cover I could see a all of the required wires and the 'switched live' to light switch was clearly marked with a red ring on a black wire.

The old switch is small and there is no room for anything else inside it. After 22+ years of use it is also feeling a bit worn. There are just two wires to the switch (and an earth wire), the live feed and the 'switched live' back to the ceiling rose light fitting.

If the paint looks messy, that's because I got my children to paint this room in an attempt to cover over the previous bright orange paint! A proper, quality paint job is being done before it all goes back together :-)

Fortunately, the distance between the ceiling rose and the light switch is only about 50cm, so it should be fairly easy to pull a neutral wire between the two. This will give me more options to automate the lighting.

The Fibaro single switch Z-Wave module (FGS-213) is the latest Z-Wave Plus version. It requires a neutral wire to work in this type of application. I could use the dimmer version and this doesn't require a neutral wire. The LED bulb being used is binary (on/off) and doesn't support dimming.

Note: These newer Fibaro modules are thicker than the earlier ones at 20.3mm. The earlier modules I have are just 16.5mm thick.

I checked using a spare Fibaro module and it will fit inside the new switch housing but is too deep to allow the cover to be fitted. The switch housing needs to be about 5mm deeper for it to fit.

To enable the Fibaro module to fit comfortably, I'm 3D printing a 10mm spacer to sit between the switch base and the face plate (which holds the switch). You can download the STL file. It took 2 hours and 34 minutes to print on my Ender 3 Pro 3D printer.

Warning:  Switches like this are made of a fire and heat resistant material and the PLA used for 3D printing is neither. This is just a 10mm spacer though and there are no wires or electrical elements in proximity to the PLA material. In this respect I think there is a very low risk in using this material.

Door Contact Sensor

Every door inside my contextual smart home uses a wired door contact sensor for best performance, to eliminate batteries and to minimise latency. Low latency is particularly important for a great user experience and door contact sensors are a key input into the nested occupancy model used by my smart home and the 'wasp in a box' algorithm it uses.

Every door in my contextual smart home instantly becomes part of the occupancy detection models and can be simply configured to activate the alarm depending on house house mode.

PIR

Normally, I use wired PIR sensors in my contextual smart home, mostly because they provide the best performance and don't require batteries. In this instance, it is going to be very hard to do this though and my initially plan is to use a Fibaro '3 in 1' motion sensor.

This sensor also includes a temperature sensor, which is handy and a light level sensor which I've not found very useful in these sensors.

My smart home technology abstraction means it will be very easy to change this later if I really do decide to run wires for a wired PIR sensor.

Every PIR in my contextual smart home instantly becomes part of the occupancy detection models and can be simply configured to activate the alarm depending on house house mode.

Blind

More on this later as I'm still investigating all my options. The challenge (as always) is to get networking and power to the window.

Toilet Cistern & Flush

After 25+ years, the integrated cistern (it's basically enclosed in a box) in this toilet is not working so well and my plan was to replace it completely. Whilst I'm doing this, I planned to add a touchless button to flush the toilet. After a lot of plumbing later, I discovered that the flushing mechanism was broken, so this replaced and I kept the old cistern to avoid having to move any pipes. This then revealed that the flush cone seal was leaking. This meant removing the pan from the wall, so a new pan connector and seal was also required!

So I now have a nice, tidy dual flush surface mount button instead of the old lever and I will maybe revisit the touchless flush mechanism later. It will require some kind of power source though, which may prove problematic.

Installation & Setup

Lighting

This is the 3D printed spacer printed in white PLA, to match the Axiom pull-cord switch purchased at Tool Station (product code 44781). I like these switches because they have a nice quality feel to the action, despite being cheap to buy.

When installed it is quite subtle and is not really noticeable with the switch fitted to the ceiling.

My plans to use a new Fibaro switch module were scuppered when I discovered the newer models are fatter. The older modules are just 16mm thick so I'm using an FGD211 dimmer module I had spare.

With a live and neutral present, this is the wiring diagram from the manual.

Z-Wave

The FGD211 had to be included on my Z-Wave network and this was done via the Vera Plus UI (after it did a software update). I then set the following parameters:

This kind of configuration is an annoying feature of Z-Wave but to be fair, some of it is down to me trying to use a dimmer module in a binary (on/off) manner and with a toggle switch.

Note:  I did the installation and set up on my bench before physically installing the Fibaro module inside the pull-cord switch in the toilet. This requires a second switch to wire up and test with. This makes it easier to then install the module and to then connect the wires at the ceiling rose when it is all installed.

This results in the behaviour that I require. The pull-cord switch changes the bulb state when operated but I can also remotely turn the bulb on or off via Z-Wave. Annoyingly though, this is only true with an incandescent/filament bulb. An LED bulb doesn't provide enough load and causes the light to flash on an off (at about 50Hz). This can be fixed by adding a ballast load (which I also happen to have spare) but it's another annoyance.

HCS Integration

Adding the 'Toilet Light' to my Home Control System is simply a matter of adding one line of JSON to its configuration file. This defines the name, zone, type and also the details of the slave processor it is controlled by. In this case the slave is my Vera Plus Z-Wave controller and the Z-Wave ID is also required. Everything else is then handled by my Home Control System, which sends encrypted events using my unified communications protocol, to get status updates from the Vera Plus and to enable intelligent control.

The 'intelligent' control is acheived using a 'controller' and this is also simple configured using some very simple JSON. Basically, if my Home Control System thinks the toilet is occupied, the 'Toilet Light' will be on. At any time a person can change the state of the light using the pull-cord but my Home Control System will track this too.

This kind of zero touch user experience only works if the latency is really low and this is another reason why I'm also using the door contact sensor to trigger occupancy and turn on the light as quickly as possible. If it was purely PIR sensor driven or there were other forms of latency, someone could grab the pull cord and pull it just as the light had been automatically been switched on. This is not a good user experience!

Toilet Temperature

The 'Toilet Temperature' is also an object simply created by adding a line of JSON. In this instance I then configure scenes to run at regular intervals and to send temperature updated to my Home Control System, also as encrypted events using my unified communications protocol.

Since my Home Control System knows which zone it is in, it will automatically use the received updates to update the virtual sensors that represent 'Average Downstairs Temperature' and 'Average House Temperature'.

Summary

Note:  This is a project that is still in progress, as I ran out of paint and getting specific colours mixed in the current lock down is not possible :-(

That said, I've made good progress on all the key elements I'd hoped to work on. This is a great example of how you should plan a new build very carefully and install the wires, power and networking required for all of the things you want to do in a room in advance. Retrospectively fitting them is a real challenge!

As with all my smart home work, the aim of this project was to improve our quality of life and to make our lives simpler, safer and more convenient. I also want the user experience to be simple and intuitive for everyone, so things like the existing pull-cord switch work still work as expected.

Where I do add new technology, it has to be fully integrated with my contextual smart home so that it adds to the overall whole home context and allows it to make more intelligent decisions and take better actions.

The remaining things I've yet to do are:

Things I'd add to this room in a new build are: