Old House, New Technology - My adventures with OH

Hi everyone!

This thread is intended to become a diary of my experiences with OpenHAB. I’m currently in the process of buying my own home and I will use OpenHAB as the backbone “smart” infrastructure for my new home.
I also hope to get some questions regarding OH answered here, but maybe I’ll have to start separate threads in the appropriate forum categories.

I’m an electrical engineer by profession, and I’m very much a hardware guy, not so much into software. That’s why I plan on integrating quite a lot of home-brew electronics into OH.

Anyway, here’s what I have done so far and what I have in mind for the future:
The current situation is that the house I bought needs a major overhaul (which was expected and calculated). I need to run new wires for electricity, and apart from a twisted pair telephone cable and some coax for satellite TV there are no data wires in the house. This needs to change. This will not be my first project of this size, some years ago I successfully installed power and data lines in a friends house, all according to local regulations and laws. The final tests and commissioning will be done by a professional electrician, so I will have full insurance coverage.

So here’s my first question / point for discussion: I will run Cat6 (maybe Cat7) cables in a star pattern to all rooms to implement the usual Ethernet network for high speed traffic. What do you guys think about implementing a second network using cheap Cat5 cables to implement a low data rate bus for DIY electronics (e.g. room sensors). I could use the cable to implement a linear bus topology with differential signaling, power and ground (I currently think about either 24V or 36V for power and RS485 half duplex with serial protocol (UART) for data). Why do this when I already have an Ethernet network in place? Because interfacing to this bus would be so much easier and would demand much less computational resources from the micro-controllers I plan to hook up. I could also power small loads directly from the bus with a point-of-load (on-board) DC/DC module which would omit the need for a wall-wart style power supply or Ethernet PoE circuits. Small (~1W) DC/DC modules with wide range voltage inputs are about one cubic centimeter in size. What do you guys think about this idea? Who of you uses a home-brew house bus and what have you chosen? Or what would you choose? Is this feasible or am I insane? :smiley: I’m curious to hear your thoughts!

Cheers
Ben

3 Likes

I’d be inclined to follow existing standards so far as practicable.

e.g. 36V is “oddball”. Use either 24V (standard in e.g. Modbus applications) or 48V (telecomms standard, more appropriate for long runs). That doesn’t have to be full-blown PoE with handshaking etc., just a central 48V supply and DC-DC modules as you suggest. Use the same wiring scheme as PoE to avoid future oops disasters.

Likewise, use some established serial protocol, I do not now use homebrewed subsystems, but started out expecting to build them. Even so, I chose Modbus for a standard (later finding cheap chinese products that did the simple on/off style I/O that I needed, and slottted into the plans without rethinking).

Serial systems could also be extended over ethernet or WiFi for e.g. outbuildings.

Be prepared to change everything (or at least, to add-on something else) when you find you “need” something more specialist, like hue-changing lights. But that is what OpenHAB is good at :slight_smile:

1 Like

Agree with Rossko on the 36V… use 24/48V.

