433mhz module

Hi, i been using my 433mhz receiver for awhile now, i use it to detect my door sensor which is connected to my Openhab2 on my Raspberry pi 3 runing Stretch, recently i had some problems with my system and i decided to make fresh install, after installing Buster on my Pi and going through the steps i succeeded installing and using last time from these links: RFSniffer, 433MHz receiver RPI and MQTT

I know its a bit of an old link and things changed a bit, i installed mosquitto with Buster repo and installed wiringPi from Github as it’s no longer available by Gordan at the original site, i installed 433utils github, followed everything and when i test my ./RFSniffer it works perfectly but when i use ./RFmqtt i get nothing!

I tried different pins, different Pi, different method of installation, i also tried Strech Version of Pi and still nothing…

I had ./RFmqtt work before even without connecting to OH2

I spent my last 15 days of quarantine plus other non quarantined days trying to solve this but no luck, what to do?!?

I would appreciate any advice or help and i will be thankful always

Have you used openhabian-config tool, selected option 10 Apply Improvements, then Add needed Packages, svr mounts, and fix permissions? If not give that a try and by some chance you do not have openhabian-config tool you can add it with these commands from the doc’s.

# install git
sudo apt-get update
sudo apt-get install git

# download and link
sudo git clone https://github.com/openhab/openhabian.git /opt/openhabian
sudo ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config

# execute
sudo openhabian-config

Link for reference:

You have more than one broker installed and trying to use the same 1883 port?

1 Like

fresh install and I made sure its only one mosquito

netstal -lptn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 512/sshd
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 429/mosquitto
tcp6 0 0 :::5007 :::* LISTEN 427/java
tcp6 0 0 :::8080 :::* LISTEN 427/java
tcp6 0 0 :::22 :::* LISTEN 512/sshd
tcp6 0 0 :::8443 :::* LISTEN 427/java
tcp6 0 0 :::1883 :::* LISTEN 429/mosquitto
tcp6 0 0 127.0.0.1:33663 :::* LISTEN 427/java
tcp6 0 0 127.0.0.1:8101 :::* LISTEN 427/java

Hello @ramy_rutu,

Did you get it running?
when you run the RFmqtt in the console do you get any error or message?
(Make sure it is not allready running as a process.)
You might uncomment the part which states.

/* Include for debugging */

And build it to get more info when something is received.

Hello @Josar

I have my ./RFmqtt working and no error or any type of message showing, except I don’t receive anything from my door sensor only for ./RFSniffer I do receive a signal.

I just uncommented the line /* Include for debugging */ nothing changed yet

last night I did fresh install again and this time I didn’t install wiringpi as I mentioned its no longer available on the main site but it appeared to me that its already installed and no need to do anything

this is the only thing I get when running ./RFmqtt

pi@raspberrypi:~/433Utils/RPi_utils $ ./RFmqtt
Running with -h localhost -p 1883 -u admin -x password -t 433MHz -g 17 -w 0

yes I changed my gpio to see if others work but still no luck!

Can you test

  1. Add a print before the sleep.
  2. use usleep(500U) instead if nanosleep
  3. Make the sleep longer for nanosleep

I am not sure exactly if i did this right?

      {
         //print usleep(550U); # i added print here and changed 500U to 550U
         nanosleep( &req, (struct timespec *)NULL);

Nope

usleep(550U);

// remove nanosleep by commenting out.
// nanosleep( &req, (struct timespec *)NULL);

nothing changed, i tried running it from root and same !

        usleep(500U);
      }
    }

i feel like im missing a library for mosquito but not sure

by the way Thank You @Josar for replaying and helping anyway :+1:

Did you follow the readme?

Yes, all the steps one by one

The mosquitto dependencies are listed in the readme.

if you talking about his one as i have already installed it

sudo apt-get install libmosquitto-dev

so that’s what i did as fresh install:
1-installed Full Buster from here https://www.raspberrypi.org/downloads/raspbian/
2- sudo apt update && sudo apt upgrade -y
3-followed your steps on your page here: https://community.openhab.org/t/rfsniffer-433mhz-receiver-rpi-and-mqtt/39515
4- from #3 above i did install mosquitto+clintes and the libmosquitto-dev
5- installed 433Utils and changed the Makefile and add RFmqtt.cpp than changed the gpio to 27 for rfmqtt and for rfsinnfer its already set to 2 so than i hit sudo make

NOTE I have not installed wiringpi as i mentioned before it comes pre installed and i also tried it on with manual installation before!

6- i have replaced and adjusted

/* Include for debugging */  &
usleep(550U);
// remove nanosleep by commenting out.
// nanosleep( &req, (struct timespec *)NULL);

no success yet !!!

This does not sound as if you use the same pin for RF sniffer and RFmqtt.

Also make sure to use the correct pin numbering.

Pins are set right i believe, i followed the wiringpi diagram, so my RFSniffer is set to wiringpi pin 2 = gpio 27
My RFmqtt set to gpio 27 = pin2 in wiringpi

I need to mention somthing hopefully its not too late
My RPI3 uses wifi usb dungle so i am wondering if this might effect it ? I have had it working before with the same setup using same pi and usb wifi