RF2 gateway problems

Im having trouble with the RF2 gateway for my KAKU devices.

First I tested my schematic with the examples of the NewRemoteReceiver library. That works, i’m getting the expected list of info like unit, groupbit, period etc.

So after uploading the code with uncommenting the RF2 gateway, its connecting good (via serial monitor) but i’m not receiving any signal from my devices.

But when i’m uploading the code with only the RF gateway uncommented i’m getting these messages
“home/OpenMQTTGateway/433toMQTT {“value”:470412416,“protocol”:22,“length”:32,“delay”:1071}”

in both situations im getting data on the datapin of the receiver. I connected a led in parallel, it flashes when pressing my remote control.

Any idea what i’m doing wrong?

I’ve tested the 433Mhz reception in 2 different devices, Sonoff RF Bridge and Wemos ESP8266 board.

Both of them display the received code the same way you showed in the example:
{“value”:470412416,“protocol”:22,“length”:32,“delay”:1071}"

For example, if the above is a motion sensor, the code you would use to integrate on automation systems (OpenHab, Hassio, etc), would be the 470412416.

That correct, but when using the RF2 code it should receive code like this:
home/OpenMQTTGateway/RF2toMQTT {"unit":0,"groupBit":0,"period":273,"address":8233228,"switchType":0}

That way I can also use this to control my KaKu devices. Now I can only receive the pressed button from the remote to start another action.

When uncommenting the RF2 gateway code i’m not receiving anything when pressing the remotebuttons.

still no solution found here, tried version 0.9.2

when RF and RF2 uncommented I receive commands from my KAKU remotes when subscribing to my MQTT broker.

Then after following https://github.com/1technophile/OpenMQTTGateway/wiki/User-guide-RF2-09
so commenting RF and reupload the code I get nothing when pressing my KAKU remote.

Is my kaku not compatible, i’m using the AYCT-102. Still the newest version of this kind remote.

No one else with the same problems?

I’m using an NodeMCU, and like mentioned before. With just the testcode from library NewRemoteReceiver its properly working.

with RF and RF2 uncommented I get this in my serial monitor

Pub json into:
home/OpenMQTTGateway/433toMQTT
{“value”:470412444,“protocol”:22,“length”:32,“delay”:1061}

instead I’m trying to get something like this so I could also transmit these messages to control my devices instead of only receiving:
home/OpenMQTTGateway/RF2toMQTT
{“unit”:0,“groupBit”:0,“period”:273,“address”:8233228,“switchType”:0}

And when using the newremoteswitch example are you able to control your device also or only to listen your remote?

im able to control and to listen, but the examples are not working on a esp8266, but im using it with a arduino mega. but then i’m getting this dataset (example)

only the showreceivedcode example is working on nodemcu, and this one is showing the correct data string with unit, groupbit, switchtype etc.

with RF2 it should receive the same, but im not receiving anything then…

Would it be possible to post a serial monitor extract when using RF2 please ?

im sorry, used my esp8266 for another prototype at the moment.

but i mentioned the outcome of the serial monitor before:

i’m using a newkaku remote, so its working correct with example ShowReceiveCode from NewRemoteLibrary which means I get the expected outcome which is in this format:
{"unit":0,"groupBit":0,"period":273,"address":8233228,"switchType":0}

I try to explain my experience:

with RF and RF2 uncommented:
serial monitor output in the format of:
{“value”:470412416,“protocol”:22,“length”:32,“delay”:1071}"

with RF2 uncommented i dont get any response at all, when it should be a response in the same format as with the ShowReceivedCode example

Same issue here. I’m build RF2 on ESP8266 but I receive on 433toMQTT and not in RF2toMQTT. Example are working, but not OMG.

So back to dev branch. I works only only RF2 is enable. if RF + RF2 it fails.

UPDATE :

RF + RF 2 : Receive RF2 KO,Receive RF OK, Send RF2 OK,

If boith are un commented this is the expected behaviour:

Thanks, I have missed this point.
Where is the limitation in the code ?
RFlink or ESP with (espeasy for example) can handle both at the same time on RX.
Is it possible test if it’s a valid Kaku signal , if not fall back to rc-switch ?

This is due to the use of callbacks in both libraries. It seems that only one can be handled per pin.

I know for RFLink, but I’m curious that ESPEasy can support Kaku and other protocols at the same time. Do you have some resources to point me ?

it was the legacy version : https://github.com/letscontrolit/ESPEasy/tree/legacy I have not check with the new mega version.

Hi
I have the exact same setup
And exact same issue as OP.
I have uncommented RF2 and rebuild. Every message I get from KAKU remote is in this format:

Pub json into:
home/mqttgw/433toMQTT
{"value":87499152,"protocol":22,"length":32,"delay":1081}
Store val
Min ind:
4
store code :
87499152/161483
Col: val/timestamp
0:87499152/88080
1:87499152/88190
2:87499152/115142
3:87499152/115212
4:87499152/161483
5:0/0
6:0/0
7:0/0
8:0/0
9:0/0
10:0/0
11:0/0
Hey I got a callback
Store str
Min ind:
5
store code :
87499152/161586
Col: val/timestamp
0:87499152/88080
1:87499152/88190
2:87499152/115142
3:87499152/115212
4:87499152/161483
5:87499152/161586
6:0/0
7:0/0
8:0/0
9:0/0
10:0/0
11:0/0

This Is my config.

