Sonoff RF Bridge weird behavior

Hi,
All of my wall switches are using 433mhz and I’ve been using OMG for a year with custom pcb + wemos mini and RF module and everything works great.

I recently purchased Sonoff RF Bridge to replace my old Gateway since it’s more compact in size. I managed to flash the Bridge using OMG v 0.9.2Beta and able to control the switches from HomeAssistant just like my old Gateway.

I then realized that something’s wrong when I want to control the switches in group / batch.

In HA, I setup group of lights that would be switched off 15 minutes before sunrise. Using the old GW all lights in that group can be switched off normally but using Sonoff RF Bridge I got random results.

I triggered the condition to switch off the lamps while listening the mqtt messages and could see all mqtt messages are correctly sent by HA.

To investigate the issue, I created another group consists of 2 lights and whenever switched off I can see following MQTT messages :

Client mosqsub/18816-hassbian received PUBLISH (d0, q0, r0, m0, ‘home/OMG/OMG2ndFl/commands/MQTTtoSRFB’, … (7 bytes))
1202030
Client mosqsub/18816-hassbian received PUBLISH (d0, q0, r0, m0, ‘home/OMG/OMG2ndFl/commands/MQTTtoSRFB’, … (7 bytes))
1202040

Only 1 light will be switched off and random. Using the old GW I don’t get this behavior, all MQTT messages are triggered and all lamps are switched off.

But if I switched off each light individually from HA or using mqtt pub all work normally.

This is the setup in my HA using old GW :

  • platform: mqtt
    name: ‘2nd Fl Livingroom 1’
    command_topic: ‘home/OpenMQTTGW2ndFl/commands/MQTTto433/433_1/PLSL_390/RFBITS_24’
    payload_on: ‘1202031’
    payload_off: ‘1202030’
    optimistic: true
  • platform: mqtt
    name: ‘2nd Fl Livingroom 2’
    command_topic: ‘home/OpenMQTTGW2ndFl/commands/MQTTto433/433_1/PLSL_390/RFBITS_24’
    payload_on: ‘1202041’
    payload_off: ‘1202040’
    optimistic: true

and this is the setup when using Sonoff RF Bridge :

  • platform: mqtt
    name: ‘2nd Fl Livingroom 1’
    command_topic: ‘home/OMG/OMG2ndFl/commands/MQTTtoSRFB’
    payload_on: ‘1202031’
    payload_off: ‘1202030’
    optimistic: true
  • platform: mqtt
    name: ‘2nd Fl Livingroom 2’
    command_topic: ‘home/OMG/OMG2ndFl/commands/MQTTtoSRFB’
    payload_on: ‘1202041’
    payload_off: ‘1202040’
    optimistic: true

Is this something to do with Pulse Length & RF Bits ?

I triggered the command using old GW and listen the mqtt message using Sonoff and this is the message :

Client mosqsub/24156-hassbian received PUBLISH (d0, q0, r0, m0, ‘home/OMG/OMG2ndFl/SRFBtoMQTT’, … (89 bytes))
{“raw”:“2F44049201AE12576F”,“delay”:1210,“val_Tlow”:1170,“val_Thigh”:430,“value”:1202031}

Client mosqsub/24156-hassbian received PUBLISH (d0, q0, r0, m0, ‘home/OMG/OMG2ndFl/SRFBtoMQTT’, … (89 bytes))
{“raw”:“2F44019A049C12576E”,“delay”:1210,“val_Tlow”:410,“val_Thigh”:1180,“value”:1202030}

Not sure why the Tlow and Thigh for on and off messages are in opposite range.

Any idea how can I solve this issue? Thank you.