The last time I coded was in COBOL (for those born after the 1960’s, it was a programming language, and we had punch cards, and no graphics because there were no screens!) So fast forward to 2020 and having stupidly offered to help family implement a large HA project in a new mega build, things could have gone terribly wrong!
So here I am, wanting to spread a few words of encouragement and experience to anyone else who might be about to dip their toes into OH3.
Firstly, many thanks to the whole community and particularly the developers who spend so much time creating, improving, sharing and supporting. You don’t know me, but I’m probably 2020’s biggest OH plagiarist; but as they say, it’s the best form of flattery!; and special thanks go out to Kai @Kai for his amazing work, @rlkoshak who seems to spend his entire life helping others, @matt1 with the IP Camera (I have 10 of those streaming none stop!) , @RGroll for the weather binding and all the documentation that I’ve seen building, and to Yannick @ysc for his work on the OH2 Matrix theme, which is where I started, and then OH3 came along.
So, in return, I hope these notes and experiences may give back and help someone else.
I had OH2 tested and was ready to go for a December go live; I loved the Matrix theme; I’d learnt some HTML and was trying to get my head around AngularJS building some kind of dynamic menu system that could support a property with many rooms and loads of things. I’d read throughout the forum that naming standards, and @rlkoshak ‘s emphasis on Design Patterns would stand me in good stead for the future; I must have redesigned, recreated and deleted all my items and groups so many times on discovering a new reason why one would be better than another - my final structure was to be proud of; and would even enable some random requirement like a Sonos speaker in a dog’s kennel to be catered for! (read on, that one came back to haunt me!)
Just as I had completed my OH2 masterpiece with a dynamic Matrix theme that would have allowed Keanu Reeves to jump from floor to room whilst operating roller shutters and flicking light switches using a single piece of parameter driven code; I saw something about what was about to come. OH3!
So here I am doing what I would never allow anyone else to do; testing out pre-release software and starting a whole new learning curve; and the results have been amazing. Phew!
One thing I’ve learnt is that the time I took planning the structure, the names, the descriptions, really made things very easy for moving to OH3, and I know that not everyone will have the flexibility of starting with a clean sheet like I did. However, OH3 also makes things easy in many ways too; whereas Groups always seemed to me to be a necessary ‘evil’ in OH2, required to ease programming; in OH3 they suddenly become visual.
Now I can have a Lightbulb (equipment) in the Living Room; and I can also have the Point (the Light) switch on the Living Room wall, and the Downstairs Wall and the magic ‘Indoors’ wall. In fact, I can have so many lights switches controlling one little lightbulb that it would make an electrician’s head spin wondering where they can get a 20-gang wall-switch from!
Where I’ve learnt to love ‘Groups’ is in structuring Equipment; and that because if you can simplify the presentation of equipment, then the Locations tab becomes your main navigation throughout the home.
Because OH3 allows you to easily analyse every single Point on all your equipment there is, or at least for me there was, a tendency to add every single Point for every single piece of Equipment that you have, to your model. Exciting as it maybe, there is possibly little future requirement for me to analyse the air flow from the exhaust of my brother-in-law’s heat exchanger and to compare it to the electric used on a Tuesday by a nephew with a PS4.
However, as with the dog Kennel, never say never! So, I found that having a top-level Inverter Equipment group, with the key Points part of the physical room Location, but all the individual Inverter Points in a sub Inverter-Equipment group; then OH3 automatically generated a very easy Room by Room navigation menu for me.
Just when you thought you couldn’t love groups anymore, there are Widgets, and they make groups sing! It all well and good having a nice tidy and automatically created menu, and navigation via the Locations tab; but ultimately that’s just going to take us to a group and then to a list. But Widgets are the icing on the cake; now rather than just ending up with a list of Sonos points, and with thanks to @buschif4 , our automatically generated Location menu now pops up into this amazing Sonos Multi Room controller
I’ve used the same technique for TV’s, Roller Shutter automation and security cameras.
It hasn’t all been easy a new house means new equipment and in this case lots of Roller shutters with RSI channels – no easy option of “Go to 27% OPEN” with IO drives. No! This required some serious programming hours and debugging 10 lines of code trying to understand why “Go to Middle”; Thread::sleep(waitDown); “Go UP”; and STOP didn’t work.
Today apparently computers work in milliseconds, my Thread::sleep(12) didn’t quite make the 2020 programmer awards; but I still feel I’ve won!
Thank you all again; I hope this helps someone; and made a few others laugh.
- Platform information:
- Hardware: VM 4core, 8Gb
- OS: Ubuntu 20.04
- Java Runtime Environment: 11
- openHAB version: 3 RC1
- Issue of the topic: please be detailed explaining your issue
- Please post configurations (if applicable):
- Items configuration related to the issue
- Sitemap configuration related to the issue
- Rules code related to the issue
- Services configuration related to the issue
- If logs where generated please post these here using code fences: