Sonoff 433 Bridge Configuration

  • Platform information:
    • Hardware: Raspberry Pi
    • OS: Raspbian GNU/Linux 10
    • Java Runtime Environment: openjdk version “1.8.0_222”
    • openHAB version: 2
  • Issue of the topic: Looking for a step by step guide to add a Sonoff Bridge to Open HAB, connect modules to the bridge and control them using Mosquitto
  • Please post configurations (if applicable):
    • Items configuration related to the issue - have none
    • Sitemap configuration related to the issue - have none
    • Rules code related to the issue - have none
    • Services configuration related to the issue - have none
  • If logs where generated please post these here using code fences: - NA
    I’m after an idiot’s guide to setting up a Sonoff bridge with whatever devices on OpenHAB 2 - I currently have a PIR and a mag switch.
    I have flashed the bridge with the Tasmota firmware and it’s connecting to Mosquitto but it does not seem to advertise the client hardware and I’m not sure how to go about getting it to.

I can alter settings in the bridge’s webpage - if I set it to bridge the WiFi LED is off and the 433 LED flashes when there is an event with the PIR of mag switch but nothing shows up in the Mosquitto log or Open HAB log.

HI, i have sonoff RF bridge with last Tasmota running and I use it only for 1 way communication at the moment (have PIR sensors and doors/windows contacts).
Sonoff bridge is sending data in topic tele/yourBridgeTopicName/RESULT with following ourput:

{"RfReceived":{"Sync":12550,"Low":430,"High":1240,"Data":"F2402E","RfKey":"None"}}

where F2402E string is sent by your sensor to RFbridge and RFbridge send it to MQTT broker inside tele payload.

to use these data I created Generic MQTT thing named rf_bridge:

And each device is created as 1 chaqnnel of this rf_bridge Thing:


3 channels marked yellow are representing status of rf_bridge
others are sensors sending data to bridge.

example of PIR sensor which is sending only 1 information - when it gets triggered :

and Item setup:

As PIR is sending only info when its triggered, item associated to this channel is set to ON by PIR but Off is set by rules with timer.
my rule is copy of this design pattern Design Pattern: Motion Sensor Timer

I have a light in server room which is triggered by this PIR, and switch off after 5 minutes (set in previous screenshot) item setup :


and simple rule to switch light ON/OFF based on PIR sensor item :
image

Example for thing channel with contact where contact is sending 2 information : open/close:
channel:


Item:

no specific rules to update item status - its done directly by binding as you have both states (open/close) available

Thanks for the explanation. I will give it a try. Another question - the Sonoff-Tasmota firmware web interface lists various settings for GPIO, do you know where I may find an explanation of these?

A good place to start would be the Tasmota wiki: https://github.com/arendst/Sonoff-Tasmota/wiki/Components

Hi Karel

My Raspberry Pi stopped working so I loaded Ubuntu on an Intel platform, loaded OH 2.5 and decided to have another go.
I am able to set up MQTT using the embedded Moquette broker but I’m having no luck obtaining data from the bridge.
I followed your instructions, created the bridge thing and added a text (string) channel, but am unclear how JSONPATH is integrated. Do you have to manually set the rules somewhere?

Okay, I figured it out - I tried various commands at the bridge WebUI until I found one that gave the desired result and massaged the syntax to fit. The JSONPATH was an additional hour of trying things but eventually sorted that out with the help of the openhab2 logs.
So now left with one more question, I have a Sonoff PIR and a mag switch, how do I pair these with the bridge?

Okay, again figured it out. Now have to go the next step and use reset timers also use the sensors to do something meaningful.

Hi @HugeMutha, sorry for late answer, i was quite busy last few weeks, not reading forums at all.
Happy to hear you figured it out.

Hi,

I’ve setup a PIR motion sensor using your instruction and although I get the mqtt value and “Contact” status changes from “-” to “Open”. I’ve noticed that the logs give me the following errors:
[ab.binding.mqtt.generic.ChannelState] - Command ‘3BDE21’ not supported by type ‘OpenCloseValue’:

Settings are:

Any ideas?