Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help Topic is solved

Moderator: leecollings

Post Reply
spider2
Posts: 13
Joined: Wednesday 21 November 2018 19:57
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by spider2 »

Hi,

I have a Sonoff RF Bridge with latest tasmota firmware, and have 1 door and 1 motion sensor. I want to add this 2 sensor to Domoticz, but can't figure it out. I see this on console: 15:54:15 MQT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":11940,"Low":340,"High":1110,"Data":"B856A9","RfKey":"None"}} when I open the door
and see this when the motion sensor is see somebody:
15:55:12 MQT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":10990,"Low":400,"High":1230,"Data":"4673AA","RfKey":"None"}}
So here I'm stuck.
How can I add this two sensors to Domoticz? I want notification to my mobilephone (pushbullet I use) when motion is detected or the door is opening.
Have Sonoff basic what I added to domoticz and use it without problem (light switch on off). But the rf bridge and sensor dark horse for me.
Please help me!
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by MikeF »

Have a look here:
viewtopic.php?t=24421
- this might help.
spider2
Posts: 13
Joined: Wednesday 21 November 2018 19:57
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by spider2 »

Saw that topic before, but don't understand it. Need a step by step instructions on one example. With the same hardware : sonoff rf bridge with tasmota firmware and motion or one way door sensor to add Domoticz.
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by MikeF »

Sorry - don't have a Synology NAS or door or movement sensor, so can't give you step-by-step instructions with the same hardware. Part of the role of this forum is to give pointers, so that you can develop your own solutions by experimenting - as I did. What I used - which my link above was based on - is a 2-button remote with a Tasmota-flashed Sonoff RF Bridge, MQTT, Node-RED and Domoticz on a Raspberry Pi.

So some pointers I can give you:
- install an MQTT broker (I used mosquitto on my RPi - try Google)
- install Node-RED (Google again)
- learn your door and movement sensor on the RF Bridge using RfKey commands in the console, and note the RfKey numbers used (look at the Tasmota wiki under 'Supported commands > Sonoff RF Bridge 433' for RfKey commands)
- in Domoticz under the Hardware tab, set up 'MQTT Client Gateway with LAN interface' with the IP address of your MQTT broker
- also in Domoticz, create dummy devices for your door and movement sensor, and note the idx's from the Devices tab
- set up a Node-RED flow similar to those in my link, and edit the PrepDomoticzCmd* commands to change the idx's to those in the previous step, and Deploy the flow

Then you should be good to go!
spider2
Posts: 13
Joined: Wednesday 21 November 2018 19:57
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by spider2 »

I have installed domoticz on my nas and installed mosquitto too (tested it and working). Installed on my pc Node-Red and is working too. On my domoticz added some sonoff basic and can switch on and off lights with my phone, so that is ok too. (Created "MQTT Client Gateway with LAN interface" and created dummy devices.) That is ok.
Logically I know what I need, but can't use the node red. So I don't want to use rf buttons because this is a signal so no need buttons for it. The RF bridge receive this
"10:23:04 MQT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":11960,"Low":350,"High":1130,"Data":"B856A9","RfKey":"None"}}"
from door sensor with one code.
Add in domoticz another virtual sensor and chose switch type "door contact": "idx8 Virtual 00014058 1 door sensor Light/Switch Switch Closed"
So for this how can I setup RF bridge tasmota Domoticz config and how will receive that signal my virtual door sensor?
I know that MQTT and Node Red but exactly how? In Node what i done is tele/sonoff_rf/RESULT ---- msg.playload and debug the same message what I see on RF bridge tasmota console too. So here I stuck. :(
Thank You for your help.
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Sonoff RF Bridge with tasmota add motion and door sensor to Domoicz help

Post by MikeF »

A possible alternative solution (which I came across yesterday - see viewtopic.php?f=11&t=25748&p=199071#p199071) and which avoids the need for Node-RED:
- in your RF Bridge Configuration, go to Configure Domoticz, and enter the Domoticz idx of your door sensor in Sensor idx 6 Count/PM1
- go to the RF Bridge Console, operate your door sensor (open the door) and you should see something like this:

Code: Select all

domoticz/in = {"idx":308,"nvalue":0,"svalue":"5325076","Battery":57,"RSSI":10}
- note the svalue
- create a dzVents script like that produced by waaren, substituting the devices number (2nd line) with your idx, and the item.rawData[1] value with your svalue
- save the dzVents script, and then (hopefully!) the status will be updated in Domoticz when the door is opened and closed.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest