433mhz door sensor

I have wireless door sensor of 433mhz signal, I have followed steps from this link very down below👇
To get it working and its working now when I’m in terminal and I excute the scripts for send. py and recieve.py
I want to have this connected to my Raspberry Pi3 which is running OH2. How to get status of door open / door close into the UI of OH2 ? That’s what I want to do. …
*NOTE : I have 433mhz reciever and transimter sensors connected to my Pi3

One way is to have the script publish the state using the OH REST API.

Another way is to have it send the states using MQTT.

You can see an example of both in

I have read everything in the link you left for me and Thank You but I don’t think I understand all this . I’m still trying to learn and I would love if I can get easier steps to follow

However you look at this it is going to require you to write and understand some Python code. I could just code it for you but it is maddeningly difficult to try to write code to interface with hardware you don’t even have and then you wouldn’t learn anything, not to mention I don’t have time to do my own stuff let alone writing stuff for others. I’ve been down that path before. It was not fun and it did not work out.

In short, there really are no easier steps to follow. You either need to get yourself up to the point where these steps are sufficient or I’d have to do it all for you. In cases like this there is no middle ground.

I suggest you go through one of the many online Python courses until you are able to read and understand both the code you have already written and example code like I’ve posted. At that point, and probably before, you will not need the help, or you will have specific problems that we can help with much more easily.

Another approach is to look for additional examples of python code that does some of the above. For example search google for “python interact rest api” and the very first result is a pretty good tutorial. Use that tutorial and the OH REST API Documentation to figure out how to command an update OH Items from your Python Code.

Or search for “python mqtt tutorial” and the second link is a good tutorial for how to send and receive messages over MQTT in Python. Look at the MQTT 101 tutorial on this forum to get a good guide for how to configure OH to use MQTT.

Search “python daemon” and the first link is to a thread on StackOverflow with lots of ways to configure your script to run as a service on Linux. Searcy for “python windows service” to find the equivalent for running it as a Windows service.

Thank you and yes I will look deeper into it and make sure I learn more and when the slotion is found I will update back .

:beers:cheers

so after reading and going through a lot of sites I was not really able to get it happening but I think I’m close to to where I wanted to be but please I need some more help . MQTT its going to be my last option but I have to read and understand how it works but for now I would like if someone can point me to the right path for setting up my 433MHZ door sensor. I have installed 433UTILS into my Pi since I find it easier to deal with than my last setup… I have followed this tutorial https://community.openhab.org/t/1-openhab-433mhz-radio-transmitter-tutorial-exec-binding-explained-in-detail/34977l with little changes I made so please tell me where I went wrong and here is what my items and rules and things look like :
RULES : rule "DOORSENSOR"
when
Item DOORSENSOR chaned to OPEN
then
postUpdate (433Utils/RPi_utils.state == OPEN){
}

    if(receivedCommand == 14756833){
       postUpdate DOORSENSOR.statusCommand =("OPEN")
    }else{
    if DOORSENSOR.stateCommand =("CLOSE")
    postUpdate (433Utils/RPi_utils.state == CLOSE)
    }

end

ITEMS : Switch DOORSENSOR { channel=“exec:command:./RFSniffer:run” }
String DOORSENSOR { channel=“exec:command:./RFSinffer:input” }

THINGS :Thing exec:command:./RFSniffer [
command="/home/pi/433Utils/RPi_utils/./RFSniffer 14756833",
interval=2,
autorun=true]