ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Home Automation requirements match

Tue Nov 06, 2018 2:53 pm

I am completely amazed - and baffled - by the sheer volume of projects for Home Automation on the Pi; wonderful to have so much choice but I mean how do I just "install & go" because i don't have inclination or time to try everything...so I ask:

  • what operating system? [Raspian, dedicated, etc.]
  • what controller software [OpenHAB, Home Assist, MyCroft, Jeedom, others, etc.]
  • what platform [z-Wave, Things, WiFi, Bluetooth, Fibaro, Nest, others, etc]
  • what devices [manufacturer/model]
So i have done research, but now I need some help to marry up my requirements with all the options, please.

My requirement is:-
  • must use Raspberry Pi 2 or 3 as the hub/server/controller - do not want proprietary hubs/server/controllers.
  • must be battery powered devices, NO wires
  • TRVs on each of the six radiators
  • TRV must be able to use rechargeable batteries and report their charge level
  • TRV must be able to sense temp as I do not want separate room stats in each of the six rooms
  • Cost is priority for TRVs because I will need 6 so clearly I do not want to be paying £100 for each !!
  • max range from TRV to Pi2/3 is 15 metres [we have no prob with WiFi signal over that range in the home]
  • Simple to use, but informative [graphs, charts, etc] GUI accessible throug internet and/or Android AND iPhone apps, to control system.
  • Operate in UK

Has anyone done this, can they please recommend a setup please?

scotty101
Posts: 3723
Joined: Fri Jun 08, 2012 6:03 pm

Re: Home Automation requirements match

Tue Nov 06, 2018 3:17 pm

ninjaEF wrote:
Tue Nov 06, 2018 2:53 pm
must use Raspberry Pi 2 or 3 as the hub/server/controller - do not want proprietary hubs/server/controllers.
This is my main sticking point. I didn't want a proprietary only system and have ended up with an RFXCOM device (http://www.rfxcom.com/en_GB) which supports *some* of the other protocols out there but not all. I've found it works well with the Domoticz Home Automation software (on Raspbian) with LightwaveRF devices and does most of what I want it to but so many of the lower cost devices that are coming on to the market only work with Amazon/Google platforms. There are ways to connect Domoticz to platforms like Google Home but they rely on a monthly subscription.

I too wish there was a single open platform that did everything I want but all you are going to get is a compromise and you're going to have to do the hardwork to figure out which one best meets your use case. They all have good and bad points.
TRVs on each of the six radiators
You shouldn't have a TRV on all of your radiators. There should be a radiator in your home that is either a TRV set to max or doesn't have a TRV at all. This radiator is the one in the same room as the thermostat that controls the boiler.
I can't recommend any TRV since I haven't used any controllable ones in my home, just a standard digital thermostat for my smallish home.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

PhatFil
Posts: 1373
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Home Automation requirements match

Tue Nov 06, 2018 3:44 pm

having dipped my toes into these waters i would suggest you start by looking at devices that contain esp8265/6 type socs. these can generally be flashed with alternative firmware such as tasmota. https://github.com/arendst/Sonoff-Tasmota/wiki/ to provide home automation control at a very reasonable price.

Tasmota like many iot projects employs mqtt as the medium of control and query communication. You can employ a remote public mqtt broker but with a pi imho its far better to hist this on your pi locally.

As you have discovered there are a number of mature home automation projects with a full feature list. After a quick look at a couple of the popular contenders i opted to employ node-red again hosted on my pi. I found it quicker to get started with but it does have its own learning curve too all be it one that starts off a little less steep than others ;)

for sensor input you can mod many esp based devices to incorporate a number of sensors, but some off the lower cost shelf bluetooth ble sensors have been cracked. https://zsiti.eu/xiaomi-mijia-hygrother ... pberry-pi/

You can also extend your system to incorporate some 433mhz alarm and control(buttons) devices using a £10 sonoff rf bridge (reprogrammed with tasmota firmware see above link)