/*-------------DEFINE THE MODULES YOU WANT BELOW----------------*/
//Addons and module management, comment the Z line
//#define ZgatewayRF     "RF"       //ESP8266, Arduino, ESP32
//#define ZgatewayIR     "IR"       //ESP8266, Arduino,         Sonoff RF Bridge
//#define ZgatewayLORA   "LORA"       //ESP8266, Arduino, ESP32
//#define ZgatewayPilight "Pilight" //ESP8266, Arduino, ESP32
//#define ZgatewayBT     "BT"       //ESP8266, ESP32
#define ZgatewayRF2    "RF2"      //ESP8266, Arduino, ESP32
//#define ZgatewaySRFB   "SRFB"     //                          Sonoff RF Bridge
//#define Zgateway2G     "2G"       //ESP8266, Arduino, ESP32
//#define ZgatewayRFM69  "RFM69"    //ESP8266, Arduino, ESP32
//#define ZactuatorONOFF "ONOFF"    //ESP8266, Arduino, ESP32,  Sonoff RF Bridge
//#define ZsensorINA226  "INA226"   //ESP8266, Arduino, ESP32
//#define ZsensorHCSR04  "HCSR04"   //ESP8266, Arduino, ESP32
//#define ZsensorHCSR501 "HCSR501"  //ESP8266, Arduino, ESP32,  Sonoff RF Bridge
//#define ZsensorADC     "ADC"      //ESP8266, Arduino, ESP32
//#define ZsensorBH1750  "BH1750"   //ESP8266, Arduino, ESP32
//#define ZsensorTSL2561 "TSL2561"  //ESP8266, Arduino, ESP32
//#define ZsensorBME280  "BME280"   //ESP8266, Arduino, ESP32
//#define ZsensorDHT     "DHT"      //ESP8266, Arduino, ESP32,  Sonoff RF Bridge
//#define ZsensorGPIOKeyCode "GPIOKeyCode" //ESP8266, Arduino, ESP32
//#define ZsensorGPIOInput "GPIOInput" //ESP8266, Arduino, ESP32
#define ZmqttDiscovery "HADiscovery"//ESP8266, Arduino, ESP32, Sonoff RF Bridge
//#define ZactuatorFASTLED "FASTLED"  //ESP8266, Arduino, ESP32, Sonoff RF Bridge

Then, when I change to RF2 in platformio.ini
default_envs = nodemcuv2-rf2 ← uncommented

No signal is received anymore.

Tried about everything. Changed pins. Also tried PiLight library.
Nothing works.
RF is only received if I use the ZgatewayRF , which I don’t want because it’s not compatible with KAKU.

I’m listening to the signals via SDR, and they are there. I also connected scope and headphones on the output of the receiver ( APRXB12 ) and there’s the signal too. Receiver is connected to 5V. Pins I tried: 0 (default ), 2 and 5. Transmitters are : KlikaanKlikuit APC3-2300R , COCO AYCT-102 and COCO TMT-502 ( the last users another protocol and sounds different by the way, but still no cigar ) (ps: headphone and scope are not connected during tests)

Update:

Flashed ESPilight ( https://github.com/puuu/ESPiLight/releases ) straight on the device.
And see there. Data is received:

RF signal arrived [arctech_contact][1367174] (0) {"id":1367174,"unit":1,"state":"opened"}
RF signal arrived [arctech_switch][1367174] (2) {"id":1367174,"unit":1,"state":"on"}
Valid message: [arctech_switch] {"id":1367174,"unit":1,"state":"on"}
RF signal arrived [arctech_screen][1367174] (2) {"id":1367174,"unit":1,"state":"up"}
Valid message: [arctech_screen] {"id":1367174,"unit":1,"state":"up"}
RF signal arrived [arctech_dimmer][1367174] (2) {"id":1367174,"unit":1,"state":"on"}
Valid message: [arctech_dimmer] {"id":1367174,"unit":1,"state":"on"}
RF signal arrived [arctech_contact][1367174] (2) {"id":1367174,"unit":1,"state":"opened"}
Valid message: [arctech_contact] {"id":1367174,"unit":1,"state":"opened"}
RF signal arrived [logilink_switch][] (0) {"systemcode":885052,"unitcode":1,"state":"off"}
RF signal arrived [kerui_D026][] (0) {"unitcode":247835,"state":"tamped"}
RF signal arrived [ev1527][] (0) {"unitcode":394276,"state":"closed"}
RF signal arrived [ehome][1] (0) {"id":1,"state":"off"}
RF signal arrived [daycom][54] (0) {"id":54,"systemcode":284,"unit":1,"state":"on"}

So it’s definitely not the receiver, nor the NodeMcu V3.

Update Solved

Ok , here is how I solved it. ( but maybe not all steps are needed, cause I’m an idiot and did it all at once… )

  • I deleted all files in .pio/build
  • I deleted all libraries in .pio/libdeps, expect the two folders nodemcuv2-all and nodemcu2-pilight
  • I deleted all folders and files in nodemcu2-pilight/ESPiLight_ID996
  • I downloaded the latest release op ESPilight ( https://github.com/puuu/ESPiLight/releases )
  • I unpacked the zip into ESPiLight_ID996
  • I ran compile again
  • Changed to pin 0 (D3)

Found that pin D3 (gpio 0) is pulled high. It prevents the RF receiver to push the signal in. When using the test ESPilight, that pin is low and works perfectly. So I changed over to pin D2 (GPIO 4), cause that one stays low after flashing openmqttgateway on the esp.

But the code works intermittently. After 3 succesfull receptions, there a pause or something, no other signals come trough. ← update : fixed that by using another (identical) receiver…

But in the end , the JSON string published to MQTT is not recognized by home assistant. ( pulling out my hair )

I guess these Klikaan Klikuit devices (kaku) are destined for the trash.
update: not yet :wink: Installed Node-red on Hass.io (package) and here I can manipulate the Json messages from RF2.