433mhz, infrared IR to and from MQTT on ESP8266

Hi,

On NodeMCU v3 I had to comment #define ZgatewayRF2 in user config for the RF to work.

I’ve checked with D3 and also D2. Both work as long as RF2 is commented.

you mean time between readings ADC?

The correction is published into the master

1 Like

Yes I confirm that you can’t receive at the same time with ZgatewayRF and ZgatewayRF2, now if ZgatewayRF is active the receiption for RF2 will be deactivated

same issue here and same solution : use D2.

Thanks for sharing :slight_smile:

No problem but it is still remaining an issue. Only thing I can find is that D3 is used for flashing (See Nodemcu pinout). Hope it will be fixed in the future :slight_smile: Still thanking the creator for this great gateway :smiley:

I still dont know why the gateway disconnects randomly for a long time. Until I press the reset button it goes online again. Any tips for me to solve this issue?

Screenshot:

Hello,

You get the gateway disconnect with only ZgatewayRF ?

Hello,

I’m pleased to announce V0.5 of OpenMQTTGateway with:

1 Like

Hoping to get some help with this; I have the following hardware components:

And some mini-breadboards.

Using v0.5 of OpenMQTTGateway, I have disabled everything but the ZgatewayRF in User_config.h updated all my wifi and MQTT settings, and uploaded the sketch to the NodeMCU. The NodeMCU shows connected fine to wifi and responds to MQTT:

home/OpenMQTTGateway/LWT Online
Client mosqsub/13177-hassbian received PUBLISH (d0, q0, r0, m0, 'home/OpenMQTTGateway/version', ... (3 bytes))
home/OpenMQTTGateway/version 0.5
Client mosqsub/13177-hassbian sending PINGREQ
Client mosqsub/13177-hassbian received PINGRESP

As far as hardware setup:

  • NodeMCU is powered by micro-USB
  • Vin and GND from the NodeMCU are connected to the RF Receiver (+5V and GND respectively)
  • Multimeter shows 4.6V on this rail
  • DATA from the RF receiver is connected to D3 on the NodeMCU (I’ve also tried D2)

But for some reason, I am getting no response at all either in the Serial monitor (Arduino IDE) or in MQTT when poking 433 MHz RF buttons near the receiver (I have tried several different ones). Is my circuitry wrong? Is the receiver not getting enough power (does it need a full 5V? It also has 2 5V connections, do they both need to be powered?) Or is maybe my OpenMQTTGateway setup wrong? Any help or suggestions would be appreciated! Thanks!

Hello @yenemy,

First it can be a compatibility issue in term of protocols, what is your remote brand/model?
If you want to check with a supported protocol you could load a send example from the rcswitch library to an arduino or other nodemcu and see if you see something on the serial monitor/mosquitto when the emitter is on.

If it is not working I will try to connect the receiver to a =5V power source with the ground in common with the MCU ground
Indeed currently you are very close to the minimum voltage of this receiver (4.5V).

Finaly I will load to the first nodemcu (receiver) a basic example of receiving from rcswitch and see if something is visible in the serial monitor.

Regards

Hi @1technophile,

Thanks so much for the detailed response! I will try those out at the next opportunity :smiley:

Hei! little help needed ;( @1technophile -can you help ?

I build RF and IR Sender Receiver
NodeMcu ESP8266
IR Transmitter KY-005 - D0 pin
IR Receiver KY-022 - D4 pin
RF Transmitter - MX-05V RX pin
RF Receiver - MX-05V D3 pin
all modules povered from Node VIN connector - measured 4,65 V

I gan receive the IR and RF signals shown in Arduino Serial Monitor and on mosquitto server
examples
home/433toMQTT/protocol 1
home/433toMQTT/bits 24
home/433toMQTT/length 397
home/433toMQTT 7114409
home/IRtoMQTT/protocol 3
home/IRtoMQTT/bits 32
home/IRtoMQTT 16712445

but when I send from terminal mosquitto_pub -h 192.168.200.205 -p 1883 -u user -P pass -t home/MQTTtoIR/ -m 16712445
or
mosquitto_pub -h 192.168.200.205 -p 1883 -u user -P pass -t home/MQTTto433/ -m 7114409

I can see in mosquito terminal windows the commands is coming
home/MQTTto433/ 7114409
home/MQTTtoIR/ 16712445

Should the receivers must get the same signal and shows on terminal that the signal is coming ?

but in arduino serial monitor don’t shows nothing and the IR devices don’t responding for thous commands ?
What I do wrong ? - or how can I test that my IR and/or RF senders are working ?

Hello,

You are missing the “commands” keyword

mosquitto_pub -t home/commands/MQTTto433 -m 1315156

seems that somethings more ;( I send
mosquitto_pub -h 192.168.200.205 -p 1883 -u user -P pass -t home/commands/MQTTtoIR -m 16712445
Like the command don’t sends via D0 - in Config_IR.h PIN Definition is like the by default
… IR_EMITTER_PIN 16
I Tried the PIN D9 as well, the in module lights even one led - ( it burned steadily)
any ideas ?

If i understand well, you replaced the ir led by a normal led on D9 and it burnt ?

Sorry I expressed myselft incorrect - In My IR Transmitter module is little extra LED I think for that when it sending some data, like my IR receiver module have little extra led - which flashing when IR module get’s some data.
I looked from config_IR.h By default is PIN 16 ( which is D0 ) but there is else as well and I tried maybe D9 is working, but like I said there extra LED on module is lighting constantly - which could be deduced, that module itself is working ( gets the power for working etc. … but I can’t send the signal out

Could you try to replace the ir led by a normal one, and see if it blink ?
Following the result you will see if it comes from your hardware setup or not.

I’m afraid that’s don’t blink - like I said in IR module is extra LED If there any command come’s then It’s must plink as well - I mesured it with voltmeter -but nothing

try maybe to use the ESP8266 pin connected to your IR receiver instead and change the config_IR accordingly

I cahnged in config-IR.h Receiver to 16 and Emitter to 2 ( by default Rec = 2 and Transmit 16 ( wires as well)
but nothing in that way the IR don’t received the data but don’t sending as well
changed back the receiver works again transmitter NOT