for your interface with the system the node red dashboard is a gui web interface you can construct to fit your needs and many mobile phone apps exist that give you a gui way to send and receive mqtt payloads

for bespoke devices the wemos d1 soc is an ideal budget candidate for the controller as it can be powered via a 5v usb micro cable and exposes gpio pins for your custom i/o to sensors and or relays.

have fun..

stevend
Posts: 213
Joined: Fri Oct 11, 2013 12:28 pm

Re: Home Automation requirements match

Tue Nov 06, 2018 8:28 pm

I have a system where everything uses MQTT for communication, and you'll find that a good medium for any 'special' sensors you might do using esp8266 or other networked devices.
At present I'm using Openhab 1, which works, although the GUI is a bit lacking (and its been superceded).
I've been looking closely at Openhab 2, which has been around long enough to have become pretty stable. The GUI area looks as if its been greatly improved. It doesn't (as far as I've found) have the ability to get a number of values from a sensor with a single MQTT subscription, and I'm concerned that my current >500 individual subscriptions may be excessive at times.
If you decide to go OpenHab, avoid their extremely arcane rules language - install the jsr223 plugin and use Python. Much more comprehensible.
I've also looked at Domoticz, which has many attractions (not least being written in C rather than Java), but has weak MQTT handling.
I've not run up either of these two yet, so the comments are based on the documentation.
I've dabbled a bit with NodeRed, but not properly got to grips with it.
I also looked at a number of other systems which didn't appear to meet my requirements (MQTT handling is a good filter!)

For things like the radiator valves, I suggest you look at what systems are available - people like Energenie are relatively low cost, and sometimes publish the protocols for you to add code. If you're minded to dabble, look for the OpenHR20 project; the Honeywell valves have been reverse engineered and there's some open source software which includes an RF control module. (I tweaked it to use hardware-based comms, since all mine are hard-wired). AFAIK all the TRVs have their own internal temperature sensor; whether you can access the temperature remotely will depend on the TRV, and I have reservations about the effectiveness of a sensor so close to the heat source.

A problem I found with interfacing things like radiator valves is that none of the systems appeared to support the concept of having multiple identical devices, each having multiple values and commands, in an efficient way - this is largely why I'm still dithering! (A radiator valve returns something like 10 values, and has 4 or 5 command points).

It might be that your final choice of system is strongly influenced by the peripherals it supports, more than anything else.

If you're going to run the software on a Pi, an external hard drive or similar will be essential, since all these systems produce logs - invaluable in diagnosing problems.

ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Re: Home Automation requirements match

Wed Nov 07, 2018 10:42 am

scotty101 wrote:
Tue Nov 06, 2018 3:17 pm
You shouldn't have a TRV on all of your radiators. There should be a radiator in your home that is either a TRV set to max or doesn't have a TRV at all. This radiator is the one in the same room as the thermostat that controls the boiler.
Nonsense mate; many a household implements this; I've seen it. Works well; different temps in different rooms; any demand for increase in temp is sent to a RF switch controlling the boiler; I already have the RF switch which I control though an app on my Phone - Cosy App. My neighbour next door uses the MiHome system multi TRV and works perfectly but that uses a hub, requires an account, and the TRVs are like £80 each. I dont want an account [in case the hosting company goes down] nor do I really want to pay £80 per TRV. Otherwise I'd use MiHome too.
Last edited by ninjaEF on Wed Nov 07, 2018 10:51 am, edited 1 time in total.

ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Re: Home Automation requirements match

Wed Nov 07, 2018 10:51 am

stevend wrote:
Tue Nov 06, 2018 8:28 pm
I have a system where everything uses MQTT for communication, and you'll find that a good medium for any 'special' sensors you might do using esp8266 or other networked devices
Indeed, i think Hive in the UK uses MQTT. I was going to look into this. Supposidly efficient too.
It doesn't (as far as I've found) have the ability to get a number of values from a sensor with a single MQTT subscription
Please elaborate - single MQTT sub?
For things like the radiator valves, ....
This is the primary reson for my desire to go Automation. Next door runs a Energenie MiHome system but that requires a hub+account and the TRVs are like £80 each. I dont want a hub+account because of security, future proofing,, resiliance of company, etc.etc nor do I want to pay £500 for all the TRVs i need.
My main requirement is temp sensor on the TRV, abiliuty to use rechargable batteries and for the charge to be correctly reported, and for it to be able to use MQTT. As a software engineer I can sort out the app/control side no probs, but I'm not a haardware guru so could do with some suggestions on TRVs.
A problem I found with interfacing things like radiator valves is that none of the systems appeared to support the concept of having multiple identical devices, each having multiple values and commands, in an efficient way - this is largely why I'm still dithering! (A radiator valve returns something like 10 values, and has 4 or 5 command points).
Elabroate please mate; why cant a system have 6 TRVs that are individually addressable with discrete values set across them? Explanation please.

