Setting up OH + tasomta sonoff bridge + RF button + Google Home

A very good afternoon to you all,

I am extremely new to openHAB and all of the home automation projects. But I have have done my damnedest to understand and figure out what to do or how to do it, but alas I am now falling short of ideas and where to turn to.
I have flashed sonoff bridge with tasmota
I have install OH2 on my small permanent running server
I have installed addons and bindings MQTT broker, MQTT bindings, OpenHAB Cloud.
I have input the MQTT settings into the rfbridge and console readout is connecting :smiley:
I have connected the O.HAB app in google home services so the home speakers are now connected to the cloud OH service.
I have registered and connected my OHAB server to the cloud service.
I have then gone to inbox and seen the bindings MQTT Broker and added it as a thing.
I have then also seen the chromecast bindings and added “whole house” as a thing (all my connected speakers)
I have gone to the rfbridge console and got the rf clicker (button) to give me a read out: MQT: tele/rfbridge/RESULT = {“RfReceived”:{“Sync”:11170,“Low”:360,“High”:1090,“Data”:“4BDAB2”,“RfKey”:“None”}}

I read that I may need to add the bridge as a thing or binding or something?

But this is as far as i have got.
I have been given advice of:
"

You need the Chromecast binding and add an Item called DoorBell. With RF you might need to fiddle about with this a bit as I’m not sure how the RF bridge gives the output (I just have a normal door bell on a nodemcu board).

I have a file called sensors.items but you may be able to do it with paperui – I’m also using the ‘old’ MQTT binding so the syntax is different.

Contact DoorBell “Door Bell” (GroundFloor) {mqtt="<[mosquitto:RFBridge/DoorBell:state:default]"}

I then have doorbell.rules with (again may be able to do it in paperui). This raises the volume to 50% plays the doorbell.mp3 waits and turns the volume back down.

rule “Door Bell”

when

       Item DoorBell changed from OFF to ON

then

       chromecast_chromecast_xxx_volume.sendCommand(50)

       playSound("chromecast:chromecast:xxx","doorbell.mp3")

       Thread::sleep(3000)

       chromecast_chromecast_xxx_volume.sendCommand(25)

end"

If this makes any sense? but I don’t know how to implement this into the paperUI?

Thank you for any help/tutorial regarding this.

Welcome to the openHAB forum.

That is correct!
You have a MQTT Broker thing already, this one will act as a bridge between the mqtt broker and the connected mqtt things. Your RF-Bridge needs to be created as a generic mqtt thing with a channel that takes the message of the RF-Bridge. I think (not know!) that the RFKey value should go into that channel.
Once you have that and have linked an item to that channel, you could trigger the rule according the state of that channel. But that is a second step.
After that the sound playing should be worked on.

This kind of rule will not show on PaperUI, only those that are created on PaperUI ( with the experimental rules editor) will show there.

Howdo,
Many thanks for the info there. it helped alot. So far then I now have this:

openhab->paperui->configuration->things:

here i have:

MQTT Broker
RFBridge thing
Whole House (This is the chromecast binding that picked up my home hub “whole house” group, so i added it as a thing? if this was right? as i plan on sending a “Caller at front door” broadcast)

So, then in the “RFBridge thing” there’s Channels, here i have inputted a single channel with these details:

MQTT state topic: rfbridge/STATE (got this from the rfbridge console webUI)
MQTT command topic: rfbridge (Guessed this was the details?)
Incoming value transformation:
Outgoing value format:
On/Open value:
Off/Closed value:
Retained: radio button is OFF
Is Command: radio button is OFF

What i gather from your reply is, somewhere in here i place the RF clicker data signal code? In the console it gives a code:
“RfReceived”: “Sync”:11180,“Low”:350,“High”:1090,“Data”:“4BDAB2”,“RfKey”:“None”

therefore I imagine that the code: 4BDAB2 is to be placed into the “On/Open Value” box?

