Home renovation from Scratch


(Daniel Watson) #1

I am brand new to OpenHAB and home automation. Having bought myself a house (that needs a full rewire!) and a Raspberry Pi (with OpenHAB installed), I am about to have an electrician re-wire the house. However I want to specify the wiring schematic so it is compatible with my plans for Home Automation.
My plans for home automation are:

  1. Heating control for the newly installed underfloor heating.
  2. Lighting control for new LED lights in all/most rooms, including some rooms with lighting scenes, motion detectors etc
  3. Options for blind controls and speakers (To be confirmed)

My first need to is to confirm the wiring requirements for the electrician, considering things like powering LED with 24v or 48v, backup requirements (if RPi or Wifi goes down) and anything else to consider when specifying the wiring.

Also I’m currently looking at HW for lighting and heating. I see that SonOff (https://sonoff.itead.cc/en/) provide very competitive solutions. However I haven’t seen anywhere that they are compatible with OpenHAB. Other brands are available but a much more expensive.

Basically I’m after generally guidance for HW wiring and products to use for a job that starts from scratch, i.e. renovation of a house.

Please help. Any information gratefully received.
BTW I’m based in UK; Suffolk.

Thanks
Dan


(Garry Mitchell) #2

Hi Dan, and welcome to another fellow UKer.

Sonoff devices very much work with openHAB - just not out of the box :slight_smile: You will need to put a different firmware on them, Tasmota and ESPEasy are two options, and this then allows communication with openHAB via an MQTT server.

I’m putting together my central heating system using OH, Sonoffs and Thermal Actuators. I’m currently in testing mode (looking at moving house in the not-too-distant future) so I’m currently installing Sonoff Basic devices in each room, but when I move I will be wiring as much back to a central location and probably using the 4ch Sonoff devices to minimise the number of separate devices spread out around the house.

My biggest bit of advice would be to run as many types of cable to each possible location as possible - ethernet, mains, low voltage, speaker etc - you’ll always find you need the one wire type you didn’t install, and it’s cheaper to run more cable than you think you need now than re-run additional later!

I’ll be following and seeing how you get on with some decisions - as I’ll be going through a similar process soon, and of course being in the UK we’ll have different options and products available to us than some of our foreign friends here :slight_smile:


(Daniel Watson) #3

Hi Garry.
My 1st (naive) question: how to put the new firmware on the sonoff products?..Ah, I’ve just found some youtube vids for Tasmota… I’ll keep on looking.
I’m tempted to go for some SonOff devices now (at risk), to setup some trial… e.g. wireless relays, wall switches and heating sensors.

What’s your sonoff shopping list looking like.
Thanks for the wiring advice. Have you had any thought of removing the 240v supply to lights and using lower voltage feed from the controlling relays?

Cheers,
Dan


(Garry Mitchell) #4

The simplest way is with SonOTA - however it looks like the newer firmware versions are starting to put things in place to stop this from being as easy, but there’s pins on the board that you can program using a USB-Serial adapter.

Check out the big thread here too :slight_smile:

I currently have 6x Sonoff Basic, 1x TH16 and 1x T1 :slight_smile: The TH are quite nice because they give you mains switching and temp/humidity in a single unit :slight_smile:

I think I’m going to stick with mains-powered lights - a bigger range available. I’ve never found a need for dimming in anything other than one of our bedrooms, so everywhere else is just currently basic LED bulbs - so I might leave that as is and just have controllable on/off - if I even feel a need for automated lights! (Not convinced I’ve found a usage case for it yet, but time may tell!)


(Tom) #5

In an ideal world, if you are getting the house rewired, I’d get cat6 (or higher rated) cabling to every point where you may want a home automation device or controller. You can then run devices over wire rather than wifi and you have options available such as PoE (power over ethernet) so save finding local power.
I’d also get the electrician to star wire all the lamp circuits etc back to one control box.

If this is not possible due to time, cost or building design constraints, I’d seriously think of using something like 868MHZ rather than wifi (used in Homematic). It’s much more reliable (IMO) than wifi, can travel much further and sensors can be battery operated as operating and standby current are very low.

Wifi does work but think very carefully about a backup for when you have problems (or your wifi router dies).

I’d agree with others about putting more wires in than you think you need. I’ve put cables in the same trunking three times now, each time thinking there would be enough and I’ve replaced my ethernet switch twice with a bigger model!


(Rob Pope) #6

This. You need to consider two things when putting home automation in place. What happens if the server goes down, and what happens if I’m not about. Too often there’s a single point of failure and you need a backup. With traditional bulbs and switches anyone can change a lightbulb (and with things like Hue, they can be replaced with a non-smart bulb) but with HA you’re likely to be the only person who knows the server password should something need a nudge.

In our house we have a 433Mhz remote controlled switch that turns on the floor lamp. Although I can control it via Alexa/Openhab, we still have the remote as backup for the times OH or Alexa are down and I’m not around to fix it.

I’m over the border near Newmarket and would love to see what you decide on! Keep us updated on here with your progress


(Daniel Watson) #7

Tom,
Thanks for your reply. I have also been advised to bring all wiring back to a central point, for back reasons, but it does increase the amount of power wiring around the property.
Effectively, bringing cables back from each lighting point and switch point to a wiring cabinet. Maybe mounting relays on the DIN rail for switching the lights.
I’ll try to knock up a wiring diagram plan so you can take a look.


(Daniel Watson) #8

Rob,

Thanks for your reply. Good to know there’s someone else nearby (I assume you maybe in Cambridge?!), who’s going through a similar task. It’s my Christmas project - Electrician starts in the New Year!!
Even if I don’t get all my items bought and configured I at least want to provide the electrician with a wiring diagram! I’m planning to determine this first, with maybe a couple of test devices to play with.
Also trying to get refamiliar with the OpenHab config…

Cheers,
Dan


(Daniel Watson) #9

Garry.
This is great advice.
I think I will bite the bullet and go for purchasing some SonOff products.
It is xmas afterall! I will then try to learn how to flash!
I have a few items to be getting on with, i.e. wiring diagram, OpenHAB familiarisation, product choosing, etc.

Cheers,
Dan


(Rob Pope) #10

Live in Soham but work in Cambridge. We’e taking on our house one room at a time. Main bedroom is next and I’ve got a few ideas already. Motorised blinds is one thought, but I’m not sure if there are any good value options that you can still pull up yourself.


(Daniel Watson) #11

Garry,

Quick Q: Is it posible to flash the SonOff bulbs? Looks more difficult than the switches…
See: https://www.amazon.co.uk/ANRIS-B1Dimmable-Wireless-Automation-Decorative/dp/B0751DLNN6/ref=sr_1_1?s=electronics&ie=UTF8&qid=1513872755&sr=1-1&keywords=ANRIS

Any help would be great. Thinking of ordering it, but not if cannot integrate with OH.

Dan


(Garry Mitchell) #12

I believe it’s possible with SonOTA, but it’s a slightly more involved process than some of the other devices :slight_smile:

Take a look here


(Daniel Watson) #13

that does look more involved - may even be outside my capabilities!
One way to find out though, might buy and give it a go.


(Michael Sutter) #14

Hello Daniel

Congratulations to your new Project. I’ve finished nearly the same in April (but located in switzerland).
Maybe you can find some hints in my questions / post (House Renovation)

I recommend you to place some switches to ist traditional places. On one hand its for visitors, and on the other its for failback Szenarios. With fibaro dimmers for example, you can use them as smart input devices (1x click, 2x click…).
As you can read in my post, I’ve decided to go with zWave as main Technology. Ist more reliable and seperated from the attackable wifi (of corse its also attackable, but with much more Technology needed).

Take a look at LED Stripes for lighting. Especially RGBW stripes make wonderfull light.

Good luck with your Project.
If you like to get further information, feel free to contact me.

regards
Michael


(Daniel Watson) #15

Michael,

Thank you for your reply. I will look to read your posts with great interest. And thank you for your offer of assistance… I might just be asking in the near future.
To be honest I am a little apprehensive as I’m not experienced in SW or device configuration (flashing!?), but I am an engineer and have done (traditional) electrical work in the past.

My initial work required is to makes plan of what the electrician is to complete, i.e. traditional wiring works. Most people have recommended a full back up, by means of bringing all traditional wires back to a central location. Thoughts?

Regards,
Dan


(Scott) #16

Hi Daniel,
Superhouse might be a great intro for you with regards to the Sonoff devices.
Jon explains things pretty well and has a number of other videos on home automation
He also has links to codes or further information.

Sonoff, MQTT, Openhab:

Six Sonoff secrets/Hacks/Mods::

Good luck with the build!

Regards,
Scott


(Rossko57) #17

It does bear a little thought about how you want automation to work in conjunction with manual controls. ‘Fault backup’ and ‘manual override’ are slightly different jobs.

I put automation into a commercial warehouse, the primary job was to auto-on lights in response to presence detection etc. and auto-off after an inactivity timeout. Bonus ability to turn everything on in case of panic alarm for example. (Ideal OpenHAB stuff !)
But also wanted manual wallswitches, both for fallback use (system problem) and for manual override - to force lights on or off for the odd occasions when automation is doing the undesired thing (there are always those!)
Complicated a little more by wanting multiple manual switch locations for any given light zone, like a stairway.

The most cost-effective and low-tech electrical solution I plumped for was to use pulse relays, these respond to (any number of) pushbutton controls to toggle lights on or off. These still work in case of system or network failures.
The automation system can then emulate another pushbutton on each circuit with an output contact.

In a house, you’d probably star-wire everything back to a DIN rail relay bank (in my case I have multiple such boxes).

By using a pulse relay with additional contacts, or by adding a cheap ordinary relay to the light circuit, you can have a feedback input to the automation system that allows system to “see” if the lights are on or off, and so also detect manual switching events.

Rules can then detect ‘unexpected’ on/off events (manual actions) and e.g. avoid auto-on lights for some period after someone has manually switched lights off.

In my case I chose to do the light duty relay-out and contact-in interfacing via Modbus I/O modules, but any GPIO style method could be used.

It’s not an all-in-one solution, but offers flexibility, robustness, and future proofing (I could replace the central system with something else). In the commercial premises I also needed to take care about CE marking and so on, although I believe SonOff stuff is now approved?


(Daniel Watson) #18

Thanks Scott. (hope you had a good xmas - the xmas break being the reason for my slow reply!)

Santa bought me a couple of sonoff devices to be playing with.


I’ve yet to watch your (Superhouse) videos to see what’s in store, but I plan to do so tomorrow.
I’ll let you know how I get on.
Any further advice would be greatly appreciated.

Thanks
Dan


(Daniel Watson) #19

Hi Rossko57,

Thanks for you feedback and information on your commercial property “adventures”!
I have a couple of questions:

  1. Pulse relays. Do mean (what I know as) latched relays?, i.e. relay that remain energised after the control signal is removed?
  2. Star-wire. I assume you mean bring everything (lighting feeds and switch wiring) back to a central point, so effectively all controlling elements (whether it be switches or relays) are in one location?

Yes, I do intend to build onto a DIN rail, but now I am in possession of some Son-off devices I noticed they just a screw mounted items. mmmm… to sonoff or not to sonoff!?! that is a question!
See my sample devices below, received only yesterday.

Thanks for your information.
Hopefully I can start to get some design work going very soon, so I can hand over some wiring plans to my electrician ASAP.

Thanks
Dan


(Rossko57) #20

Just so. The ‘pulse’ name comes from the control signal being a pulse on just one input (some latching relays can have separate on/off inputs). A single button, press to toggle state. Obviously easy to add any number of paralleled buttons or light-duty contacts to control.

Example type, but needlessly heavy duty for domestic use
https://www.one-elec.com/en/a9c30811-impulse-relay-itl-1p-1no-16a-coil-110-vdc-230240-vac-50-60hz-schneider.html?gclid=Cj0KCQiAyZLSBRDpARIsAH66VQKYRmRhtBaleN3uFiQpBMfjDx7Vu-sX5nN3mOVSGHGmrBXd6gY8pDQaAklvEALw_wcB
Types with additional controlled contacts can be useful to allow a low-volt signalling of its state (to detect manual actions), but I found it cheaper to add little slaved ordinary relays to a main impulse relay.

Clearly this all about on-off lighting; dimming requires more sophisticated tech but I understand DIN mount dimmers exist (at a price)

Yup, mains lighting circuits back to control box.
It needs a little thought as to how to supply via overcurrent circuit breakers, all via one supply feed is tempting but then you must have all parts and wiring to the rated current e.g. 15A or whatever.

Pushbutton switch circuits back to box (using mains rated low current cable in case of faults or later changes)

My Modbus units are mounted just adjacent to the mains relay box, for convenient short run of low-current signal wires for relay control and state feedback, but keeping electronics out of the mains cabinet.
Just one comms cable is needed to the OpenHAB host which is remote (but needn’t be).
I included a DIN mount DC supply in my boxes as well, to power the Modbus unit, as well as well as a number of PIR and beam sensors.

I guess in a domestic situation, this could all be replaced by a PI and whatever suitable means to give enough in/out contacts

My decision to go this way was driven by
(a) avoid wireless in a steel-framed industrial site, thanks!
(b) but need to cover many circuits over long distances
© while containing cost (DMX seems scary priced)
People do seem to have sucess with Z-wave type devices in the home, although I’m not convinced everyone fully solves the issues of manual override and fallback controls.