** edit:
Been researching.
Looks like I'm going for Z-Wave system, with the PI as the headless controller and an android app. Not sure which app is the best and how it will connect to the Pi? Guess i will need a Z-dongle - which then brings into question what O/S and software to run on the Pi?

stevend
Posts: 213
Joined: Fri Oct 11, 2013 12:28 pm

Re: Home Automation requirements match

Wed Nov 07, 2018 1:33 pm

Both of the below points are part of the same "problem":
ninjaEF wrote:
Wed Nov 07, 2018 10:51 am
It doesn't (as far as I've found) have the ability to get a number of values from a sensor with a single MQTT subscription
Please elaborate - single MQTT sub?
MQTT allows you to subscribe to a topic with a wildcard - heating/valves/1/#, for example - which would give you a message any time one of the valve parameters changed. OpenHab doesn't (as far as I've found) support that concept of single subscription for one valve - you have to individually subscribe to each value you want - say 10 values per valve. Then see the next point!
ninjaEF wrote:
Wed Nov 07, 2018 10:51 am
A problem I found with interfacing things like radiator valves is that none of the systems appeared to support the concept of having multiple identical devices, each having multiple values and commands, in an efficient way - this is largely why I'm still dithering! (A radiator valve returns something like 10 values, and has 4 or 5 command points).
Elabroate please mate; why cant a system have 6 TRVs that are individually addressable with discrete values set across them? Explanation please.
The system can do what you say - just in an inelegant and inconvenient way.
If you were writing your own software to interface to a number of TRVs, you'd quite likely declare a class (or a structure in plain C), and have one instance of the class for each valve in your system. You'd likely put these into an array. So you could, for example, access a value from a specific valve as valveArray[valveNumber].demandTemp. Or you could implement a display block to show data from a valve, and with the array concept you just pass the index number for the valve of interest. Generic handlers are straightforward. With OpenHab (and every other system I've looked at) each individual data point has to have a unique name. In consequence it takes a fair amount of effort to set everything up. I've probably ended up with nearly 20 data points per valve; 12 valves and that's 240 data point definitions to type (OK, copy and paste, but it's easy to miss an edit) and 240 separate MQTT subscriptions. I'd love to hear of a system that doesn't work like this!

scotty101
Posts: 3723
Joined: Fri Jun 08, 2012 6:03 pm

Re: Home Automation requirements match

Wed Nov 07, 2018 2:18 pm