If this is all correct so far. I think i will be ready for the next step to send a message broadcast “Caller at front door” if that is possible for help with this please? :smiley:
Getting really excited about this project working. Its a massive learning curve and im thrilled and enjoying it.

Thank you.

I’m sorry, but I have no experience with the RF-Bridge.

Ahh OK, who or which thread could i turn too for more advanced help on the RFBridges?

I quick search revealed This.

Your first interest is here. If you done the things and items and all is shown in log viewer come back and we start with the rules.

Oh right, brilliant. Im currently going through that page right now :slight_smile: Many thanks.

One question though. even though the Paper UI has 3 listed “things” the MQTT Broker, Generic MQTT Broker (RF Bridge) and the Whole House (chrome cast).

Is this a bad idea to be using the UI? and should opt for the coded files approach instead? As even though i can see the things listed in the UI, there are no .things file in the conf/things folder.

There are two ways to setup openHAB things, either by .things files OR via PaperUI. Both setups are not exchangeable. Things created via PaperUI are not saved in the .things files.
So using PaperUI is a good idea!

The things you have don’t make sense, why having two broker things?

This is where i am confused, I watched a tutorial from MKsmarthouse on setting up an openhab server and connecting the first thing to it, which in his case was a smart blinds controller.
He adds an addon broker in the Paper UI, then adds the broker as a thing.
Then he adds the blinds controller as a generice MQTT thing too.

This is the trouble im having by following (or trying to follow) steps that don’t have the exact items im using etc. and forums that don’t always know what i am intending to do. I really am trying my best lol so please forgive my lack of understanding. I am baffled by it, yet trying to accomplish a result to feel proud of.

The very basic project im trying to accomplish, is… A simple RF one button clicker, put it into a sealed waterproof doorbell housing, put that on my door and with some sort of server (running anything at this point), to get the results of casting an automated google voice “Caller at front door” to all connected speakers.

I have 5 google speakers, (one hub and 4 mini’s). an RF 433 clicker button keyfob, and sonoff RF bridge with tasmota on.

Is there a simpler way to achieve this method then?

I think I know what you want to do. When you are ready we can make it together step for step to the finish . My Projects with Openhab and Google Home include an announcement when it rains, the doorbell rings and which windows are open when I leave home.
But I have no experience about the PaperUI so if you want we can do this about things, items and rules files.
I’ll do my best to help you to write the files with examples and declaration.

You can either follow the steps on any video tutorial and then have to adjust this setup to your needs
OR
tell the people in here who willing to help you what your exactly trying (which you did) to do and where it doesn’t work. Posting a video tutorial does not show what you have done so far.

You asked why I had two broker things? I answered by saying I followed the video. That’s why I’m having trouble. I post what I have done so far at the very top and throughout. Then get told to go to the links you all provide but they are for making code documents, but apparently the way I have done it is through paper UI which doesn’t make coded files. So I don’t know what to do… That’s why I say I’m confused.

Really kind of you :smiley: I am more than happy to go about this step by step. It was what i was hoping for from the start. Tutorials are great to watch but when you watch them and they write code and it leaves me thinking, how/why/where did they know or get this code to write in the first place. even reading the openhab pages doesn’t explain how to make a voice announcment. nor does it actually say how the bridge is to connect to an mqtt sever, as im being told why i have two broker things. but that video tutorial showed just that! All i was hoping is for someone to point me in the right direction by saying this is how it should be done. code is over my head but everything would be if i have never seen it before. I assumed this 2.4 openhab was all UI now. had no idea it’s still playing with visual studio document writing still.

Wich OS you use on your pc (not Server)?

Windows 10 64. I have Arduino installed and drivers setup for the IFT usb-serial board. Also MQTT fx setup. I do also have the FLASHESP folder to flash, both I have tried and work perfectly for flashing the sonoff’s.

Server is win 7 64. It has a fresh copy of openHAB2 running 2.4 of all add-ons, broker, Chromecast, network client etc.

In the end, ditch openhab and head here…

I got more help from the home assistant community and solved the issue :smiley: