Bridging OpenHab and Home Assistant

Thank you @rpwong. Very valid points. My thinking is to compare both, get a feel for both, and then even run them alternatively once I get to automation. All of this assumes I have a lot of time to spare/invest … which is very far from the truth :slight_smile:

Absolutely ! That’s a no-go.
There may be use cases where it is not immediately apparent as the extent of havoc you do depends on the type of device you use but you must never ever run 2 concurrent controllers, be it 2x OH or whatever other system.
All decent technologies and devices expect there to be only one.
For example a ZWave device has a ‘lifeline’ association where it sends updates whenever there are any. The controller will only be in one of the two boxes.
Same for Shellies: which IP to send to ? And about any other.

Good point @mstormi. Here is a simpler question then. I have multiple Apps installed on my iPhone, one for each family of smart devices I have (TP-Link, Wyze, Feit, Nest, Ring, Sense, …). I now access those devices from both their dedicated App and from OH/HA. Some of the devices have some simple automations. For example: I have a timer on some lights and other lights that are triggered by a motion sensor. The question is this: Once I give OH ‘full control’, is it best to totally disable control/automation by the individual/dedicated Apps? My thinking is a bit simplistic and I want to retain the individual Apps functionality while experimenting more and more with OH. Is that feasible at all or ultimately problematic? I see this as: OH is in charge of overall controls and ‘intense’ intra-devices behavior, yet the individual Apps give me the option to override OH whenever needed.

Thoughts/Comments/Risks ?

Yes I would disable automation by any app. It’s in contradiction and conflict with any centralized automation (i.e. OH).
If you properly setup OH to have “mirror” items you won’t need the apps any more.

Ok, thank you very much. I’d have to be careful not to introduce any unnecessary issues then.

What your asking is very difficult to answer as it depends on the hardware/brand.

Doorbird cameras will refuse to work when the app has control for example, but other camera brands I have working 100% in home assistant and openhab at the same time.

I usually power off the HA box as you also can’t rule out that some devices may crash more often it they are busy answering multiple platforms.

Lastly the concept I prefer to use is for devices to operate in stand alone mode and only use openHAB to over ride the hardware when needed. This way if I ever need to rebuild I don’t have an entire house not working for days as all devices keep working with openHAB turned off.

Multiple approaches, which I prefer to decentralise and distribute the intelligence if I get the chance/choice.

Thank you, I think you’re right-on i.e., the key is to ‘decentralize’. I’m facing multiple challenges, or I’d rather say ‘learning opportunities’. Thank you also for the link, that is a good read.

  1. Like most on here, I have devices from multiple vendors: Smart Plugs, Cameras, Smart Bulbs, Dimmers, Security System, Thermostats, and a multitude of others… a total of 50+ IOT devices, though not all of them need to be on OH. And, some of those devices have bindings available, others not (not yet).
  2. This fully integrated Home Automation is a continuous learning curve, and it’ll take sometime to get everything working together smoothly. Thus, I’d like to plan/execute this undertaking correctly, integrates the devices few at a time, and ultimately retain some individual control should anything go wrong in the process.

For example, I have some grow lights (for winterized plants) that are on a timer/smart-plug. The idea is to do something a bit smarter with OH e.g., if there is enough light from the window, then there is no need for the extra light. And there are many small tasks of the sort, I’m not after a central system to command everything.

Still a lot of learning and that’s the fun (and at times frustrating) part.

There are multiple views and concepts and each person would say their way is right.

Do you…

Create a massive UI with all your controls on it, VS create rules and automations that mean you don’t need to reach for a control.

Create all rules in 1 engine where you know the language inside out, VS distributing the smarts around the devices so ‘all your eggs are not in the one basket’. If you drop the basket holding all your eggs then all the eggs all smash leaving you with none.

Tasmota has the ability to place timeouts internally so if you turn on the plug/socket it will turn off all by itself. I see these working fine in both projects at the same time.

