Tag Archives: home assistant

Home Assistant – Journey Start

Updated 26 October 2024

Home Assistant is a free Open Source device integration platform enabling a wide range of sensors and automations to make life that bit more smart and enabling data to be displayed in a way that suits you.

I’m a late starter with Home Assistant and after watching loads of YouTube videos’ I bought the bits in February 24.

I must make it clear to start with, I’m a novice and not a programmer all my information comes from forums and YouTube.

The image above is the brains of Home Assistant and as you can see it is very compact, the enclosure houses a Raspberry Pi4B and fan, beneath the unit is an external SSD Hard Drive.

Home Assistant is powered by a PoE adapter, to the right of the picture you can see a Conbee II Zigbee Gateway used to receive data from wireless devices.

How do I use it?

Home Assistant is so incredibly adaptable, only your imagination is the constraint, my needs are a lot simpler and I wouldn’t know how to do half of the stuff its capable of 🙂

My main use is data collection to allow me to monitor performance after that I have a few alerts set up and linked automations.

The above is a portion of my main dashboard which is accessible anywhere on my home network, it is also available to me via the internet by subscribing to an inexpensive service.

From this one dashboard I can monitor a large number of variables to builds trends and performance management also there are of automations, the obvious one is for Octopus Free Energy, once a period of free energy is known and its duration, I enable the automation and a number of power hungry devices automatically turn on for the duration to make best use of the power, items turned on are the Immersion Heater, tumble dryer and underfloor heating, but it could be anything with a Home Assistant linked device.

A less obvious automation is based on Mains Water Pressure as where I live the water pressure can drop very low, so being alerted to this is very useful.

The automation is set so that if the water pressure drops to less than 1 bar for 1 minute, my mobile phone is sent a notification, I also get similar phone notifications if my leak detectors trigger, (Kitchen, Boiler and Irrigation System enclosure).

This is just a small introduction as to what Home Assistant can do, go enjoy!

Disaster!

18 October 2024 – A local underground joint failed causing a 4 hour power outage, on restoration of supply a number of Shelly devices blew there surge protection and rendered them no longer serviceable, (I did try and change the Varistor and fuse link but still U/S).

Process now ongoing to replace them and fit RC Snubbers to inductive loads in case this was a cause for at least one of the Shelly’s to fail, the one below was connected to the 1kW pump for my irrigation system, (all connections were tight).

Convert manual lever valve to automatically close when a water leak is detected

Updated 27 August 2024

I have an irrigation system with a water break-tank containing ~ 400 litres which is used to supply an unattended pump, the problem I needed to solve was what if there is a leak or burst in the pump enclosure, I don’t want the tank to empty.

The break-tank does have a base valve and I saw on Aliexpress that they did 12v clamp on motorised heads which can convert a manual lever valve into an automatic valve, enabling both electrically operated, opening and closing, these cost ÂŁ10.42 including VAT and postage I thought I’d give one a go and ordered the 3/4″ clamp version.

When the unit arrived, it became obvious that it physically wouldn’t fit on the base valve, so I bought a 22mm full bore lever valve, (Toolstation part 92144), and fitted this upstream of the base valve giving plenty of room for the head to mount.

Fitting of the head is very easy with a clamp being used around the pipe to hold it in place and the moveable arm has adjustable pins for accurate lever alignment.

On the base of the head is a ‘ring pull’, pulling this disengages the motor enabling manual operation of the valve.

The video is a bit rough as this was the first actual test after building the control system and triggering the valve using a licked finger on the sensor.

The motorised head has no positional output, once power is applied, it will drive 90o in one direction and stop, reversing the motors polarity, will cause the motor the drive 90o in the opposite direction and stop, all very simple.

Home Assistant monitors my irrigation system, so it was a logical step to include the leak detection system into that, however, it will run without Home Assistant from the Shelly App.

The Shelly Uni has two outputs and two inputs, each of the outputs was used to trigger a relay for valve open and valve close.

One of the inputs was connected to a probe with separated contacts, if the contacts are bridged (wet finger), the Shelly detects this which was perfect, the other input I used with a reed switch so that I could open and reset the valve with a magnet, I chose this way so that I didn’t have to drill the IP rated enclosure, (Toolstation part 91800, 80 x 80 x 50mm), the circuit board will live in.

The above image is of the test leds simulating the motor polarity with the finished circuit inside a IP65 rated enclosure.

Finished water leak protection valve wired up to relays within IP rated enclosure.

12v from PSU to Shelly and relays from motor control box, in the top right you can see the white water leak sensor.

The Shelly Uni has a timed output facility, also the inputs can be linked to the outputs, this means that if the leak sensor detects, the associated output will operate for a preset time, in my case I used 10 seconds for both open and close duration.

Below is my Home Assistant irrigation status dashboard this shows the status of the leak detection sensor and the valve position, (done by virtual entity toggling status, rather than valve feedback).

When a leak is detected in the pump enclosure, the break-tank base valve will close and at the same time, the pump contactor will be interlocked to prevent operation.

An automation linked to my local calendar, will ‘exercise’ the base valve to close, then open, monthly, this automation will be overridden if the irrigation system is in use or a leak has already been detected.

I can either manually trigger the valve to open by offering a magnet to the side of the control box, or use Home Assistant, once the valve is triggered to open, the interlock comes off the pump contactor.

I have also set up Home Assistant to send a notification to my mobile should a leak be detected not only from the pump enclosure, but from a wireless leak detectors placed by my heating boiler and washing machine.

The mobile alert action below is for the pump enclosure and is triggered when the valve closes on water detection:

BK-G4M Gas Meter – Home Assistant

Updated – 12May 2024

I wanted to measure the volume of gas taken by my Ideal Vogue 18kW boiler in order to convert this to input energy in kW and therefore determine if the boilers displayed efficiency is accurate.

I decided to get a secondary gas meter fitted inline with the gas feed to the boiler, the meter was a BK-G4M from HERE.

The meter comes with a prewired switch assembly to count the number of 1/100 of m3 wheel rotations:

I’m a complete novice when it comes to Home Assistant and rely wholly on YouTube, community forums and search engines for information, and I would like to pass my sincere thanks onto all content creators who help folks like me.

I used a ESP8266 flashed from within Home Assistant with the coding configuration to enable the meters switch to increment the displayed gas reading on the dashboard of Home Assistant.

Current code used below:

The above code gives a stable output to Home Assistant with no creep over time 🙂

Once the data is being imported into Home Assistant you can manipulate in many ways:

ESP8266 mounted on breakout board from Aliexpress, the other items within the enclosure are an M-Bus reader and Open Energy Monitor Pi for my heat meter.

Links to Sources –