IoT Unravelled Part 1: It's a Mess but Then There's Home Assistant

Some general discussions about the messy state of IoT and Home Assistant

1 Like

Many of us have moved AWAY from Home Assistant, including me. You like the local control and customization of HA. openHAB is even more flexible.

The grass always appears greener on the other side of the fence. Not too long ago I was getting frustrated here and decided to take another look at HA with my test system.

One major issue I had 18 months ago when I left was the lack of support in OZW for my North American devices. When I saw one of the paid developers released the zwave2mqtt addon for HA I took another look. It was not too long after an addon release. I found out it would not run properly without a workaround.

IMO although HA appears to ne more user ( especially newbie) focused, the code quality and lack of flexibility fail to deliver. Those people I know running HA successfully purposely stay on ancient version to avoid any breakage. Even waiting for several patch releases first, I always found upgrading HA a painful experience, prone to breakage.

In contrast, I am testing the developing OH3 versions here with less breakage than I had with Home Assistant.

For reference, when the developers forces the unreleased version of Python on users, I was the one that wrote the detailed (23 step?) process to help others.

Thanks for the comments on your perspective Bruce. I never tried HA so I can’t comment. I just found the HackerRank discussion on the messy state of IoT really aligns with my own experience.

I moved here for a few reasons.

  1. Z-Wave support. The developer actually helped me migrate and I chose to get involved assisting mainly on some device database updates & maintenance

  2. I arrived after 2.5M1 but before 2.5M2. I liked the development cycle of nightly snapshots followed by Milestones, followed by a Stable release. That got abandoned with OH2 after 2.5 and there have not been nightly snapshots with OH3. Last night I just downloaded the l;atest snapshot for Docker and got a binding that is 2 weeks old. Hopefully a more recent binding verion works.

  3. The community here is very knowledgeable & helpful.

1 Like

I find HA more agile for new devices…if ieven I want to see if new device is supports, that’s generally where I’ll find someone has done it…especially for some of our rebadged Ocenaia devices that aren’t prevalent anywhere else.

But their constant release cycle is one of the the main reasons I stick with Openhab. The constant upgrading is not great for stability.

The other really big plus for openhab (IMO) is the old style rules written in java(ish). THe closest ha can do is using an external system called appdaemon for python, else you’re stuck with their weird yml automations that I didn’t find intuitive for mulitiple conditions, and the action was always this json string specific for each item that just didn’t make sense to me.

Some of the features are cool though. I like how they have groups of devices, ie media players. And that presents a common interface for a number of actual devices that meet that specification. Openhab is way more open in that respent, ie a thermostat in openhab might be a conglomeration of 3 or 4 items. In HA that will be one this, that might in the background take information from a number of places.

And the simple recorder on each item that HA has, allowing you really quickly to see the state changes on a since item over a 24 hour period, the equivalent in openhab would be a influx or rr4j persisted item and a grafana widget to display the state over time. I keep meaning to do this for things like motion sensors.

@psyciknz - totally agree with you on the device types. In my python code, I have to add an abstraction layer for the devices. If we can push this further to the core, then that would reduce duplicate effort and make things a lot more structure. It would be a big mindset shift for OH though. It also creates more maintenance. The current OH model requires minimal change to the core to support new devices / sensors.

If you want to use pure Python 3 with OH, look at @Spaceman_Spiff HABApp classes.

Hi Bruce, I just took a quick look at HABApp. It looks great! I can see so many benefits besides Python3. To be able to decouple from OH would be a big gain IMO. There are strange behaviors with the current rule engine, and I find having to code and test Python code within the OH environment creates a long turn around time.

I will have to check it out. I’ve lots of code in Python 2 now, but it would be worth it to migrate over if the latency via the use of the REST API isn’t too bad.

Perhaps the Jython scripting would make more sense for you. Jython is basically Python 2 written in Java.

Clarification: I’ve lots of code in JSR223 Jython. Jython is basically at the dead end; there is no new development. The initial migration might be painful, but over the long terms I think it is a win. The code base will be cleaner. I’ve seen some strange behaviours with Jython when using loop comprehension.

Any citation for that? Some here maintain it is still being developed.

Well, officially no one stated that it’s dead. But I was looking up their Git repo a while ago, and there aren’t much activities. You can also look at the various mailing list; almost zero activity.

At this point, the best that we could expect is patches on top of the 2.7 code line. I don’t see any development for Python 3. Keep in mind that Python 3 was released in 2008.

There is another option to use embedded native Python: GraalVM, but it is still a bit in the future.

I’ve been here with openHAB for just over a year. I made the jump originally from Wink to HomeAssistant because it was “so easy” until you wanted to customize the dashboard to either reduce the amount of stuff being displayed just because it can be displayed, or rearrange what you see there. Then it becomes a mixture between convoluted or broken.