Uugh, well - no.
You have to centralize in order to be able to automate cross-device/cross IoT platform.
But yes when doing so, you have to take caution about how local devices (or systems) work and integrate their way to work into your central code.
Any proper automation faces the problem to coordinate inputs from multiple instances.
Let’s take a simple example like a light switch. Say you want to switch off light after 5 minutes.
You can easily automate that in OH but what if someone uses the app to switch it on or off meanwhile ? Prolongue those 5 mins ? Hand further control over to the app ? For how long ?
Same problem when someone hits the physical switch button.
Bottom line is, you have to coordinate all of these input “dimensions”.
Pure remote control is simple because it’s essentially stateless.
Home automation is hard.

2 Likes

Well, I think you and I are talking about slightly different aspects. Please correct if my understanding is off, as I’m relatively new to Home Automation (HA). You’re absolutely correct that HA is hard … and there is no unique way to achieve any given task.

  1. My initial thoughts (few weeks back) were to put everything smart I have on OH, and control everything from a ‘master remote’, including the various lights dimmers, the garage opener, or even the smart vacuum.

  2. Now however, I’m leaning to use OH only where necessary. If an automation across devices is needed, then for sure OH is the answer. In other situations, it is sufficient to use the dedicated App for specific tasks, and there is no need to clutter OH.

The above point #2 is in essence what I meant by ‘de-centralize’. For example, there are devices that in specific situations can be used as ‘sensors’ only, like most cameras i.e., they report a status to OH, but OH does not need to tell those cameras what to do, as they are recording continuously. In the end, the hardest part with HA (besides being a computer-wiz) is really deciding what to do, with all that’s available.

Cheers

Well everyone is free to decide for himself but you’re writing this in a forum which is on home automation not remote control.
And automation will not work if you decentralize. Believe me and others or walk down the route into a dead end. If you never arrive at automating things, fine. But I’d guess that even if you today do not think of automating you likely will tomorrow but if you continue your approach then by then you will have already put substantial work into an unsuitable architecture and need to change a lot more.

1 Like

You’re correct and not here to pick an argument. You are obviously at a higher/deeper level than many new comers (including me). When I started with Home Automation, my initial thinking was that I needed to put all my 70+ smart devices on OH, and also some additional sensors for windows/doors/security/… Since then, my understanding and expectations have evolved, and my thinking now is: It is NOT because it has WIFI/BT that it must be on OH. Home Automation needs to be done in a very ‘smart’ way … and only where needed. Thus, it is a must that one decides early on what exactly they are after. Otherwise, HA promises to be a hobby with a lot of continuous tweaking (aka wasted time) and no end in sight, a hobby in the true sense.

Let’s face it, OpenHab provides three options (in my simplistic thinking at least):

  1. Home Automation - Close the window blinds when it’s late and TV is On, …
  2. Remote Control - Central access to all smart lights, switches, media center, …
  3. Monitoring Only - Cameras, energy/water usage, electric car charger, …

Ultimately, any given system is a combination of the above 3 … though many of us will likely start with 2/3 then slowly learn and evolve to 1. The reason I say this is many of us come to HA after buying many ‘fancy’ devices, and their apps typically do 2/3 only, whether it’s Amazon Alexa, Google Hub, or else. It could very well be for such amazon/google devices the A stands for Assistant (not Automation)

Would love to do some time travel and get a glimpse/insight as to what HA will be 5-10 years from now.

