I’m green to the whole subject
I actually have 30 SONOFF products with TASMOTA on them
What I want is local control, with a nice panel on the tablet, with timers and scenes and the ability to control by Alexa.
Maybe I’m asking too much
I have RASPBERRY 3 + B with OPENHABIAN on it
And I managed (eventually) to get to the page in a browser with OPENHAB
From now on I have no idea what to do
I understood that OPENHAB should be defined as a client of MQTT BROKER
Is it possible that on this RASPBERRY I will also have MQTT BROKER? Because I can not leave another computer as BROKER.
Can I use OPENHAB in SONOFF products without MQTT?
Today I use TASMOADMIN.
There are not many programming capabilities.
Thank you very much to all the helpers
Yes no problems
Yes with the tasmota rest api. But mqtt is far better and easier to use.
a very easy to use mqtt broker is mosquitto, which is available for raspberry, and you could even use the embedded mqtt broker which is delivered within openHAB2.4 (maybe also OH2.3?) You may find it in
Paper UI -> Add-ons -> MISC -> Embedded MQTT Broker
Did you consider reading This?.
If that doesn’t help, you should consider reading the beginners documentation of OPENHAB (use the link Documentation on top of this page).
Thank you very much vzorglub and Udo_Hartmann for your help
I really appreciate people who give themselves and their wisdom to others in particular when I feel that I do not understand anything
So I understand that I can turn the RASPBERRY into MQTT BROKER, which means I do not need anything other than the RASPBERRY hardware.
The RASPBERRY of course is connected to the router and to the network where all the switches are located.
So I installed MQTT BROKER as you wrote through ADD-ON and I set a name and password and did not define a port (I’m right?) And did not understand what the “secure” means.
I also installed the MQTT BINDING via ADD-ON.
I understand that now I need to set the DEVICES SONOFF to the name and password I defined in MQTT BROKER, right ?.
So step by step …
Installing the TASMOTA on the SONOFF,
Installing OPENHAB on the RASPBERRY ,.
Installing MQTT BROKER on the OPENHAB
Setting the name and password of the MQTT BROKER
Sets the name and password on the SONOFF
Installing the MQTT BINDING on the OPENHAB
And again thank you for your help
I read all the documents for beginners
And that mostly made me a blackout
I understood a small part and the majority seemed to me like gibberish
And I know myself that I understand much better with personal guidance
And thanks again for that
Those documents have been written to give guidance ( the persons answering in here migth even be the ones that have written the document).
One advice, go step by step, for example start openHAB and create a single item and show it on the sitemap . Having mastered that then try to add a device. In case of sonoff/tasmota the page I have linked above does give all the needed steps ( even if you have to follow a link to understand mqtt).
If you have a specific questions at ANY step there are lots of people willing the help!
I was in the same position as you are right now, the learning curve was step but with the help of the forum members it was a peace of cake.
You can also follow this:
The truth is that after I read some of the documents, I gave up
I’m not interested in becoming an expert
I just want to connect my devices to OPENHAB
I can install, set some, but no more than that.
I can not learn Arduino just to install TASMOTA on the SONOFF
And I can not study Linux just for installing OPENHABIAN on the RASPBERRY
And I can not study dozens of MQTT documents just for MQTT BROKER set
I do not want to learn MQTT, I just want to use a simple panel and control my home
I need the guide who tells me the minimum information I need to reach the goal
And every guide given here (and I tried to read them believe me.) Requires a few reading pages about things I just can not figure out
Anyway thank you for trying
If you are not willing to put some time in it you’ll never have a good home automation system.
Just buy a ready made one for big bucks
Just a pity that I invested in the RASPBERRY.
You may have an idea about such a finished product to invest in.
That will be quite an investment. They are very expensive
Hi Nati please call me 0523519988
After I gave up, I saw this guy’s series
And everything became clearer
Highly recommend for beginner
Suginach, I thank you for your frankness. I too am a beginner and do not with to become an expert just want an inexpensive HA system. The problem I see is that the documentation written is not for beginners and the documentation is very confusing because many documents are out of date with old and wrong info. Also there are many ways to achieve the same goal. So for you and me it sends us off in lala land. I learn by simple trial and error, have a dyslexic mind. If the experts here would just supply a simple “what it takes to set up a simple device” it would make for more pleasing community. I now have my house 80% lighting on a PI and Openhab. Just entered the world of MQTT and I must say there are few examples of complete documentation of just what it takes. I DO appreciate the experts here that help, I just ask them to be patient with people who have full working lives that can not spend days learning, but could contribute.
Really? Which documentation? This one https://www.openhab.org/docs/ is not out of date, as it’s automatically built every time openHAB is rebuilt.
It’s created from the sources, so it should be always cutting-edge.
In fact, it’s even possible to switch between versions (if there is an old version available, right upper corner)
Please be aware that openHAB is a highly complex piece of software, it’s used to merge hundreds of different (and in most cases completely incompatible) systems to one big system.
You will need deep knowledge of every part of your system, as there is no “just put A + B + C + D together, ta-dah, magic, working exactly as you want it to”, you have to tell all components what to do, not only openHAB but also every other part.
Learn it or leave it, it’s as simple as that.
Guess why professional home automation is so expensive? Because the manufacturer has to do all the work for you…
In fact, you don’t need to be a Linux expert to build a Raspberry openHAB system, but you will have to
- download at least some software to flash the openhabian image to a SD card
- download the correct image
- follow the instructions “by heart”
- learn how to use the raspberry the correct way (no, it’s not a windows desktop)
- learn how to use windows shares from a GNU/Linux system correctly
- learn how to connect all your components together to openHAB
- learn how to configure openHAB the right way
If using hardware which isn’t meant to be used in an open way (such as sonoff) you will have to learn how to flash an alternative firmware (oh no, more to read, more to learn: download a flash tool, download the firmware, connect sonoff to the computer the correct way - four wires, confusing - flash…)
And yes, even then you will have to learn all sort of stuff like building rules…
Either spend many thousand bucks to let others do the job or learn how to do it yourself
Udo, you seem to me to be missing my point! OR I haven’t explained myself clearly.
Please let me explain! I mean no offense to your or anyone else’s efforts.
I just read a document from " David Graeff posted on Sunday, 16 December 2018" . Very well done! I am using a PI, with Milestone 2.5, and trying to understand MQTT. As I follow this document, I get to the part to configure the binding, guess what? My binding, the only binding available, via paper ui, to me, well it doesn’t give me the ability to do as the document explains. What do I do now? I have, from my many attempts, corrupted one setup after many hours of trying to configure MQTT. Luckily I have backup images so I don’t have to start from scratch. I have dyslexia, so reading extensive blah, blah I can not do it. I know it’s my problem. If it weren’t for those great youtube experts I would have never got so far. I am a retired computer/network admin, I don’t have lots of money, I like a challenge, but not all of us here have the same knowledge of programming lingo. YES Openhab is an “open source” makes it difficult. So maybe listen when dummies like me say they need help. Why can’t there be a simple document with the requirements to make something work? Or better yet, documentation that explains the setup parameters within a thing or binding. I read these posts where people fumble over installing “MQTT” and not knowing what components are needed to make it al work. So I am not the only one with issues.
Again sorry if I offended you, not my intent. just find the documentation hard to follow. Hoping one day I can help others.
Oh, I wasn*t offended at all and I didn’t want to offend you either…
There are several possible ways to do the configuration, starting from the real hardware and the exact firmware, e.g. if using the most recent version of tasmota, you will have the option to automagically detect your hardware from within openHAB2 with mqtt2 (home assistant part).
To get working setup, you will need at least openHAB2.4 stable.
There is a builtin mqtt broker which can be installed from Paper UI (addons -> misc) but you can also use mosquitto or even another broker.
To get openHAB connected to your broker you will have to setup the mqtt2 addon (Paper UI -> bindings), create a bridge (Paper UI Inbox -> + -> add mqtt -> bridge …) with a connection to your mqtt broker.
And you will need at least one generic mqtt thing (Paper UI Inbox -> + add mqtt -> generic mqtt thing).
Then add channels to that thing (Paper UI -> configuration -> Things -> the generic mqtt thing created in the last step -> add channels with the +)
For each channel setup at least one topic for receive or transmit, this topic is typically in the
stat/nameOfSonoffThing/POWER for receiving the state
cmnd/nameOfSonoffThing/POWER for transmitting a command.
If simple mode is active (Paper UI -> Configuration -> System -> Items(?) ) you will automatically get items to control the channels.
Take a look at Paper UI control, your generic mqtt thing should emerge with all your channels.
If simple mode is switched off, you will have to create the items yourself (Paper UI -> Configuration -> Items) and link the channels to the items (done in the channel of the generic mqtt thing).
I don’t have access to my openHAB system for now, so maybe I made some small mistakes, but in general this should suffice.
Thank you for your reply! This I understand better.
I have had Mosquitto working thanks to "https://www.smarthomeblog.net/mqtt-openhab/ " and tested. This is where I am stumped.
So your information gets me to: Adding a channel.
So where do I find info to fill out the template?
I am in simple mode and there are no items, or do the channels have to be created first?
I am familiar with the differences using OH data base and using file based control. I use VC to do most of my items, thing,rules and sitemap. Luckily for me VC crates the channels which totally baffle me.
Also when selecting a generic thing, there are other option I have been unable to find explanations of those things.
Can you point me ia direction?
Thank you very much for your help. At this time I have a Sonoff Dual flashed with Tasmota and working, but still ??? on some terminology setup issues. like “topic” & “full topic”.
I am an American married to a Chinese wife, I have the same problems with her. ;-). Note and she has with me…
Items get created when a channel is added.
The Channel ID is the name the channel gets identified by openHAB (e.g. to link the channel to an item)
The Label is the default label set for this channel.
MQTT state topic is the topic to get the state of the channel (from your device, so you need to get that information from your device, in general you may have set at least a part of that topic yourself)
MQTT command topic is the same, but the other direction, so when switching in openHAB, a command is sent to that topic. The Broker gets the command and publishes it to your device. The device is switched.
MQTT is a commonly used protocol for IoT devices, if you owe some Homie or HomeAssistant components, you can use openHAB to control them without all the manual configuration, as these two systems are already builtin. MQTT then will autodiscover the devices and add them automatically if you approve the things in your Inbox. MQTT broker is the bridge to the broker. openHAB can send information about itself to MQTT, this is the System MQTT Broker part (afaik, did not test this yet).