I came here because it offered what I needed and didn’t want $5 a month for the cloud integration/alexa, but it takes elbow grease for sure. Not saying i wouldn’t pay for cloud, but $5 for access to something you’re still doing the work to maintain, i would have paid that to wink if i had faith they could keep their stuff online. Neither system is for the faint of heart, you have to be patient, you have to accept that it will take you longer to get where you truly want to be regardless of the system you choose and most important you need to be humble and be ok with asking for help. I mean it’s taken me almost a year to go from “cool I have openHAB working with my things” and porting them into HomeKit via home bridge, to all this time before I got around to actually learning how to work with HABPanel lol. To be honest, I also just started truly utilizing items and things and all the files aspects because I realized I needed them to make use of HABPanel.

Now we get to the stability, there have been very few times where things didn’t work over the release of 2.5 after the milestone builds. Yes I did have outages, whether it was my pi, or an update that hadn’t panned out the way I expected, but overall, fixes were implemented and my system returned.

I had to reinstall HA multiple times over the months of using it due to me breaking something and being unable to fix it. What I have found to be the mantra for me with OH, is realizing I unfortunately don’t have the time to be “bleeding edge” because it infuriates my wife and I’m not programmer smart enough to dig in to things and understand the code and understand (sadly but honestly) git processes. OH is the system that you choose when to update, you see what will be updated if you do the command line apt update and upgrade, so you also have an idea of what will be changed, and what to keep an eye on. HA you get what they give you and hopefully you can work through what is necessary to get things back online before your wife or significant other tells you they are tired of things just not working lol.

I learned with the 2.5 milestones that I need to wait for the full release of 3.0 and likely I’ll be moving to a new pi when I do that but will be after the first of the year. I’m not saying to not give HA a shot, just that you still need to be prepared if you do, it’s not a silver bullet that fixes everything you may perceive to be wrong.

Actually the first release of 2,5 was broken for some new users. You maty want to wait for a second release. Then the documentation would likely be available too. Now the closest to documentation is some forum threads here.

In OH 3 you can see charts for any Item persisted to the default database at the click of a button. You can even put a line graph of the Item as a background behind the Item widget.

One of my temperature sensor Items in MainUI.

If I click on “Analyze”

I built my semantic model so I can go to my Properties page and see a chart with all my temp sensors.


You can pick and choose the items to include and save the chart settings for later viewing.

Just something to look forward to.

Hope you have files issues for these. Or are you seeing issues with Jython itself and it’s not something that can be fixed in the Helper Libraries?

Note that HABApp can only interact with what is available through the REST API. The biggest thing you will not be able to do is use Actions.

1 Like

@rlkoshak
There are 3 types of issues I see with Jython code, at least in the way that I use them.

  1. OpenHab runtime issue related to the JSR223 rule engines. These are well known and mainly in the startup and the loading of the rules themselves.

    • An artificial delay has to be injected at the very beginning to ensure the script context is loaded.
    • The modules and the rules file names have to be in certain order to guarantee correct loading order.
    • OH would reload and run the rules twice if they are modified at runtime.
  2. Jython issues themselves. They tend to involve more complex lambda usage such as in list comprehension. They are annoying but luckily can be worked around. Another issue here is that Jython is very unlikely to support Python 3, so there is more motivation here to go with the latest.

  3. The turn around time is long when developing Jython with OpenHab. It is okay if all you have are rule files. However, if the code bases get more complex with modules, the reloading of the modules will become very painful. Sometimes if the change is limited, we can do a targeted reload(). But if the change is in the very bottom layer, the only way is to restart OpenHab, and that would take a long time.

So yes, HabApp is not going to be the silver bullet, but IMO it is worth a try. It is an interesting alternative approach.

  1. I’ve not had a need to insert a delay in my Jython rules on 2.5. Jython isn’t ready for 3.0 so I cant comment on that. But what I can comment on is if one uses JSONDB rules timing doesn’t become na issue. I’ve also not seen the problem with rules running twice, but it’s been awhile since I’ve change a Jython rule so maybe this is something new. But no matter what I’ve seen, if you see strange behavior you should file an issue or it will never be fixed.

  2. I don’t personally find the list comprehension in Jython to be any different from list comprehension in regular old Python. It’s not clear to me here what about Jython is different in that regard. It’s also worth noting that you don’t have to use list comprehension.

  3. I can’t say anything about that except to say that JSONDB rules don’t appear to have the same problem. But since Jython is not yet supported on OH 3 I’ve been moving to JavaScript an with JavaScript the libraries are reloaded when ever the rule runs.

But the point remains, if you encounter something that is’t working right, if an issue isn’t filed it’s never going to be fixed and it’s never going to get better.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.