Wanting to integrate my burglar alarm into openHAB, I decided to use openMQTTGateway to convert the sensor’s 433Mhz RF signals into MQTT messages.
I immediately encountered a problem.
It looks as if my NodeMCU does not read the RF receiver.
Only once I think I have read something, but after all the tests, the wiring and the changes made frankly I’m not so sure.
I tried the same receiver on an arduino nano with the test sketch of the RCSwitch library and it works very well.
I tried the same receiver on the same nodemcu with a sketch of Martin-Laclaustra, ProtocolAnalyzeDemo, and I see all the signals sent by my sensors.
I tried to use the openMQTTGateway implementation with Markus Haak’s Homie
but I find the same problem.
Frankly, I do not know what to do anymore.
Can you help me?!
Could you post pictures of your setup please?
sure here it is.
The power I take from the Vu pin of the NodeMCU, the RF reading I do from pin D2:
At the moment I uploaded the sketch with the HOMIE version.
Are you sure you have power with VU, I used to use Vin from the nodemcu, the best way is to check with a multimeter.
Precise 5v … The Vu pin is the power supply of the USB port.
Did you try with the receiver connected to D2 (set 4 in config_rf.h) ?
I’m trying to recompile and load your sketc but it fails in compiling:
/home/max/Scrivania/OpenMQTTGateway-development/OpenMQTTGateway/OpenMQTTGateway.ino: In function ‘void setup ()’:
OpenMQTTGateway: 378: 13: error: ‘setupRF’ was not declared in this scope
/home/max/Scrivania/OpenMQTTGateway-development/OpenMQTTGateway/OpenMQTTGateway.ino: In function ‘void loop ()’:
OpenMQTTGateway: 677: 16: error: ‘RFtoMQTT’ was not declared in this scope
/home/max/Scrivania/OpenMQTTGateway-development/OpenMQTTGateway/OpenMQTTGateway.ino: In function ‘void receivingMQTT (char *, char *)’:
OpenMQTTGateway: 895: 34: error: ‘MQTTtoRF’ was not declared in this scope
MQTTtoRF (topicOri, jsondata);
OpenMQTTGateway: 925: 40: error: ‘MQTTtoRF’ was not declared in this scope
MQTTtoRF (topicOri, datacallback);
strange I worked there until yesterday, maybe I have updated some libraries …
It should compile, maybe try to redownload the code and your libraries
done several times, now I have downloaded the latest version, but it does not go…
… it’s an evil eye!
resolved, it was the version of irremoteesp8266, reported in 2.4.3
the easiest way is to take the folder included in lib folder of OMG and copy them to your libraries folder set into arduino ide preferences.
hello, I solved the problem of reception, in practice the nodeMcu wants pin 13 (D7) to receive the RF. Done that works everything beautifully.
Thanks a lot, bye!