ninjaEF wrote:
Wed Nov 07, 2018 10:42 am
scotty101 wrote:
Tue Nov 06, 2018 3:17 pm
You shouldn't have a TRV on all of your radiators. There should be a radiator in your home that is either a TRV set to max or doesn't have a TRV at all. This radiator is the one in the same room as the thermostat that controls the boiler.
Nonsense mate; many a household implements this; I've seen it. Works well; different temps in different rooms; any demand for increase in temp is sent to a RF switch controlling the boiler; I already have the RF switch which I control though an app on my Phone - Cosy App. My neighbour next door uses the MiHome system multi TRV and works perfectly but that uses a hub, requires an account, and the TRVs are like £80 each. I dont want an account [in case the hosting company goes down] nor do I really want to pay £80 per TRV. Otherwise I'd use MiHome too.
Not nonsense.
The EU Energy Performance of Buildings Directive (EPBD) was revised this year (2018). It provides that individual room temperature controls such as TRVs do have to be installed in new-builds and in existing builds when the boiler is replaced. From 2006-2018, this had only been ‘good practice’, rather than mandatory for installers, although the majority of engineers did install them. Further information is set out in the Government’s Domestic Building Services Compliance Guide (2018 version).

This document states that during a gas or oil boiler replacement, space heating should be provided with “a room thermostat in a reference room served by the heating circuit, together with individual radiator controls such as TRVs on all radiators outside the reference room”.

However, if only certain components of the boiler or wet central heating system are being replaced, the installation of TRVs in every room except the reference room is described again as “best practice”, rather than a requirement. However, the benefits of TRV’s mean that most good heating engineers would recommend them in any event.
Source: http://www.yougen.co.uk/blog-entry/3064 ... 18+update/

Remember that the room thermostat is the boss. It tells the boiler when to stop and start. Once the temperature you require in a specific room is reached, all the radiators will go off, whether their thermostatic valves are open or not.
If you have a fixed room thermostat, you need to choose the size of your radiators correctly so that they will be able to heat your rooms the way you want them; in the bathroom, for example, you need to fit a radiator that’s big enough to heat the room up to 24oC while your reference room is warming up to 21oC.
The thermostatic valves in the reference room where the room thermostat is located must always be set to “maximum heat”. In fact, if you alter the valve setting, you may be interfering with the work of the room thermostat. When you move your wireless thermostat, make sure you adjust the valves in both the new reference room and the old one.
Avoid constantly adjusting the thermostatic valve settings; if you’re cold, opening the valve fully won’t help. In fact, until the level of warmth requested has been reached, the hot water inlet valve will be fully open, even if you can’t see it! The work of the thermostatic valve is limited to stopping the temperature from going above a certain level. It only closes the valve when the required level of comfort has been reached.
Source: https://www.energuide.be/en/questions-a ... stat/1451/

Rationale being that the radiator in the reference room sets the balance for rest of the house and having a TRV (or a TRV not set to maximum) will throw off this balance.
Control of various zones of a larger house is possible but requires extra values.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Re: Home Automation requirements match

Wed Nov 07, 2018 2:41 pm

