Topic consolidation

What is totally funny is how far Google is behind Amazon when it comes to the smart home industry. I started with Google because we use Google cloud services to run our business. However I purchased am Amazon Dot and that opened my eyes to how far ahead Amazon is.

Amazon website needs a lot of improvement however Google does not even have a website for its home projects. If Google has they have not made it easy to find like Amazon.

Do you know who we really need on this project, Andrew Tridgell, yes the legend himself who packet sniffed Microsoft’s protocols to reverse engineer microsoft file sharing and develop Samba.

So if all else fails we just need someone two is a legend at pulling data streams apart.

I have seen Andrew talk at a few meetings I attended, he has a way with words. Yes I am an Andrew Groupie.

1 Like

I now have OH2 talking to my wemos via MQTT in a bidirectional way. Totally happy camper,

I still have some way to go in learning about OH, however I have hit my first milestone.

1 Like

The issue with TUYA is that they change the goal posts and want total control through their api. All data to turn your lights on and off goes through China. I decided to keep it all on my local LAN.

You have MQTT to openHAB sorted however if you need help or reprogramming the TUYA stuff to something else let me know.

Some good points, I will gradually migrate my stuff off cloud based technology to local devices. I do not need to change my wifi config once it is set because every new access point has my standard setup.

We have having a bit of a debate in Australia about renewables and coal power, I am in the home solar PV camp so there has been a push to tax us to export to the grid. So given how fragile our grid is I am happy to play the long game and just rebuild all of my technology so it runs local off my network.

So when I have a fibre internet connection to my house then that will really push me to go off grid.

I think our best hope is that Matter takes off as a standard. That’s the only proposed standard right now that has the backing of Amazon, Apple, Google and the Zigbee Alliance (among others). My hope is that manufacturers will move to support that since it theoretically will give them seamless integration with HomeKit, Alexa and Google right out of the box.

As for reverse engineering the protocols, the world has moved on quite a bit since the days when Samba was developed. Even the cheapest of Chinese manufactures will use off the shelf end-to-end encryption that will make just looking at the packets insufficient. And if they are not using such encryption, you probably don’t want to be using those devices anyway.

2 Likes

Yes the world has evolved a lot, I have a cheap android tablet that I decided to put on a stand on my desk so it has Tuya app on it. Meanwhile I am collecting a bunch of material so I can built my own devices that interface easily into OH.

I have worked on the health insurance mainframes here in Australia and saw how they use scripts to automate everything. Back when I was there we used the high level language Rexx.

My wife has her head deep in NSW law at the moment for her job, so the pressure is on me to keep our network up and stable, and when it fails to put as much weight on those concerned to get it fixed.

It took us about three months to get a cable inspection and when it finally happened the NBN tech found there was no insulation on the cable join housing in our pit and it had been like that for years.

If anyone is following my story I have had my head deep in documentation, paperui, looking at error messages in the OH log files, and editing files with vim.

I noticed a comment somewhere else on here for us noobies not to use config files because of YAML errors, YAML is just another language for me. So I have translated just about everything I have done in paperui to config files except the link from the thing channel to the item. I used paper UI to add the item, lets just say its been a heavy read and I am not sure how those without my skill set would go navigating the documentation.

Hi,
Why didn’t you use OH3 it is heaps better in my opinion. I just use javascript and no DSL rules. No need to use vim (although I love vim)
I did it all via the GUI.
I have zigbee2mqtt, wifi switches, sonoff bridge that talks to the RF switches I put in and the door bell etc.
I have just pulled it all out today as I have sold my house and am moving so I will have to do it all over again.
This is how I had it 7 months ago. Openhab 3 some of things you can do with it. - YouTube

Good question, maybe I should just face the music and install OH3.

It has helped me learn more about OH so let the fun begin.

Now running openHAB 3.2.0.M4
Milestone Build

Yep I agree use OH3 if you are starting out. Do as much in the UI as you can :slight_smile:

Thanks, I got it up and running and my wemos test device is online and running.

I think it is easier.
If you are just starting then it will be easy to start from scratch.

The server that my OH install is running on was recently migrated from Centos to Debian because my version of Centos had reached end of life, so blowing away my OH install and installing it again was lets say a walk in the park.

And besides that Tuya, Google and Amazon are controlling all of my house while I learn to design my smart home.

I want to address some of this.

First, yes, if you are just learning OH don’t spend your time on OH 2.5 and jump straight to OH 3 instead.

PaperUI only exists in OH 2.x. It was dropped and the new, much more complete and capable MainUI replaces is in OH 3.x.

OH 2.x does not use nor support YAML in any way shape or form.

OH 3.x only shows a YAML rendering of most entities (excluding Items) in a YAML format in the “Code” tab, where available. The YAML there can be copied, edited, pasted, etc. but this YAML only really exists in MainUI.

The native format is actually JSON.

However, if you want to use text files for all the configs (or even some configs of a given type like all rules) there is a different syntax that is neither YAML nor JSON for each file type which you can find in the docs. Rules have a different syntax from Items which have a different syntax from Things and so on.

