Considering openHAB - Startup and migration (from Home Assistant) questions

This is the way.
If you want to use HABApp (python3) there is also the possibility to use the Scheduler to run a callback.
There you can also chain boundaries, e.g.

self.sunrise_job = self.run.on_sunrise(self.callback)
self.sunrise_job.earliest(time(7, 0)).latest(time(9, 0)).offset(timedelta(minutes=30))

There are countless ways how you can achieve your goal and it’s only limited by your time and imagination.
Just try different things and use what suits you best!

Just make sure that you document the location and type of each device by device id. This will make setting up in OH considerably easier. When the Insteon binding finds new devices it adds them to the inbox with the address of the device name based of the address of the device. (device address AA.BB.CC → device name AABBCC).

darn. autocorrect and growing myopia makes for interesting posts.

1 Like

Since I’m using modules rather than switches for devices in the house, and these modules go in the j-box or wall box (or ceiling box) for a light or fan mount or for a switch, I’m recording the Insteon address for each device before it goes into the wall!

That’s a good way of putting it. Someone just went in the other direction recently, and they’re always welcome back. We try to keep things friendly around here.

It’s basically for connecting a Thread network to an IP-based network over WiFi or ethernet. But unlike a Z-Wave controller, you can have multiple border routers in your network that all talk to each other and to your Thread devices).

That’s exactly it. OH needs to have all of your devices, and my various interfaces only show the devices I want to use through them.

@JimT covered this pretty well from the rules side, but you’ll also need to think about the hardware. I think you’ll want a switch that can act as a scene controller, so that you can have different button presses for your two scenes (30% and 100%). Or just add a separate scene controller like this one. Otherwise, you may find that pressing the physical switch doesn’t always give you the results you want. That can be maddening.

Some folks advocate for adding wires whenever you can, while others advocate for wireless. Both will say that they’re trying to avoid obsolesence in the future. I don’t think there’s any way around that, because technology continues to move forward. You can still find lots of houses that don’t have neutral wires, and thrift stores have shelves full of old WiFi routers. Nothing is safe.

I can envision a future in which the 110/220V AC sockets in our houses are mostly replaced with 5V/12V DC ports. They’d be safer, more efficient, and get rid of all the AC adapters plugged into our walls. This is a very, very distant future. Very.

Close. It’s a Creality CR-6 SE, which has auto-levelling via a strain gauge built into the hotend. The auto-levelling works pretty well, but I’ve read that the CR-Touch is still better.

Something for you to consider: Beginner’s Guide to Network UPS Tools (NUT) on a Raspberry Pi

This is odd. I wrote a long response, doing what I usually do: Responding to a number of comments, from different people, in one response, so I don’t make 3-5 responses in a row. I see @rpwong saw that response and everything in it, but now, when I look at it, I see where I quoted from one post with a one paragraph response. I cannot see the rest of the post - but it must have shown up since he’s quoted from parts of it I can’t see.

I can still see it. You might not have gone far enough back.

I appreciate that. I also saw how HA and oH can work with each other through MQTT. Nobody gains when someone makes it more about winning than building good code.

Eventually I may get some battery powered switches, or multi-switches. I think it was Aeotec where I saw something like that - 4 buttons or switches in a rechargeable device. You can just leave them on the table and they’re easily reachable.

I’d like to see something like that setup for TV remotes, too, connecting oH and HA to infrared controllers. I have something like that partially set up with HA, but never got all the way through it. While it sounds good to just make a control panel on the app for your phone, that can be a pain, since it means having to wait for the phone to recognize you and then running the right app - it’s not like picking up a device and just pushing the buttons on it.