stevend wrote:
Wed Nov 07, 2018 1:33 pm
Both of the below points are part of the same "problem":
...
I've probably ended up with nearly 20 data points per valve; 12 valves and that's 240 data point definitions to type (OK, copy and paste, but it's easy to miss an edit) and 240 separate MQTT subscriptions. I'd love to hear of a system that doesn't work like this!
Got it! Thanks for that. Wow, yes, I assume then that the mechanism for capturing data is a product of the protocol used by Z-Wave in the firmware of the TRV, rather than the controlling SW which simply needs to be protocol compliant. i need to do some digging into Z-Wave then .

I would have implemented the software using MVC type architecture and as you say, the Model would be something like a base class from which all devices are derived; for the TRV I would - yes - define a generic class from which a number of concrete classes can be instantiated according to manufacturer; and - yes again - I would have an array or rather a collection of class objects that represent all devices in the system. "data points" would be class attributes and changes to them [as ready by the device] would be propogated as paramters on callback events that the MVC View can present and the MVC Controller select/deselect for viewing. Might write my own lol!
Last edited by ninjaEF on Wed Nov 07, 2018 2:50 pm, edited 1 time in total.

ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Re: Home Automation requirements match

Wed Nov 07, 2018 2:48 pm

scotty101 wrote:
Wed Nov 07, 2018 2:18 pm
Not nonsense.
YES it is! Complete and utter!

Why are you quoting EPBD which is not regulation but advisory.

And a stat DOES NOT have to be included in a heating system where TRVs control the heating space.

A NC-sTRV (normally closed smart TRV) will NOT allow water to flow through the rad and thus be bypassed unless commanded to open. What ARE you talking about? So it is perfectly acceptable to control heating via TRVs on all rads without a stat on single or multi zone systems.

Part-P qualified HVAC engineers are required to install any electricals such as the main smart-switch controlling HW + CH, where simple sTRV replacements are used in conjunction with a centric hub/Pi type controller.


I genuinely , honest , have no idea what are you talking about - looks to me like you're gooling and getting 3 = 1+1 !!

scotty101
Posts: 3723
Joined: Fri Jun 08, 2012 6:03 pm

Re: Home Automation requirements match

Wed Nov 07, 2018 3:04 pm

Whatever dude. Don't get aggressive about it.

Only quoting what is publicly available since the actual standards are behind paywalls.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

ninjaEF
Posts: 19
Joined: Thu Jan 14, 2016 9:06 am

Re: Home Automation requirements match

Wed Nov 07, 2018 3:17 pm

stevend:

Found this, and installed it, looks like it is possible to set temps without having to create 00s of data points. Rules based system adds to flexibility.
https://www.home-assistant.io/components/climate.zwave/

stevend
Posts: 213
Joined: Fri Oct 11, 2013 12:28 pm

Re: Home Automation requirements match

Thu Nov 08, 2018 11:16 pm

ninjaEF wrote:
Wed Nov 07, 2018 3:17 pm
stevend:

Found this, and installed it, looks like it is possible to set temps without having to create 00s of data points. Rules based system adds to flexibility.
https://www.home-assistant.io/components/climate.zwave/
Thanks - looks like its come on a bit since I last considered it.

Just had a quick look, and the MQTT handling looks promising - assuming its possible to get at the 'tail' of a topic, a single subscription for a valve looks possible. And coding things up in Python is more attractive (to me) than having to learn Java.
Never had to learn YAML, but doesn't look too difficult.

I'll have to make time to set up a test system

stevend
Posts: 213
Joined: Fri Oct 11, 2013 12:28 pm

Re: Home Automation requirements match

Sun Nov 11, 2018 9:38 am

You could look at https://novo-heat.com/ for valves. Not sure whether anything has shipped yet, but the backer price is very reasonable, and they don't even need batteries!

User avatar
bensimmo
Posts: 4178
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Home Automation requirements match

Sun Nov 11, 2018 12:47 pm

that open radiator and thermostat is what most boiler fitter/heating people have quoted too.

Which is odd as it is one room controlling the whole system, so you just set that room to 30decC to turn the heating on and let the TRV's do their job. One room gets blindingly hot. The hallway usually in most places I've seen OR the other rooms turn off to early. As making calculations and balancing the TRVs for all weathers just doesn't work in most buildings which are not new building and of a mixed build.

Boilers and see the temperature of the water returning, not a lot of loss and they can adjust themselves.
Mine will see the 'thermostat' temperature and the return temperature and modulate itself around that (dropping the flame and or flow to reduce the heat etc, it' makes the TRV's a lot more effective. That and outside temperature to give some indication of the rate of loss of the building. Far more complicated that I know what these delta points are ;-)
That's a proper Smart Thermostat/Boiler

If you use the TRVs or ESP8266 devices for temperatures to be your house thermostat, then that via the Pi here can control your boiler (and flame if it has it, most modern boilers should I would hope).
They used to say you keep one open for a guaranteed return flow with some heat loss (I use my small towel radiator for that as I tend to want them on)

I don't know the SMART TRV's so cannot advise. I would have thought a small battery powered temp sensors would be better for an actual room temperature rather than a temp 1" from the radiator. It would make balancing the TRV position to the actual room temp much easier.

stevend
Posts: 213
Joined: Fri Oct 11, 2013 12:28 pm

Re: Home Automation requirements match

Sun Nov 11, 2018 2:58 pm

bensimmo wrote:
Sun Nov 11, 2018 12:47 pm
that open radiator and thermostat is what most boiler fitter/heating people have quoted too.

Which is odd as it is one room controlling the whole system, so you just set that room to 30decC to turn the heating on and let the TRV's do their job. One room gets blindingly hot. The hallway usually in most places I've seen OR the other rooms turn off to early. As making calculations and balancing the TRVs for all weathers just doesn't work in most buildings which are not new building and of a mixed build.

Boilers and see the temperature of the water returning, not a lot of loss and they can adjust themselves.
Mine will see the 'thermostat' temperature and the return temperature and modulate itself around that (dropping the flame and or flow to reduce the heat etc, it' makes the TRV's a lot more effective. That and outside temperature to give some indication of the rate of loss of the building. Far more complicated that I know what these delta points are ;-)
That's a proper Smart Thermostat/Boiler

If you use the TRVs or ESP8266 devices for temperatures to be your house thermostat, then that via the Pi here can control your boiler (and flame if it has it, most modern boilers should I would hope).
They used to say you keep one open for a guaranteed return flow with some heat loss (I use my small towel radiator for that as I tend to want them on)

I don't know the SMART TRV's so cannot advise. I would have thought a small battery powered temp sensors would be better for an actual room temperature rather than a temp 1" from the radiator. It would make balancing the TRV position to the actual room temp much easier.
With a basic system, you have to have the thermostat and the non-TRV radiator in the same room (and the radiator turned on!) otherwise the thermostat can't do its job.

Some (all?) pumped systems also have a bypass loop which is opened when the flow is insufficient.

Older boilers have simple 'on-off' control; they heat until the water reaches the demand temperature, then turn off until the temperature drops by, say, 10 degrees. So output temperature varies considerably. Modern boilers have 'modulating' control; they adjust the heat based on the temperature differential across the boiler, and possibly the flow. Output temperature is pretty much a straight line once the system has warmed up.

The main point is that you need to turn the boiler off when no heat is required, otherwise it keeps pumping hot water round the bypass loop (or overworking the pump, if you don't have a bypass loop). So wasting energy on the pump (150-250watts, IIRC) if nothing else. I have individual room control, and the main controller generates that 'heat required' signal. Boilers generally have a flow switch; on my old boiler, I'm reasonably certain it treated 'no flow' as a 'latching' problem which disabled the boiler until reset. Not tried it on a modern boiler; maybe they measure flow in an alalogue manner.

I am working towards several temperature sensors in each room, and its quite interesting how the temperature can vary across the room. An external wall can be noticeably colder than internal.

User avatar
bensimmo
Posts: 4178
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Home Automation requirements match

Mon Nov 12, 2018 9:31 am

This isn't an old setup though, the 'thermostat' is in each room and smart enabled in this project so can report back.

But the reason the one room thermostat (an an old boiler) don't work well is because it turns the whole house off, so it has to be set higher than all the other rooms and then tweaked. TRV's then modulate the room individually. If my front room is of old build and the central house is of new build then that will take longer to cool down. No boiler fitter I have seen has been able to work all the heatloss and stuff out, to be fair most don't understand the new smart thermostats why would they unless they are newly trained or do large building constructions. ;-)

There is no reason no the boiler cannot just do that itself since they can monitor the flow and temperature. (in fact that may be part of the modern ErP spec ?) it modulates/reduces flow and no reason it cannot turn itself off.
In the current mode, mine will still be pumping away even below temp (is a Worcester/Bosch/Nefity) setup if moved into it Eco/compensation mode/intelligent. It *almost* ignores the thermostat.

I think they have a newer version that used TRVs too now, but each TRV cost a fortune, but the ErP rating is improved (not important for a home user)

all fun but it does need a boiler that is clever enough and can be talked to, not just sent an on/off status.

Return to “Automation, sensing and robotics”