RF Bridge send alphanumeric without #

I have Tasmotatized - Sonoff Bridge I want to be able to send out a alphanumeric code which will enable and disable my 433Mhz siren.

The problem I have is the with the payload (i am using string) if I use # the whole alphanumeric code will send but the # will be included and the siren doesnt respond because it just wants the alphanumeric code.

Without the # the RF Bridge node will only send numericals,
eg 7777777 but not aaaaaa,
and or at least up to the point it hits the first alpha character and then it will only send numerical numbers to the left of the alpha character,
777a44 will go as 777,
and if I only use all alpha characters then it will broadcast the last retained numbers,
777.

I have tried using "" eg "777a44" but it ignores the ""

Something somewhere must be calling parseInt (it does that)

So try sending the decimal equivalent of 777a44 (7830084)

If I send 7830084 as a string it will output 7830084 the siren wouldn't do anything though coz this is not the code.

Hi

So if you open a cnd/terminal terminal & start node then enter console.log(parseInt("777a44")) you WILL get 777

So somewhere, parseInt is likely being called.

Where do you witness the 777 value? In node red or at your device?

Also, why does this siren expect hex string? Do you have any control over that? At the end of the day, 777a44 IS 7830084.

Lastly, what happens if you send 0x777a44?

If I put a debug on the inject node I get the correct Hex code, this then connected to the mqtt out node which has no output that I can attach the debug too so the next place I can see is in tasmota console on my sonoff rf bridge which is were the payload has been altered.
Screenshot_20

It a 433mhz device that receives HEX codes normally from a keypad after it is binded.

Must be the way it is programmed it doesn't accept the decimal value as it is not reacting when I fire the decimal code.

It still responds to the physical keypad when it fires the hex code.

Adding 0x to the start of it makes the last retained numerical output fire it doesn't even recognise the 0 at the front even though it is numerical.

ps using mosquito broker

A bit poor to say the least.

Is there a forum or repo for the bridge or device where you can ask about this behaviour?

Last ditch attempt, try sending your value with double or single quotes or a buffer.

E.g. Inject "777a44" or '777a44' or send a buffer (possible from inject node, choose bin/buffer, click the ellipsis button, type the string) it'll convert to bytes.

Have you tried using another client to watch the topic in mosquito?

You could use MQTT explorer or even subscribe it back into node red.

I just saw something on internet that mentioned broker which why I edited my post above at the bottom to mention it.

I now remember that in home assistant I have an automation which also sends this code to alarm and it too fails. So this would pin point it the parsing issue is happening in mosquito. I will follow that route.

Thanks for helping me narrow it down this issue has been annoying me for months.

Note that for the # use, you will need to include the RfHigh, RfLow and RfSync timings.

As per documentation

RfCode Show last sent 24-bit user code
1..8388607 = send 24-bit user code
#1..#7FFFFF = send 24-bit hexadecimal user code using RfSync, RfLow and RfHigh timing

Can you not learn + assign a key in the bridge and send that instead ?

My bet is mosquito/MQTT is perfectly fine. Id put money on HA doing the parsing.

Hope you get it sorted. Good luck.

1 Like

Love it! I will do this as I only need to fire this one code the rest is all receiving codes.

I researched and implemented if I press the button in tasmota that I learned it works.

However to initiate this button payload needs to be Rfkey1 (for learned key 1) which is still alphanumeric and back to the original problem of alphas not being recognized.

Did you try to send it as a number ?

R K or Y are not in hex table to be able to convert to decimal

So annoying coz every post I read where people are having problems they are only working decimal key struggling with searches, probably I been on and off with this one for months now.

Perhaps i’m misunderstanding, but you only have to send RfKey with the number 1 ?

So I dont know anything about this bridge but a quick search revealed this example of sending data to it...

{"RfRaw":{"Data":"AA B1 03 07F9 0124 37DC 010101010101101001010101101010100102 55"}}

Are you just not sending correct format?

https://tasmota.github.io/docs/devices/Sonoff-RF-Bridge-433/

Thanks for the words help me to uncover this..

I looked at the tasmota console again and it was saying:
17:02:06 MQT: stat/RF_Bridge/RESULT = {"RfCode":777}
because in node red the mqtt topic was:
cmnd/RF_Bridge/RFCODE
I did not need to send an RFCODE I needed to access the RFKEY1(if you need key 2 then it RFKEY2 and so on).
so I changed node red mqtt topic to:
cmnd/RF_Bridge/RFKEY1
then in my testing inject node in the payload I put:
6
because 6 sends the learned code for the RFKEY you are using in your TOPIC


https://tasmota.github.io/docs/Commands/

Tasmota console now looks like this now when I trigger in node red from home assistant and my siren responds accordingly.
7:55:59 MQT: stat/RF_Bridge/RESULT = {"RfKey1":"Learned sent"}

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.