Need guidance on OpenHAB for simple light control

I am new to openHAB. I am looking for some guidance on what I think is a simple lighting situation.

First, what I have had until a couple of months ago is some X10 lamp modules that are controlled by a Raspberry Pi W that is running the Heyu software. I am only controlling 3 lights. One, in the living room, another controlling the front porch lights and a third controlling “seasonal lights” primarily used in the fall for Halloween and Christmas lights for the front of the house. The RPi communicates with the X10 modules using a CM11A interface. This configuration has been running for several years, but lately the CM11A interface has started having problems. I have purchased some used CM11A’s on eBay, but they are having problems too. I have a CM15A, but that can’t be controlled by the Heyu software.

The main thing I liked about my setup was that I could set up the Heyu software to pay attention to sunrise and sunset times and turn things on and off accordingly. I implemented the RPi/Heyu system because the original X10 timer had no capability for adjusting for sunrise/sunset times and I got tired of reprogramming the on and off times every month as each season progressed.

My wife is a non-technical person, but over the years I’ve gotten her used to the X10 controller for manually turning on and off any of these 3 light circuits. The RPi system controlled automatic on and off times.

From the research I’ve done so far, I know openHAB supports X10 via either the CM11A or the CM15A interface. I’ve installed openHAB 5 onto an RPi3, but finding the configuration process rather daunting.

So my ideal solution would be:

  • Keep the X10 lamp modules
  • Implement a minimal openHAB configuration using either a CM11a or CM15A
  • Replace the original X10 controller with a simple touchscreen device that suits my minimal lighting configuration (and something my wife will find easy to understand and use). I would even consider a “hardware based” controller like the original X10 unit, but I’m not sure such a thing exists that would interface to openHAB.
  • And, of course, a configuration that adjusts for sunrise & sunset times.

I am hoping that someone else in the openHAB community has been through a similar process and can provide some guidance to appropriate products and resources.

Thanks in advance.

Rick

You might be able to get buy on an RPi 3 if you keep your configuration this small. But you’ll have a better experience with an RPi 4 with 2GB RAM or better. Just something to watch out for. If OH is taking too long to do things, you may need better hardware.

Now down to the details.

openHAB is a platform more than just some software. So it’s way more complicated than you might expect and it does require a steep learning curve up front. With a lot of software you can often just jump in and start mucking around to figure it out, but that is not going to work with OH.

I recommend the follwing:

  1. Read through the concepts section of the docs. OH has a number of terms of art including Thing, Item, Binding, Rule, etc. which have a specific technical meaning. If you don’t know the difference between an Item and a Thing, reading the rest of the docs is going to be challenging.

  2. Read through the Getting Started Tutorial. You don’t necessarily have to read each and every word but at least scan through it. That tutorial takes you from one end of OH to the other showing with examples how to configure each step of the way. This will give you a feel for how things are done in OH and a little bit more about how all the parts are related to each other.

  3. Read through the Astro bindings README. This is the add-on that provides astrological events into OH including all the sunrise and sunset times (civic, nautical, etc.), seasons, moon phases, zodiac signs, etc. Install the add-on and a new “local sun” and “local moon” Things will be discovered and added to the inbox. The “Simple Things” page in Getting Started is going to be closes to what you’ll have to do.

  4. Read through the X10 binding’s README. It should make more sense to you now as to what it does and how to use it. You’ll install the add-on. Based on the docs discovery is not supported so you’ll have to configure a Bridge (another one of those terms of art) to connect to your CM11a, and then create and configure a Thing for each of your X10 devices. I’ve never used X10 so won’t be able to help much with the specific configurations. The “Advanced Things” page in Getting Started is going to be closest to what you’ll have to do.

  5. If you want OH to build a UI for you the semantic model will need to be established. First from the Settings → Model page create one or more Locations. There is a page about the semantic model on Getting Started.

  6. Now use “Add equipment to model” either from Settings → Model or from the Thing’s Channels page. This will create the Items that are Linked to the Channels and situate them into the semantic model (a sentence like that really illustrates why it’s important to understand the OH concepts).

  7. There should be one or more Cards now on the Locations, Equipment, and Properties tabs of MainUI’s main page. Manipulate the controrls there and make sure you can control the devices. This can be your UI.

  8. Now you need to automate some behaviors. From Settings → Rules you can add a rule. The trigger will be a Thing Event and you’ll choose the Astro Channel you want to use to control the light. The action(s) will be to command the light(s) as desired (ON/OFF). Repeat as much as required. The Basic Rules page in Getting Started shows this.

That’s a minimal setup. From there you can customize the behaviors (you can install JS Scripting to get Blockly to do drtag-and-drop programming of rules), make your own UI through sitemaps or custom MainUI Pages, etc.

1 Like

In addition to the previous answer, you will find a ready to use solution with the Timeline picker, without any programming and own static rules.

After you have setup a running OH and bind your devices you can install the timeline picker and you have a UI for all lamps you want control with and without sun events.

Thank you both for your feedback. I will try and follow your suggestions in terms of getting up to speed with the terminology of openHAB and getting my X10 modules to work with this system.

I am also looking for suggestions on what to use for a controller for the openHAB system. What I’ve been using so far to manually turn on and off the X10 modules is the (very) old SC503 controller:

What I don’t want is a big, wall mounted touchscreen control panel. Maybe a control panel that’s roughly 5” in size and can sit on a shelf or table. And at this point I really only want something that can turn lights on and off and monitor the sunrise/sunset settings for each light. Is there anything commercially available, or do I have to “roll my own”. I can design and 3D print a housing if necessary, but it seems there’s a plethora of small displays in the marketplace. Which one to use?

Thanks again,

Rick

Once you have OH running you can control everything with your phone

what @psych said. It sounds like you just need to get a cheap phone or resurrect one you have in a drawer somewhere if you have one. It’s the size you want, already stood contained and most cheap and old phones are more than powerful enough to run OH.

On Android you can even configure the openHAB app as the launcher so the phone always boots into openHAB.

Rich,

Thanks, using an old android phone is probably the best bet. I’ve got one I can use for that.

Rick