I am building ATM, and settled after many discussions and evaluations on Arduinos, Ethernet, and MQTT. Like the idea of sticking with POE wiring to use DC/DC converters to feed the micros. The only exception to this rule are window and door contacts, which run on CAT5e to either a room or central controller (simply to reduce the numbers of micros floating around the place.

Well, is it worth to ‘downgrade’ some cables?
Looking at Google, CAT5 is about half the prize as CAT7, but how much cabling do you want to do?
I did CAT7 duplex for my whole home, it was about 500m overall, so downgrading about the half would have been about 125 EUR, but building the house was about 250,000 EUR!
There are cables that I did not use yet, but yes, I should have used way more cabling :wink: and I’m happy I did it all with CAT7, for example it was very easy to change POTS to VoIP :slight_smile:
Keep in mind, it’s very extensive to change cabling (even if using ductwork). To spare money, you better could use cheap patch fields (but keep some additional cm for upgrade/rewiring later).

3 Likes

Would be my opinion as well. When I had my house built, the company insisted on putting “telephone” cabling (4 leads, unshielded) and I had to run my own CAT6 seperately. In hindsight, I should have requested them to leave out the telephone cables and just run CAT6 everywhere (and also much more of it, e.g. from the door to the door bell).

And for power, I would say go with PoE whereever possible, it will save you headaches why you can use device A on connection X but not on Y…

Summary: If you have the chance, standartize everything on the highest level you can afford, rebuilding something afterwards will be much more expensive.

1 Like

Well, you approach is a bit uncommon due to your professional background.
Most people rather focus on functionality and thus the software layers. They would select the right smart home systems/devices first and determine/derive the appropriate wiring after that.
But if you want it the other way round, to have as many as possible (additional, non-Ethernet) ‘undetermined’ CAT5 or 7 wires into every room definitely makes sense.
Keep in mind that at some future stage, you might want to deploy an existing bus system such as say KNX or any of the proprietary ones or any tech that yet needs to evolve in the next years. Enthusiast or not, to DIY everything will be exhausting in the long run and you might choose to migrate to or to attach commercial (control) devices, too. Or you need to replace 12V devices by 5V ones or vice versa. Or, or, or.

I’d also give some thoughts on ‘classic’ 230/110VAC capable wiring star topology. Short term but also long term, you’ll want to power and control lights, roller shutters, pumps and household appliances with that standard voltage, and you can’t run this over CAT7 (while some of these can be run on 24V, you don’t want to exchange all of them).
‘Standard’ (non-star) wiring will require you to deploy control devices all over the house while centralizing enables you to deploy them in a single (or few) central hubs.

imho: definitely not

Since you will be going over the trouble of installing new wiring in an existing home, don’t miss the opportunity and deploy the best solution that is currently available (Cat7) in a star topology.

I have KNX bus wiring and Cat6 separately. If I would do it again, I would put Cat7 everywhere (including KNX positions, Security positions for wired window/door, interior/exterior PIR movement sensors, Home-made IoT ESP, etc). I would cable everything :slight_smile:

1 Like

Guys, thanks for all your feedback and valuable opinions, it is much appreciated.

Absolutely, I was just thinking in multiples of 12V so I can use sealed lead batteries as a backup power system. I guess I’ll settle for 24V then. You mention Modbus and that’s an Idea I was playing with as well. From what I understand, Modbus in RTU or ASCII-mode would fit seamlessly into the planned RS485-bus, I wouldn’t mind letting my DIY-stuff speak Modbus as well, why reinvent the wheel (except for fun :wink: ).

Yes, the plan is to have only one, in large rooms maybe two, micros per room that are connected to either Ethernet or RS485. From the micro I will run wires to the sensors in the room (window and door status, temperature, humidity, VOCs, presence detection,…).

I’m totally on your side here, I will not skimp on Ethernet wiring throughout the house! The RS485-bus is meant as an addition, not a substitute. If I later notice that my DIY-Bus is not capable of something I want, I can always fall back to commercial solutions that use Wifi, Ethernet, 220V-power, PoE and all the “usual” and “normal” stuff that is available anyways. Commercial Smart Home devices will always be a fallback option for when I’m to lazy to build something myself :sweat_smile: or when I don’t want do build something myself due to security and insurance concerns (e.g. Line Voltage Switches).

So thanks again for all your input!
Cheers
Ben

Yes, but my point was, you can use CAT7 to drive RS485, so why using CAT5 instead? If later on, you want to switch to other technique, you don’t want to be cut out by the cabling…

I see the point you are making, and I guess in the end you are right, I should use Cat7. My arguments towards Cat5 were that it’s much cheaper but also much easier to run in the walls because it’s thinner and more flexible, I could also use it for sensor cabling etc.
I’m also pretty sure that Cat5 will never be the bottleneck with regards to speed. Remember I could always use the Cat7 Ethernet or 802.11ac Wifi if I needed higher speeds.
But as you can see my arguments are based on personal opinions and cost saving, not on technological or physical facts. I guess I could decide either way and wouldn’t be “wrong”.
Cheers
Ben

I would be cautious on the Cat7 wiring.
Just because it is available, does not mean you have to use it; neither does it make sense to use it for all cases.
Once you run dedicated access points per room, a micro per room, etc. the wiring will become enormous. I have a 8 x 12 m2 shed with 600m of Cat5e cabling in it. The house looks like 1,000m plus.
Be aware that there are no connectors catering for the full specs of Cat7. Do you really need GBit to transmit controller messages? Even video streaming works well with Cat5e.
My point: horses for courses.
Also, if I were concerned with transmission speeds, I’d go fibre for good.

Not yet… But there are CAT6 connectors for up to 10GBit/s :slight_smile: CAT5e would suffice for 1GBit/s either.

Not in question of speed only, but also for easy wiring (if using ductwork, it’s simple to draw fibre into), but it’s way more complex and the tools are awfully expensive.

Yes, fair point, especially the wiring of CAT7 cable is a mess (but guess what: I got exercise…)

My estimate for the house is 700m Cat7 in star topology for Ethernet and about 250m Cat5e for RS-485, separated per floor with a linear topology on each floor, meeting in the basement where a beefy cortex micro serves as a bus master for all floor-buses and handles the connection to OH.

Regarding the usefulness of Cat7 over Cat6: Yes, currently there is no difference as 1GBaseT is used, but once GG45-connectors become cheaper I’d rather have 600MHz or 1000MHz cables in the walls and would only have to change a wall outlet on the office than having to run new wires. I definitely want 10G between my office and the server in the future, and I’d like to try 40G as well, although that might fail depending on cable length.

Allow me to plug a cabling-related question here: I want to run a cable from my TV corner to a projector on the ceiling. What is the best choice here? HDMI, Display Port, something else? I’ll definitely also run Ethernet there, that way I could place a RasPi with Kodi right next to the projector.

In my next posts I will write about the features I want to implement with the automation system. Stay tuned :wink:

Cheers
Ben

Go for Modbus RTU, ASCII is not nearly as common. If you are in need of a small Modbus implementation for AVR mikrocontrollers you might want to take a look at one of my projects: GitHub - mbs38/yaMBSiavr: Yet another Modbus Slave implementation for the AVR

Yes, good idea. From what I understand RTU mode is mandatory for all devices, ASCII is optional. So RTU it is then.

I thought I’d ramble a bit about what I expect my home automation system to do and what functionality I expect it to provide.
I want the system to add convenience to my home in these areas:

  • Lighting
  • HVAC
  • Security
  • Laundry

Lighting

I recently purchased some Ikea “Tradfri” and “Floalt” smart lighting devices and I’m totally blown away by the quality of lighting this offers. I like bright but glare free light, so either indirect lighting or lights with a high surface area. I’d like to have dimmable LED lighting in each room, and I’d like to have dimmable and color temperature controllable LED lighting at least in the livingroom, kitchen, hallway, office and bedroom. Currently the Ikea lineup of products offers all this for an affordable price, but I’m no fanboy or anything, if something better or cheaper comes up that can be integrated with OH, I wouldn’t hesitate to use it instead. In my current “old” home we almost exclusively use a lighting concept of many small lights instead of a single bright ceiling light. So my current plan for the “important” rooms is to have a number of smaller lights that are “smart” and a single ceiling lamp that is wired to an old school switch on the wall with no smart or remote control. This ceiling light will then almost never be used, but it provides a) a backup in case of a major error with my automation system and b) a reliable and easy-to-use way for visitors, guests and home-sitters (during holidays) to switch on the light. I don’t want to explain to my grandma that the light will switch off by itself or that she can use a touch screen in the wall or her cellphone to control it. She would declare me as insane even before I could attempt to explain Amazon Echo to her :smile:.