Before we built this house and moved in, I lived in a brick house that my grandparents had built in the 1940s, after he came back from WWII. The phone system had 3 wires. We didn’t find that out until my ex and I came back one night and found the Verizon installer had installed our 2nd line on 2 out of 3 of those wires and, in so doing, had disconnected our main line. I had to scramble to run a normal phone line so we’d have both working that night. (We were expecting calls and this was in the '80s, and we needed to get both lines up and working.) Later I ran all new phone lines, including to every room in the house. Later I had to rewire the whole house. As you pointed out, no ground line, but, even worse, was “Megafuse!” There was an old fuse panel in the house, in a closet. 4 fuses and two larger cartridges. The original power line went in there. They ran it to a new breaker box, but one line from the new box went to the old one and spidered out from there, covering 2 bedrooms, a bath, halls, and the living room. Plug in a hairdryer and the TV and one computer stopped when it blew the fuse!

I ended up rewiring ALL the powerlines in that house (using #12AWG for 15 amp breakers - I overwired for expansion and safety), running ethernet to all rooms, good phone lines to all rooms, and coax to every spot where I thought it’d be needed - and set up one closet as a hub for any switches or splitters.

I put a lot of what I learned to use when we built this house and I planned out the coax, ethernet, phone lines, and power lines carefully. I also planned power lines to make it easy to upgrade by adding home automation modules. For instance, the great room is 2 floors high, so instead of running wire to the light and fan hanging from the ceiling, then just a wire loop to the switch, I made sure power went to the switches.

I could see someone coming up with putting wires to all devices, but it’d be a mess. Extra wiring in the walls carrying data to places connected to AC, so the data wires have to be shielded or kept away from the AC lines. Plus most people move into old houses where things like that often can’t be added. If I had to bet, I’d say they go with wireless or, like Insteon can do, signals over the power lines.

I’m thinking there’d be several types of outlets, including some with multiple USB plugs, others AC only, and others mixed. (Like you can already get.) I may be wrong, but I’ve heard trying turn 5V or 12V DC through a house would have issues with power loss. So my guess is the AC in-wall wiring is here for a good while longer, but that we’ll see more outlet designs including USB connectors/chargers.

I got seriously nailed on my Ender 3 Pro. I got the CR-Touch for it, and it would NOT work properly for 5 months. I finally found out it was because my logic board had a GD chip, not the older STM chip and Creality firmware was still being compiled for STM. That created a bug Creality was not acknowledging or working with for, when I checked, 5 months. I finally found firmware someone had compiled that worked with the Touch on the GD chip.

I haven’t gone into the full details, so this may be in the TL;DR category.

I never had lightning issues at my old house. My guess is because it was in the ‘burbs, with power lines nearby, and that lightning often went through those or otherwise was not actually hitting near houses. Out here, we’ve had one lightning strike that hit near the house. It blew out 40’ of ethernet cable that tested find when I put it in during construction (and after the insulation and drywall was put in place), but was dead later, when I was going to use it for our new internet connection. It also blew out two HDMI ports, one on a TV and, on the other end, on an HDMI splitter. That was just a “near miss” strike and the current must have been from induction.

But the real problem is the barn. I have 500’ of trench from the house to the barn. It includes 3 lines of 4/0 aluminum and a ground wire. Also a 2" black poly pipe for pumping sewage up the hill to our tank. There are two 1 1/2" (or 1 1/4" - I can’t remember) black poly pipes in that trench, too. One for water and the other for fiber optic lines. The barn used to be a pig barn. Concrete floor, but not even. Two trenches that ran almost the full 50’ length of the barn, both 2’x2’. Originally used for pig waste, but that was 30 or more years ago. I bleached the hell out of 'em! We had to put down a new concrete slab floor because the original floor was uneven. Those trenches became tunnels and I designed things so all the wires and water lines that needed to go under the 1st floor went through those trenches.

That included 30’ of ethernet running from the converters for the fiber lines from the house to the switch in a tech closet. It turns out that was a bad idea. The ethernet lines in that trench had to go on a wall or the ceiling of that concrete tunnel and lightning strikes nearby sent current through those lines via induction and, on multiple occasions, blew out ethernet ports on connected devices. I finally replace that last 30-40’ of ethernet with fiber and that issues stopped.

Also, when we finally got Starlink (our first good, solid internet service!), there were a few issues there. That’s when I ran into issues with that one HA setup acting up.

I’ve found that, for the barn, ethernet lines in some areas are doing okay, but if it goes through one of the tunnels, I need to use fiber. The same is true for the upstairs. It’s a Dutch roof and I now have fiber used for any lines in the ceiling or that run along the outside walls very far. That’s stopped the ethernet ports blowing out.

We have a standby generator, so I have a LOT of UPS systems here. They only have to last about 45 seconds or so before the generator kicks in. Now I also have a UPS inline for the Starlink receiver, which is out in a field out front, with a total of about 1,000’ of fiber cable to bring the signal to inside the house and about 800’ of power lines from our garden shed to the post with the dish on it. (All that is, of course, in a 2’ trench!) It was while I was working out just how to set up the UPS on the Starlink line (which also was related to some of what I was doing in the tech closet) that I had issues with that Home Assistant install.

Everything is protected now - fiber instead of ethernet in places where lightning is likely to be a problem and a UPS protecting anything electronic - computers, Pis, printer, CNC, TVs, and so on. Lights and such, no, but things with circuitry, yes. So at this point, when power goes off, our internet, TVs, computers, and so on, can continue like nothing happened. We could still get a freak lightning strike that might cause damage, but that’s a danger any house faces.

Ah - messed up memory. I wrote it early in the AM, before I went to sleep. I could have sworn I wrote it after I woke up!

1 Like

A Logitech Harmony Hub works for this if you can still find one for a cheap price. Logitech has discontinued the hardware but continues to support the devices. Who knows when that will be, but I have two that I’m content to use until they stop working.

Here’s a recent discussion about remote controls that you might find of value.

Yeah, that’s why I say it’s a very distant future. DC does suffer power loss over distance (which is a big reason why we use AC for transmission), but within a building it would be possible to account for it. You’ll still need some AC plugs for high-powered appliances (vacuums, hair dryers, toasters).

What I’m suggesting isn’t a better solution unless a central AC/DC converter is significantly more efficient than the current AC adapters (which are typically ~80%). The concern I have is that is that the influx of wireless chargers is sending us in the opposite direction. They’re hideously inefficient.

Wow, that is a crazy story. Great work getting to where you are now.

I have a Logitech universal remote - can’t remember the model number right off. Overall, I’m not a huge Logitech fan. Both our big TVs are projection. Logitech (and Apple does this in some things, too - but not as frustrating, in my experience) has a tendency to set up one solution and make it hard to do things in another way. So when we switch from the DVD/BD player to AppleTV, it tries to turn the projection screen off, which means it starts rolling it up - then it tries to turn it on, by rolling it back down. That’s a small issue, but I remember when setting up the Harmony remotes, there were similar issues. Also, with a projection TV behind us, we have to hold the remotes just right when turning things on or off or the TV doesn’t receive a signal. I’m working on switching to Broadlink at this point. I have two controllers in our house great room, one in the front and one near the TV and that controls both of everything. One controller in the barn rec room (which is a big screen - and I mean BIG, for having friends over for movies) is by the TV. The signal from the remote does hit the TV there just fine.

Broadlink, in both places, will remove the need of “IR Calisthenics” to make sure everything gets turned on or off or gets the signal.

While it impedes progress, I think too many won’t get that and will just say how much they like not having to plug a phone in. And it’s hard for people to get how small devices can draw a lot of energy.

It’s more of a pain than that. In my workshop, the CNC is in the middle of the floor. My plan was to put USB-over-ethernet converters in place, one at the shop computer, and one in the middle work area, so I could have the signal go from workshop computer->USB/Ethernet convert->fiber converter->fiber optic lines-> - and then, on the other end, the same converters in reverse. That didn’t work because the USB over ethernet converters use the wires for their own signals and not for doing it over ethernet.

I’ve asked about that on forums, since it’s either use multiple Pis for printer and CNC control OR find a way to do USB over ethernet (real ethernet, not just the ethernet cables). There are commercial ways to do it and one FOSS project for it. (Sadly, the FOSS doesn’t work on a Mac.) I’m still working on the best way to handle that. What’s frustrating is that some people think they’re helping and don’t get how unusual the situation is and think that, these days, I can just go out and spend $200 or more for a new Pi when they’re really hard to find and super-expensive now.

If you have to do this, then you have a Harmony IR remote. A Harmony Hub is a smallish box that sits next to your equipment (like the Broadlink), and the companion remote uses RF. It’s way better, but still has some usability issues. Notably, it knows that if you switch activities and the TV is already on, it doesn’t have to turn the TV on again.

I’ve got a Broadlink RM4 Mini, but haven’t done much with it. It was more about experimenting for the day when my Harmony Hubs stop working.

IKEA sells several nice battery powered “buttons”:

All of them have magnetic back + a metal plate you can stick on the wall if you so desire. This means that you can put it on the metal plate on the wall, or take it off and put it on the table. They are also cheap.

They use zigbee. You simply need to add a zigbee dongle and run zigbee2mqtt. You can use it with HA or openhab, or both - it’s just mqtt. They all support multi-clicks, so you can come up with all kinds of combinations to use them, e.g. double click cycles the brightness / colours, or double click toggles different lights or even mutes the TV etc.

It’s perfectly fine using both zigbee and zwave together. I don’t have any zwave because zwave devices are much much more expensive and rare, choices are also very limited at least here in Australia.

I love my LG TVs. Openhab can control all of them directly over the network without any IR bridges. See if your TVs are supported?

I’ve downloaded oH for Pi and put it on a USB stick. That’ll be for testing. Right now I have a lot of USB sticks and not many good SD cards. (I’ve had problems with some lower quality SD cards in the past and need to order more good ones.) I’m going to set this test install up in my barn and take the Z Wave dongle and move it from the Pi down there running ZWaveJS2MQTT to the oH Pi. I’m also copying the secure keys from the ZWaveJS2MQTT config and see if I can use them with Oh. (Down there I only have 3 locks I’d have to reset, so if it doesn’t work, it’s not a big problem.)

I’m going to use this, with the app on my phone, so I can get used to oH and learn it. Then, when I’m ready, and I’ve read over linking to oH systems, I’ll setup another Pi with oH and use it in the house, to replace Home Assistant. Then I can just move my Z Wave and Insteon dongles to the new oH setup there.

I notice you have two examples in Ruby and I have read that I can use Python with oH, or use a REST interface. Would I have to use something like Ruby (or Python?) to make up a more complex rule like this, or can that be done directly with the rule editors in oH?

Missed that before. (Now I’m thinking of people in helmets and Mandalorian armor!)

Catching up and making sure I haven’t missed things. I do remember seeing this before.

I had Logitech’s “MyHarmony” program, or something like it, on my Mac, but then it stopped working on the newer versions and it took them a LONG time to come out with something to replace it so I could change any programming on my remotes. I thought about getting one of their hubs, but I’m not exactly crazy over Logitech. I was using the full-house Squeezebox music system by SlimDevices. Logitech bought it out and removed everything that made it worth having. It seems to me they have no problem dropping a line in a hurry and moving on. I know all companies do that, but Logitech seems especially quick to do it.

I have something that works for now - not great, but it works. There’s problems, as I mentioned. So if I’m dealing with back issues, and in the easy chair that really helps me when that happens, it’s hard to use the remote to turn on the entertainment system. I just can’t get into the right angle from that spot. But overall it works, so my plan has been to just go straight to Broadlink. The only thing that’s changed is that now I’m going to be figuring out how to do that on oH instead of HA.

I’ll be looking over those. I do have one light switch style button with adhesive on it that I’m going to use in a bathroom where the “real” light switch is a bit hard to reach when walking in the door.

That’s one thing I like about HA and oH - I can use different systems together. I think I’ve mentioned I have two ISY994i devices (I think the maker is Universal Devices) and I got them because they handled both Insteon and Z Wave, but then I would have had to spend decent cash to replace BOTH of those units to work with newer devices. Also, I found the rules I could make in their system rather limited - so the paid-for system was less capable than the open source ones.

I’ve looked into that before. My Epson projector is from about 2017 and I think it was near EOL at the time. There’s a remote control program for my iPhone, but all I ever need to do with the actual TVs is turn them on and off. I also have DVD/BD players, HDMI switches, and Apple TVs in both entertainment centers, so I need to control multiple devices in each place.

I’d rather do it without an IR bridge if all components could be controlled directly, but some devices don’t have that option. I figure it’s better to use the same system for all the devices in both entertainment centers than mixing them up.

I don’t think Logitech is any worse than others, but Squeezebox was handled badly and anyone who had one understandably won’t forget about it. I’ve had one of my Harmony Hubs since 2013, which is about when they came out, and they only discontinued them a year ago (maybe two). The CEO was pretty up front about the fact that remotes aren’t profitable, and that they would keep the servers running indefinitely. I optimistically interpret this as “the user base dwindles” or “the servers become security risks”.

I’m hopeful that Broadlink will release an RF remote for the RM4 Pro, which would make it a one-to-one replacement for the Harmony Hub and a very powerful addition to openHAB. As you noted earlier, it’s not convenient to use an app for remote control.

Interesting. It sounds like part of an overall change as people watch more on phones, tablets, and computers, but also that maybe more people are using their phones as remotes, too. I thought I had mentioned this upstream, but the search for a key word or two indicates I haven’t. I don’t like the idea of phones as a remote. A small factor is having to pull it out of my pocket when I’m sprawled on the sofa, but it also means having to put in my passcode or get biometric ID to open it, and then maybe running that app if I had just run a different one (like looking up a show or movie in the IMDB while watching).

It can be useful and helpful to have the remote function on a phone, but I think having a good physical remote that is easy to grab and press a few buttons is often much easier. I hope, between printing a case and buttons and using a Pi Zero wifi with a USB charging connection is something doable.

Exactly - but if they don’t, I like the DIY Pi Zero possibility. (What I’d really like is to have that with an LCD screen, like my Harmony remotes have, to make it easy to add programmable buttons, too.)

I’m glad I’m not the only one that finds an app for remote control can be frustrating.

The web UI allows you to create basic rules, even with conditions, without using scripting languages.

For more complex rules, you can use Blockly, RulesDSL (both are built-in to openhab) or install the automation addon for the other languages, e.g. Jython, JS, Ruby, Groovy, etc. You can install ALL of them and use all of them simultaneously.

The openhab web UI comes with a web based code editor so you can type your Python/JS/Ruby rule code using your browser.

Alternatively, you can create / manage your scripts as files which you can group into subdirectories. In this case, one file can contain multiple rules, so people use this to group similar rules into one file, and similar files into one subdirectory, etc.

I believe the Zigbee stacks firmware proprietary API/CLI specific part is not really a big deal since the Zigbee protocol itself is standardized, so either your application support that API/CLI or it does not, thus that itself does not cause any compatibility issues, buton the other han d Zigbee compatibility between different Zigbee gateway implementations and all Zigbee devices out there are still a serious mess regardless because many manufacturers of Zigbee devices have a tendency to not follow the Zigbee standard specification, (Chinese manufacturers like Tuya and Aqara/Xiaomi is infamous for doing that + Tuya is the worlds largest white-label and OEM/ODM manufacturer of Zigbee devices which gets rebranded to multiple other brands for global resale), which in turn forces all Zigbee gateway implementations to sometimes have to write custom translation/converter handlers with workarounds for each individual device modell that deviate the Zigbee standard specification in order to offer.

Z-Wave solves this by having a common database for each and every device that certified manufacturers get access to, so as long as Z-Wave gateway manufacturers keep importing the latest database and releasing updates + have implemented all different “types” and “features” then any Z-Wave device from all manufacturers should just work in theory (however as we all know theory does not always work in reality, still Z-Wave compatibility is usually great out-of-the-box when compared to Zigbee devices from different brands). think that the new Matter standard (Project CHIP) that uses the Thread protocol uses a similar approach to that(?), which if it is the case could make future Matter over Thread devices compatible with your Matter over Thread implementation if the developer chooses to do so, (but we know from announcements made that many commercial manufacturers, like Philips and IKEA, will still enable propriatory lock down in their own Matter over Thread gateways to only allow users to join/pair/connect their own brand of devices when using their official gateways).

That sounds like, given a choice, for an end user, Z Wave avoids the issue of buying a device and finding out that even though it’s branded Zigbee, that it might not work on your own system.

I don’t remember this clearly, but when I was making my original decision, and this was about 2017, I read that Z Wave also created a mesh network that reduced issues with distance from the source controller. I do remember there was some kind of trade-off for that, but I don’t remember what the downside was to Z Wave at the time (when compared to Zigbee), or at least that I had read about.

It’s worth mentioning here that most of these non-standard Zigbee devices we know are using Zigbee but they do not claim to be Zigbee (i.e. do not bear the Zigbee logo on the box/device). Aquara, Tradfre, Hue, and lot of the rest may claim Zigbee but they usually won’t bear the Zigbee logo on the package. To get the rights to use that logo the device has to be certified by the Zigbee Alliance same as Zwave.

Obviously someone can misuse the logo without permission but they open themselves up to a trademark infringement situation.

So, if the box bears the Zigbee logo, that’s a pretty good indication that it will work just fine out of the box (though there could still be some fly by night outfits that don’t care about the trademark issue). If it just claims to be Zigbee but doesn’t bear the logo, it likely has added stuff above and beyond Zigbee which means it may or may not work.

I’ve stuck strictly to devices that only bear the Zigbee logo on the box and have had no problems with the built in openHAB Zigbee add-on. Granted, I don’t have a ton of Zigbee devices (some smart plugs and a couple of water leak sensors).

People who get a lot of “sort of Zigbee” devices tend to have better luck with ZigbeeToMQTT as that supports more of these not quite Zigbee stuff, but the last I looked it only works with one or two coordinators (and it’s one I don’t have) and in addition you needed to flash the firmware on those to make it work.

So does Zigbee. Both are a mesh network using mains powered devices as routers/repeaters.

For many, Zigbee can be a problem in a congested environment as it uses the same frequencies as WiFi 2g. But that wouldn’t be a problem for you out in the sticks. It’s not even a problem for me in suburbia. But I could see dense environments like apartment complexes could be a different story.