My advice is:

  • Be deliberate in your choices. It takes some effort to include any device with openHAB or any other home automation hub. Don’t integrate stuff just because you can, make sure you have a reason to do so. The reason can be as simple as “I want to see it on my display” or as complex as “when this sensor detects movement I want to turn on/off a whole bunch of stuff.”

  • While Matt1 quoted one of my posts, there is a nuance there that often gets lost. Yes, I do recommend that “basic” functionality remains at the end devices. The thermostat should run stand alone. The lights (maybe not all but enough) should still work with the wall switches. But that doesn’t mean that the smarts are necessarily moved to the end devices. You still need the central hub for that because it’s really the only place where the different technologies can talk to each other. When an elevator breaks, the capability is gone. You can’t travel between floors any more. When an escalator breaks, it turns into stairs. You can still walk up and down stairs. It’s much less convenient of course but you can still get to your destination. That’s the goal. Degrade to a point where the functionality still exists, if in a reduced and less automated/convenient form.

  • Personally, remote control is not all that compelling by itself. Ultimately it becomes super complex and counter intuitive. Most people have experienced the pain of trying to teach a guest in the house how to use the remote to turn on the sound system, the tv, switch to the proper input, etc. We have these “universal” remotes with 50+ buttons on them to control everything. And that’s just to control the TV. Add in HVAC, lights, cameras, security and all the rest and it becomes overwhelming. Having said that, you can’t get away from that really. You need that in case the the automation fails (escalators again). But the ultimate goal should be to eliminate the controls you need day-by-day with automation.

Let’s take my very first foray into home automation years ago as an example: garage door opener.

  • Fully Automated: When I start the car, Tasker on my phone will pop up a dialog asking if I want to open the garage. I tap that and the door opens. After 45 seconds the dialog pops up again asking if I want to close it. When I return and get close to the house, that dialog pops up again and I can trigger the opener so it’s fully open by the time I pull into the drive way.

  • Degraded: If Tasker fails to do it’s job, I can bring up the openHAB app or, more likely I’ll use the long press power menu or the notification tiles to trigger the opener. Not as automated but still allows remote control.

  • Broken: If openHAB is broken for some reason, I still have the remotes that came with the garage and can open the door with them.

My goal is automated. Stuff just happens, or at least the system offers to do stuff based on events. When that fails I still have a way to control it. And when that fails I still have a way to interact with physical “dumb” controls.

1 Like

@rlkoshak. I like the escalator/elevator analogy very much. Agree with you on many aspects, though here is a simple example about where a Remote Control is needed.

A while back I replaced many of my light switches with Smart Dimmers. The reasoning for this was to give me the following options:

  1. Schedule some automation based on both occupancy (when people are home, some lights should be on)
  2. Some other lights should be turned on/off according to some random schedule, when on vacation/away for few days
  3. Late at night, ability to turn lights off (while in bed) if the kids leave them on, without having to go and check every room/floor.

In that sense, what I’m after here is a combination of Automation and Remote Control. Yes all 1/2/3 can be done by adding motion/presence sensors but it quickly becomes a daunting task to account for all variables/scenarios.

As you said, I’m definitely not after a single/fancy/50+ buttons Harmony RC … and it’s back to your point: the ability to retain flexibility. In the end, and for anyone starting at this, one must give serious thinking about exactly what they want to achieve and the gizmos they have available. It is not because it has wifi/BT/z-wave that it should by default be connected
to OH, or any other HA hub.

Your general statement is valid, however I disagree here. BT stuff ok it is usually unrelated to other devices, but anything Zwave is meant to be controlled by a central controller, and anything WiFi, while usually built to work with an app, might also better be attached to the central because that’s where you can get the most benefit out of.
Think of entertainment media.
Or think of a WiFi coffee maker. Little point in starting that via app in the first place, you have to slip the cup in first anyway.
You can use remote control to start its heating to save some 30 seconds but how often do you grab the phone for just that ?
Then again if your smarthome does that automatically (using presence detection) that is a benefit.

1 Like

I think there is a nuance in JB’s statement that is missed here as well. I don’t think he’s trying to say that these things should not be integrated into a hub. But just because that coffee maker has WiFi doesn’t in and of itself justify adding it to openHAB if there is no other reason to want to automate it. Just because a device can be integrated into openHAB doesn’t mean it has to be integrated into openHAB. That’s the point I was trying to make and what I think JB is restating.

For other concrete examples in my own personal setup:

  • I have dumb motion sensor light switches in the garage and closet. There is no real need for me to know if these lights are on and to control them in any other way so it makes sense for me to not include them.

  • My washing machine has wifi but I’ve never enabled it. It’s loud enough and central enough in the house where I don’t need a notification on my phone to tell me what it’s doing.

  • I have Plex and Rokus and Chromecasts all over the place. It was not until very recently that I’ve come up with a reason to include them in openHAB (I want to monitor when and what my kid is watching).

  • I have some cameras but pretty much just use their native app. I don’t have a need to do anything in OH when they see something so I’ve not tried to integrate them.