Apart from this I plan to install night lights for when you go to the bathroom at night that can be dimmed low enough as to not wake you up more than necessary. I plan to use warm white or amber LEDs for that.
Each room will have a manual and an auto-mode. On manual you can use the Tradfri remote to control the light (or the OH app). On automatic mode light intensity and color will be calculated from data based on the Astro and Weather bindings and maybe from an outside and/or in-room lux sensor. My goal is to have no one in the room consciously notice the transition from natural to artificial light over the course of an evening into night.
Another topic that is related to lighting, but also plays a role with security, is presence detection. I’ll use PIR sensors in most rooms to control light and provide presence detection, but in the living room, and kitchen I want to play with these Melexis IR sensors. Using two or three that look into the room from different angles, I can not only estimate the number of people in the room, I can actually locate them and guess/predict their actions (Sitting on the couch && past 7pm -> watching TV or chatting. Located near Kitchen worktop -> cooking. Sitting at dining table -> eating.) For this I’ll send the raw data from the sensors to the central micro in the basement, do the triangulation there and calculate position and number of people in a room. This information will then get passed to OH.

As usual: Feel free to comment :smiley:. I’ll write about the other areas (HVAC, Security, Laundry) in dedicated posts.

Cheers
Ben

2 Likes

I don’t know of any low-cost Modbus light dimmers. DIY-able of course, but sounds like you’d need to produce a lot?

Your proposed PIR scheme is quite ambitious. Most folk struggle to get basic presence detection working reliably, and a melding of different systems is often used.

Don’t overlook simple stuff, like door contacts, for further information on who is where (and where they are going next).

There would be benefit in having the system at least monitor your (perfectly reasonable) manual lighting. If a switch is operated, you have a presence indication for example.
I spent some time planning the nuts and bolts of my (on/off only) commercial installation, so that not only could users operate lights in case of system failure, but could override the auto behaviour (for a few hours) as wanted.

I’d include your ceiling lights into automation.
Functions like all-off, presence simulation and optimized light scenes won’t work without.There’s ZWave actuators that you connect light and switch to to keep light switching working even if ZWave/server is down, and I’m sure you can build a micro to accomplish the same.

PS: you don’t want too much color lighting throughout your house. It can get annoying quite quickly.

Agree with you here… it is the gimmick factor more then really being practically…
What I find great is colour temperature change ability, which I plan to put in… and all LEDs will be dimmable.

I’ll use off-the-shelf smart lighting, most likely the Ikea Tradfri ecosystem. The Modbus will be for sensors. This way I can run all the presence estimation on my micro programmed in C/C++, which I’m much more experienced in than in the OH script/rule language. I’m sure I can program a “sensor fusion” algorithm to derive presence/localisation from the various sensor information and present the results to OH. Another benefit is that at least manual light control works out of the box and I’m not pressed to complete any DIY stuff, which greatly increases the WAF :smiley:

Yeah you are right, good point. I’ll loop the cabling through my basement so I can add a sensor or relay later. But I’ll keep it hardwired at first.

My thoughts exactly, I want color temperature control, not actual color control as in RGB lighting.

Cheers
Ben