Connect Sonoff PIR to OpenHAB2 with MQTT

Tags: #<Tag:0x00007fc20b8bbe68> #<Tag:0x00007fc20b8bb9e0> #<Tag:0x00007fc20b8baf18>
  • Platform information:
    • Hardware: _Core i3/12/500GB SSD
    • OS: Windows 10 latest build
    • Java Runtime Environment:Java™ SE Runtime Environment (build 1.8.0_171-b11)
    • openHAB version:2.4
  • Issue of the topic: hello, I’m actually new to openhab, I really need the specific steps and configuration to connect sonoff PIR motion sensor to openhab2 with MQTT. I started openHAB2 service and chose PaperUI.
    I can’t find any related project.
    Thank you .

Start from the beginning
How in the data from the PIR going to arrive at openHAB

The Sonoff PIR send data on the 433MHz band
Do you have a receiver?

The PIR is connected to arduino, and the arduino uno is connected to openHAB2 server (windows) via ethernet shield on the arduino

Using what protocol?
MQTT?
If yes what topic and payload are used?

we are trying to connect PIR with arduino to openHAB using MQTT protocol.the openHAB should trigger a switch through the result getting from the PIR motion.

OK
Is the Arduino publishing mqtt message?
If yes what topic and payload are used?