In all of these cases I could integrate them with OH. But (except for the media one) I don’t have a compelling need to. So I don’t include them. Others may have more compelling need to include stuff like this though. Everyone’s requirements are unique.

2 Likes

Thank you, that’s exactly my point. It’s not because it can be integrated that it has to be integrated.

When I got started with Home Automation, I looked at all my IOT devices at home (~80 now) and started by searching as to whether Bindings/APIs/Integrations were available … later on, I came to the same conclusion as @rlkoshak i.e., one needs to decide early on about the can vs. has. Back then I had 20+ Apps on my iPhone to control the various devices (lamps, switches, sprinkler, cameras, …), and my intention was to replace them All with a Central App (e.g. OpenHab). Today, I still have all of those Apps, + OpenHab. In the end, it is difficult to decide what is right/wrong for any specific individual as, like @rlkoshak said, each specific situation/user are very different, and have very different needs/goals.

Another good read is the one below, granted, from a competing/complementary system/product. I like the example of a typical home automation: If it’s movie time, dim the lights, turn on back lighting behind the TV, close the shades … etc … All of this is good, but completely breaks down if there is another person in the room, and they want to do something else besides watching TV.

Creating automation that works in a home with multiple occupants is very challenging in some ways and in other ways it makes things simpler. For example, before COVID my wife still worked from home (still does). Since COVID we both work from home. And when we leave, it’s usually not for long. So it actually doesn’t make any sense for us to spend much time creating home/away changes for our HVAC system. It just doesn’t get used enough to spend much effort there.

On the other side, some things can’t be automated very well because it may depend on what each individual is doing in the house and the sensors are not good enough to understand what each one wants. That’s one of the hard problems in home automation for sure.

1 Like

If you still have to find a phone and open an app, to me it does not matter if it is the OEM app or openhab, I still see it as a pain to even find the phone and wait for any app to connect. I prefer to have events happen without me needing to be involved, also using voice is a lot more handy when something is not setup to be automatic. I very rarely open openHAB or any app as it is either voice or an automation that is used. Often it is both, that my voice will trigger multiple things to occur as it triggers a rule in openHAB.

The fact you placed ‘basic’ in quotes perhaps shows you agree that each person may have a different opinion as to how much functionality is considered basic and should be retained. I try to choose hardware and methods that extend the functionality as much as possible, which hardware does not always exist or it does and costs much more and we need to make compromises.

At some point you do have to draw a line as to how much you get openHAB to do if you are into moving everything into openHAB. How about object detection from video cameras, do you chew huge amounts of CPU from your openHAB server just to keep it all inside openHAB or do you simply buy a camera that can do object detection onboard and offloads the CPU load from openHAB.

@JB_63 If you want a sprinkler controller, check out the openSprinkler range. You can tell the device to not water for X hours or days and then if openHAB reboots/crashes or has a hardware failure the sprinklers will still keep operating as you intended as they do the heavy lifting and openHAB can just send commands and get status without being the dictator. You can set it up either way if you wish, you get the choice but you have to consider what happens if the sprinklers get turned on then you take openHAB down when it would normally turn them back to off. Do you waste water before you relise or do you want a controller that already knows to turn off after X time even if openHAB is missing in action.

I agree with this 100%. Any physical interface (remote, phone, tablet, wall switch, etc.) is only useful when it’s within reach, and usually it isn’t. Recognizing that home automation is all about convenience, the only remote I use is my Logitech Harmony. It’s just faster and easier to change channels/volume on my TV with it than via Google Assistant (or the mediocre Harmony app).

I’ve gone as far as setting up virtual items in Google Home that exist solely to trigger OH rules. They work wherever Google can hear me, including in my car via Android Auto.