With all that out of the way, be sure to review the Getting Started tutorial which will walk you through OH’s UI way for managing Things, Items (and semantic model), and the UI. The rules situation is still a little in flux so I’m waiting before trying to write out the rules section.

Thank you, I learnt yesterday that paperui had been dropped from Version 3 when it was no longer available.

In my profession we use both gui and text based configuration and I like having the gui option available for those events that I might not want to get my hands dirty in files. I like that OH is a very flexible system and that it saves me from having to write my own system from the ground up.

Traditionally we have rolled our own systems when needed however the last time I did that was about 10 years ago. I created a system to monitor and control processing of large volumes of data for medical research. So we needed a way to manage large amounts of data, to run scripts on a data set, check the script did what we wanted and then run the next script.

We also needed a way to monitor what was happening, a way to pull up the output from a script to see what failed.

My interest in configuration files in OH is for devices I create myself because I plan to create a lot of things for various task, like cleaning goats fleece. For one off things at the moment it is not effective use of my time to learn how to do something only once.

There are decisions you can make now that might make that whole effort easier in the long run. For example:

  1. If you choose MQTT as the transport for messages from your DIY devices (and there really is no reason not to unless you are looking at using LORA or some exotic RF medium instead of TCP or UDP) if you spend a little bit of time to make your devices follow either the Homie or the Home Assistant standards for topics and messages openHAB will be able to automatically discover them and create the Things for you. Then you can use “Create Equipment from Thing” to create all the Items for a given device in one go.

  2. Using the MQTT Event Bus (see Marketplace MQTT Event Bus) all you’d need to do is create the Items in OH and configure your devices to pub/sub to the right topics. You won’t even need Things.

  3. See OH 3 Tips and Tricks 's Buying in Bulk sections for other ways to quickly create a bunch of similar Things in cases where automatic discovery isn’t possible (though auto-discover is always going to be a lot less work).

If you choose to use ESP8266s (I think these work for ESP32s too) be sure to look into some of the FOSS firmware like Tasmota, ESPEasy and others as many of these have support for Home Assistant’s (maybe Homie too now, it’s been awhile since I’ve looked) MQTT standard out of the box so all you need to do is configure the sensors and actuators and all the communication stuff is basically done for you. Tasmota even has an admin server to make updates and bulk configuration easier which might be attractive if you have a lot of these devices you want to manage all at once.

If you are running off of SBCs like Raspberry Pis, I believe that Homie has some standard Python and C libraries that could be used.

Since you’re building these yourself, you have the opportunity here to save yourself a lot of time and effort on the openHAB side of things and possibly on the device side too.

Thanks, I have installed mosquitto on my server and my test device is a wemos D1 mini with wifi.

So I have some code on the wemos that subs from a topic and I can use the linux mosquitto client to pub sup to the topic.

Other people have suggested tasmotta and I have those websites open in other tabs. Even watched a few youtube videos on the topic. I am now watching a video of someone who upgraded from OH2 to OH3.

TI would like to thank everyone for your comments, they are so helpful.

I do want to run up another instance of OH3 later on so that can be my play thing.

Python is one of those languages that I should learn, I have the site open to remind me to do it. A lot of my coding has been in PHP, however I am learning the arudino IDE and its language.

My OH install is running on debian 11.0, and I have arduino clones however I have recently purchased the wemo D1 mini. The PC I am running on is old however it has more than enough resources for everything I throw at it.


After some more digging I discovered some of the issues were caused by my code on the Wemos which had characters that were not parsing.

So after I fixed that problem then I found this page that helped me resolve the other problems I was having.
https://community.openhab.org/t/oh2-tasmota-flashed-sonoff-basic-with-dht22-via-mqtt/95643

100% No need to re-invent the wheel. However at some stage we put a tire on the wheel.

The Main UI is excellent but too much clicking around for my likening and I forget lots and have to go back.

My setup is still currently OH 2.5 text files and moving to OH3.

I use VSCode Remote DEV to connect to my SBC (PI3 or 4) running openHABian. This is because I have critical automation and running all the time so its wife friendly.

I have other users that I help out remotely to get things running for them this way.
I have all my things items and rules in files.

Screenshot

To explain some of the things in the screenshot

  • In the opanHAB column under ITEMS is a list of items with there current (state)
  • You can see things and channels
  • In the telegram.rules file you can see I have 5 errors which are underlined in red.
  • You can see that my cursor was on hover over the item telegramRepluId and the current value is Offline_List
  • There is a teminal down the bottom so no need for separate SSH program to access

The rule shown is openHAB asks me through telegram for a action to be taken. Depending on the response it will do something.

You can auto create items with a couple of clicks.

Thank you, yes I have only just had a short time with Main UI so it will be fun to get to know more about it.

This project is good for my mental health is a stepping stone to bigger and better things. Some of the big benefits for me of OH is that it allows me to consolidate systems down so I have also of our business apps running on one screen.

Our office here has been swamped in covid politics for 15 months so learning OH for me is a breath of fresh air.

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