Open gerardovf opened 6 years ago
Hi i wonder if any one could help me understand a little bit more this I need some help on this remote for my owning.
the remote has three four bottom
this is the control remote im using REMOTE like in this link: https://turkish.alibaba.com/product-detail/6-0m-3-0m-large-size-retractable-full-cassette-awning-with-led-60646476303.html
OPEN 2.CLOSE STOP 4 . LIGHT ON/OFF I have the rf bridge v2 succesfully installed latest tamota and upgraded the latest firmware ( RF-Bridge-EFM8BB1.hex)
while using the RfRaw AAB155 and pressing the buttom few time 3-5 secs i get the folowing codes:
17:13:51 CMD: RfRaw AAB155 17:13:51 MQT: stat/sonoff/RESULT = {"RfRaw":"ON"} 17:13:51 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AAA055"}} 17:13:55 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 02 02B2 0384 180808 55"}} 17:14:00 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01D6 012C 0ECE 02F8 5E42 4818181818181818181818180818181818080808081818281808083B3B080808083B3B380B083B3B08083B0808083B083B0808083B083B3B083808080B080808381B08083B3B08 55"}} 17:14:02 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02F8 5CE4 481818181818081818080808080808080808080808080828080808080808083B080808080808083B08080808083B3B3B38080B3B3B38080B3B0808380B380B08083B080808080808080838 55"}} 17:14:03 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 0136 0ECE 02F8 5CC6 481818181818181818181808080818180818181818080828080808080808083B080808080808083B08080808083B3B3B38080B3B3B38080B3B0808380B380B08083B080808080808080838 55"}} 17:14:04 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02EE 5CC6 481818181818081808080808080808080808080808080828080808080808083B080808080808083B08080808083B3B3B38080B3B3B38080B3B0808380B380B08083B080808080808080838 55"}} 17:14:06 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 012C 0ECE 02F8 5E74 4818181818181818180808080808080808080808080808280808080808380B08080808083808080B080808380B083B3B080808083B3B080808083B0808080838080B18083B3B08080808380B 55"}} 17:14:07 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02F8 5E4C 4818181818181808080808080808080808080808081818280808080808380B08080808083808080B080808380B083B3B080808083B3B080808083B0808080838080B08083B3B08080808380B 55"}} 17:14:10 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 03 029E 0122 0398 28090809 55"}} 17:14:10 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02F8 5CEE 481818181818180808080808080808080808080808180828080808083808080B08080838080B3B08083808080B3B380B083B3B380B083B3B083B0808380B0808380B0808080838080808 55"}} 17:14:11 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 0122 0ECE 02EE 5CC6 481818181818181818080808080808180808080808080828080808083808080B08080838080B3B08083808080B3B380B083B3B380B083B3B083B0808380B0808380B0808080838080808 55"}} 17:14:13 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 0122 0ECE 02F8 5E4C 481818181818181808180808180808080808080808080828080808083B0808080808083B08380B08083B0808083B3808080B083B3808080B083B0838080808080B080838080B0808083B0808 55"}} 17:14:14 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0EC4 02EE 5E56 481818181818180808080808080808080808080808080828080808083B0808080808083B08380B08083B0808083B3808080B083B3808080B083B0838080808080B080838080B0808083B0808 55"}} 17:14:16 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 012C 0ECE 0334 5CEE 481818181818181818080808080808081808080808080828081818180B3808181808080B3B083808080B38080B3B380B380B3B380B380B3808080B08080838080B0808380808080B3808 55"}} 17:14:16 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 0122 0ECE 032A 5CC6 481818181818080808080808080808080808080808080828080808080B3808080808080B3B083808080B38080B3B380B380B3B380B380B3808080B08080838080B0808380808080B3808 55"}} 17:14:17 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 0122 0ECE 0334 5CD0 481818181818181818181808180808080808080808080828080808080B3808080808080B3B083808080B38080B3B380B380B3B380B380B3808080B08080838080B0808380808080B3808 55"}} 17:14:19 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 02 028A 03B6 180808080808 55"}} 17:14:24 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 03 0316 0190 0334 280918 55"}} 17:14:29 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01CC 012C 0ECE 0334 5E4C 4818181818181818180818080808080808180808080818280808080B083B3808080B08380B38080B083B3B3B083B083B3B083B083B380B3B3B0838080B38080808080B083B 55"}} 17:14:33 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02D0 5CEE 48181818181808080808080808080808080808080808082838180B0838080808080B08380B08380B083808080B380B0808380B380B0808380B3B0808080808083808080B0838080B08380808 55"}} 17:14:33 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02D0 5CD0 48181818181808180808080808080808080808080808082838080B0838080808080B08380B08380B083808080B380B0808380B380B0808380B3B0808080808083808080B0838080B08380808 55"}} 17:14:36 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 01C2 012C 0ECE 02D0 5CC6 48181818181818080808080808080808080808080808082838AAB10501CC01220ECE033E5E5648181818181818181818080808080808080808080808082808080B0808080838080B0808083B380B080808083B380B380B3B380B380B3B3B0838080B083808080B3808080B08080808 55"}} 17:14:36 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 06 01CC 0136 00DC 0EC4 0334 5E4C 58182818181818181818080808181808080808080808083808080C0808080848080C0808084C480C080808084C480C480C4C480C480C4C4C0848080C084808080C4808080C08080808 55"}} 17:14:37 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 03 023A 03AC 046A 28180808090808 55"}} 17:17:59 MQT: tele/sonoff/STATE = {"Time":"2019-08-26T17:17:59","Uptime":"0T00:35:23","Heap":14,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"Maeva's Palace 2GHZ","BSSId":"C0:05:C2:0E:62:A1","Channel":1,"RSSI":100,"LinkCount":1,"Downtime":"0T00:00:07"}} 17:19:23 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 04 0064 0384 0154 0168 381A28 55"}} 17:19:49 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 04 021C 0082 00FA 01F4 381A0A 55"}} 17:20:45 MQT: tele/sonoff/RESULT = {"RfRaw":{"Data":"AA B1 05 02C6 0104 0078 01AE 0190 481A39 55"}}
then i have used the sinffed data on BitBucket.py getting this result:
i had varios results but only the one below work just once whilst tested, after that they do not work. can anybody please help me understanding this and address me to the next step to get this work?
`LIGHT on:
rfraw AA B0 57 05 08 01C2 0136 0ECE 02D0 5CEE 4818181818181818080808080808080808080808080808283B08083B08380B08083B0808083B083B0838080B3808080808080B3808080808080B0838080B0808080808380B3B08083B0838 55;rfraw off rfraw AA B0 54 05 08 01C2 0136 0EC4 02EE 5CE4 48181818181818180808080808080808080808080808082808380808080B3B380808080B083B3808080B3B083B3B380B083B3B380B0838080B3B380808080B080808380808080B38 55;rfraw off
CLOSE:
rfraw AA B0 55 05 08 01C2 012C 0ECE 02EE 5E60 4818181818080808080808080808080808080808080808280808080808083B08080808080838080B080808083B083B3B3B08083B3B3B08083B08083B380B3B3B08080808080808083B 55;rfraw 0] rfraw AA B0 53 05 08 01D6 0118 0EC4 02EE 5CDA 481818181818181818181818181818080808080808180828183B080808380B3B0808083B380B080808380B08083B3B3B08083B3B3B080808083B083B380B08380B3B0808083808 55;rfraw 0 rfraw AA B0 51 05 08 01C2 012C 0ECE 02EE 5CBC 481818181818180808080808080808080808080808080828083B08380B3B3B08380B08380B08380B3B0808380B380B0808380B380B0808083B3B3B380B08083B3B08380B38 55;rfraw 0
OPEN:
rfraw AA B0 54 05 08 01D6 0118 0EC4 02EE 5CB2 48181818181818181818181818181818181818181808182818083808080B3B083808080B0808080838080B3B380B3B380B380B3B380B3808080B3B083B3808080B08083808080B38 55;rfraw 0
rfraw AA B0 54 05 08 01D6 0118 0EC4 02EE 5CB2 48181818181818181818181818181818181818181808182818083808080B3B083808080B0808080838080B3B380B3B380B380B3B380B3808080B3B083B3808080B08083808080B38 55;rfraw 0 rfraw AA B0 52 05 08 01C2 012C 0EC4 02EE 5E4C 4818181818180808080808080808080808080808080808280808380B3B080808380B3B3B08083B3B0808380B08083B08380B08083B0838080B08380B3B38080B3B08380B3B08 55;rfraw 0 rfraw AA B0 53 05 08 01C2 012C 0EC4 02EE 5CDA 4818181818080808080808080808080808080808080808280808380B08380B08380B083B0808083B08380B380B083B3B380B083B3B38080B3B08083B38080B080808380B083808 55;rfraw 0 rfraw AA B0 56 05 08 01C2 012C 0EC4 02E4 5E56 48181818181818080808080808080808080808080808082808083B08380B08083B0838080B08080808380B0838080B0808080838080B08080808380B0808083B3B380B380B083B08380B 55;rfraw 0 rfraw AA B0 56 05 08 01C2 0136 0EC4 02EE 5CD0 48181818181818181808080808080808080808080808082808083B0808083B083B08080808080808080808083B38080B38080B38080B38080B380B08380B083B380B3B08083B08080838 55;rfraw 0`
thank you very much in advance for any guidance on this issue!
This same this is happening to me, the first try work right away, and then i kept trying the other B0 and none of them worked. And the one that worked, didnt work any more! :(
Any tips? @Portisch I have a 3 button remote SCT-R1, brand TUBE
I just dropped the idea since i did not received and help or advice in the forum and i never found any solution! If you find something please share! And good luck!! On 27 Feb 2020, 4:09 PM +0000, jotadominguez notifications@github.com, wrote:
@yortiz1979 This same this is happening to me, the first try work right away, and then i kept trying the other B0 and none of them worked. And the one that worked, didnt work any more! :( Any tips? I have a 3 button remote SCT-R1, brand TUBE — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Any advice for https://github.com/Portisch/RF-Bridge-EFM8BB1/issues/31#issuecomment-489406119 ? I have similar problem.
For anyone who want to parse B0 from B1 data, please find my node-red flow here, which I reverse-engineered from the BitBucketConverter.py. Since the pyhton3 functions nodes made my node-red crash.
B0 builder node-red.txt I wanted to parse this raw data to detect protocols (like pilight or rtl_433, but no luck yet)
For anyone who want to parse B0 from B1 data, please find my node-red flow here, which I reverse-engineered from the BitBucketConverter.py. Since the pyhton3 functions nodes made my node-red crash.
B0 builder node-red.txt I wanted to parse this raw data to detect protocols (like pilight or rtl_433, but no luck yet)
@jhonniedj did you get this working in the end?
For anyone who want to parse B0 from B1 data, please find my node-red flow here, which I reverse-engineered from the BitBucketConverter.py. Since the pyhton3 functions nodes made my node-red crash. B0 builder node-red.txt I wanted to parse this raw data to detect protocols (like pilight or rtl_433, but no luck yet)
@jhonniedj did you get this working in the end?
I was able to reproduce the command, but not to decode it from raw commands. I found out that I had 2 action (the store) remotes from Flamingo (KAKU sort of) which did respond differently, 1 was decodable by portisch, but the other was not, while it was able to being decoded by pilight (with usb-arduino-nano-433 decoder)
Unfortunately I was unable to connect raw output to a nice decoding-script in node-red (like Pilight or RTL_433) in order to decode all my store-bought 433 remotes
@jhonniedj ah apologies I misunderstood. I thought you was mentioning you couldnt get your nodered flow to work. I am facing issues with it!
@jhonniedj ah apologies I misunderstood. I thought you was mentioning you couldnt get your nodered flow to work. I am facing issues with it!
ooh the node-red B0/B1 conversion was working.
According to the error I guess the input from mqtt is wrong (inputting from an empty string or null/not-string or so), does it work with the test-inject-node? Do you have an example of the input to the Function node? (with a debug node)
@jhonniedj I got the same error from the test Inject node
See the input with same error around the function.
@jhonniedj I got the same error from the test Inject node
what version of nodejs and node-red are you running?, it could be that replaceAll is not implemented yet, maybe .replace(/ /g, "") will work in stead of .replaceAll(" ","")?
Hi looks like 14.8 node.js, looks like i need node.js 15, however i cant work out how to update the docker container for that
changing to replace does work though
The online tool is working again now
https://bbconv.hrbl.pl/
May need to strip out the time, so the entry is like:
{"RfRaw":{"Data":"AA B1 05 02B2 058C 0064 01CC 0FB4 481A38 55"}}
Hi looks like 14.8 node.js, looks like i need node.js 15, however i cant work out how to update the docker container for that
changing to replace does work though
Hereby the file that should resolve the "TypeError: szInpStr.replaceAll is not a function" error: B0.builder.node-red-without-replaceall.json.txt (I replaced the other 2 functions also with .replace, apparently .replaceAll was used on 3 places)
https://bbconv.hrbl.pl/ is down again it seems, can it be hosted elsewhere? Github for instance?
https://bbconv.hrbl.pl/ is down again it seems, can it be hosted elsewhere? Github for instance?
As you say, still down. I'm a bit lost without it, I guess I'll have to try to work out how to get the Python script running...
Still down, bumping so it goes back on someones radar.
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this:
node convertB1.js
Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this:
node convertB1.js
Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
I second this, I still use the flow in nodered. Which closes my dependence on the site
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this:
node convertB1.js
Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
YES! I tried a whole bunch of online Python websites to run the original code. I installed NodeJS on a Mac and ran your code.... and it only took a few minutes to find all 3 codes for Ch2, which were needed for a new blind.
Thanks!
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this:
node convertB1.js
Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
@Portisch: is is possible or convenient to put this code on the main README.md or wiki to help other users? For the NodeJS, and the node-red-flow files. They have the same algorithm (copied) from the Python scripts.
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this:
node convertB1.js
Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
Thank you, so much! I implemented the code in Node-RED and it works perfectly!
@Xerus-de will you be so kind to share your nodered flow? Thanks a lot!
@Xerus-de will you be so kind to share your nodered flow? Thanks a lot!
I think @Xerus-de means this one: https://github.com/Portisch/RF-Bridge-EFM8BB1/issues/31#issuecomment-1167300333
@jhonniedj Thanks! I was just wondering if @Xerus-de made any modification on the previous node,
@jhonniedj Thanks! I was just wondering if @Xerus-de made any modification on the previous node,
Hi, I could share my Node-RED flow with only. It contains only little modifications of the node of jhonniedj for input and output in Node-Red.
@ jhonniedj: would this be OK for you?
@Xerus-de will you be so kind to share your nodered flow? Thanks a lot!
I think @Xerus-de means this one: #31 (comment)
I generated a new variant for Node-RED, based on your node. The B0 value will be directly displayed after pressing a button on the remote control.
@Xerus-de will you be so kind to share your nodered flow? Thanks a lot!
I think @Xerus-de means this one: #31 (comment)
I generated a new variant for Node-RED, based on your node. The B0 value will be directly displayed after pressing a button on the remote control.
Yes absolutely, no problem! As long as the knowledge is commonly shared i'm happy! I merely copied the algorithm from the Python script and translated it to javasript/node-red/nodeJS.
Wouldn't it be more convenient to just create an simple HTML page with the JS code that could be hosted on Github pages? That way it's easly accessible and everyone benefits :-)
Anyways thanks for shareing!
Still down, bumping so it goes back on someones radar.
convertB1.txt I made a nodejs file to convert. If you rename convertB1.txt to convertB1.js, and install nodeJS, you can run it from command line like this: node convertB1.js Then the program needs a B1 string, that will be converted to a B0 string. Does that help you out?
Thank you, so much! I implemented the code in Node-RED and it works perfectly!
This is my Node-RED flow. Basically the same implementation as above: https://github.com/Portisch/RF-Bridge-EFM8BB1/issues/31#issuecomment-1167300333
Anyway, thank you for your great work!
Thanks a lot @jhonniedj and @Xerus-de !!!
Wouldn't it be more convenient to just create an simple HTML page with the JS code that could be hosted on Github pages? That way it's easly accessible and everyone benefits :-)
Anyways thanks for shareing!
Like this? --> convertB1.html.txt (you have to rename the attachment convertB1.html.txt to convertB1.html)
I think hosting this would be best on this github? maybe the contributers of this page want to host it @ the wiki's? I cán host it elsewhere if there is no other way. (like this: https://jonajona.nl/convertB1.html)
Hi Folks,
I am no techy enough to understand everything that's being discussed here, but I get the feeling that many of you would be able to solve my problem easily. Perhaps even offer some education or advise?
This is my case:
I have a Sonoff RF Bridge flashed with Tasmota 13.3.0 and Portisch v0x04
The bridge works well and I use it to read data from various door and window sensors using rfraw 166
But all my attempts to read data from various brands 433MHz remote controls, fail. If I use rfraw 177
I can read B1 data (plus a lot of random noise), but I do not understand how to move on from there.
I've used the BitBucket converter https://jonajona.nl/convertB1.html but I do not understand what to do with the output B0 string.
I have searched the internet up and down, but all I find is way to techy for me to digest. Could someone please guidance as to how I can go forward?
Many thanks in advance 👍
Hi Folks, I am no techy enough to understand everything that's being discussed here, but I get the feeling that many of you would be able to solve my problem easily. Perhaps even offer some education or advise? This is my case: I have a Sonoff RF Bridge flashed with Tasmota 13.3.0 and Portisch v0x04 The bridge works well and I use it to read data from various door and window sensors using
rfraw 166
But all my attempts to read data from various brands 433MHz remote controls, fail. If I userfraw 177
I can read B1 data (plus a lot of random noise), but I do not understand how to move on from there. I've used the BitBucket converter https://jonajona.nl/convertB1.html but I do not understand what to do with the output B0 string.I have searched the internet up and down, but all I find is way to techy for me to digest. Could someone please guidance as to how I can go forward?
Many thanks in advance 👍
Great job, then you're at 95% of the process.
Just send your B0 String with the rfraw-command like this:
rfraw AAB0230408017C046A0BCC23783818190908181908190909090908190819081818190909091A55
Hope that helps
Great job, then you're at 95% of the process. Just send your B0 String with the rfraw-command like this:
rfraw AAB0230408017C046A0BCC23783818190908181908190909090908190819081818190909091A55
I'm not sure I understand. And I don't dare to try unless I understand. Can you briefly explain what is suppose to happen if I type
rfraw AAB0230408017C046A0BCC23783818190908181908190909090908190819081818190909091A55
at the console (cause that's what you mean, right?) What good will that do? I want to be able to parse incoming key-press from the remote to Home Assistant via my MQTT broker. Will you advise help me in that direction?
Great job, then you're at 95% of the process. Just send your B0 String with the rfraw-command like this:
rfraw AAB0230408017C046A0BCC23783818190908181908190909090908190819081818190909091A55
I'm not sure I understand. And I don't dare to try unless I understand. Can you briefly explain what is suppose to happen if I type
rfraw AAB0230408017C046A0BCC23783818190908181908190909090908190819081818190909091A55
at the console (cause that's what you mean, right?) What good will that do? I want to be able to parse incoming key-press from the remote to Home Assistant via my MQTT broker. Will you advise help me in that direction?
Hi,
I also use 177 to get the AA B1... response from the remote.
This B1 data needs to be converted into the AAB0... value which can be sent by console or MQTT to emulate the button switch on the remote.
Use in console following command : rfraw AAB0...
For MQTT: send AAB0... payload to _cmnd/
If you want to recognize an incoming key-press from a remote you need to find rules in the B1 response string which you can use for triggering other things in Home Assistant.
You can do this by MQTT: _tele/
Good luck!
If you want to recognize an incoming key-press from a remote you need to find rules in the B1 response string which you can use for triggering other things in Home Assistant. You can do this by MQTT: _tele/
/RESULT_ If your remote uses rolling code then you will need more than one rule for one button. Good luck!
Well, thank you 😊 But using rfraw 177 permanently isn't feasible. The RF-Bridge picks up too much random noise. My understanding was that the purpose of the rfraw 177 mode was only meant to be experimental - to really let everyting in without any decoding or filtering at all (come what may). So even though I can sniff the buckets (B1) from my remote, I need a way to teach the Bridge how to recognize and read those keypresses in rfraw 166 mode. But in that mode, as it is now, the Bridge sees nothing at all when I press the keys on the remote. So the question is; How do I make the Bridge able to read the 433MHz protocol coming from the remote, in rfraw 166 mode?
As I understand it, you need to decode the protocol and then recompile the firmwire. https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/Decode-0xB1-sniffed-data
I have never been able to achieve it. Looking forward to anyone with a more detailed guide/understanding
I did manage to successfully sniff the data sent by my RM433 Sonoff remote control, and I also managed to make HA act as a virtual remote control and send valid keypress data via MQTT and my Sonoff RF Bridge to control the end-device properly. In my case study this was a Sonoff D1 dimmable light switch. So, I'm still not able to read when keys are pressed on the remote, but I am able to pretend being a remote. 😊
I did manage to successfully sniff the data sent by my RM433 Sonoff remote control, and I also managed to make HA act as a virtual remote control and send valid keypress data via MQTT and my Sonoff RF Bridge to control the end-device properly. In my case study this was a Sonoff D1 dimmable light switch. So, I'm still not able to read when keys are pressed on the remote, but I am able to pretend being a remote. 😊
I also reached this stage, would love to be able to go that extra step and intercept remote presses rather than just emulate them.
Yes, we need to "lure" someone out who knows how to analyse the B0 data strings, extract the header data fro bucket numbers and length, and plug these correctly into the RF_Protocols.h file and compile it. I made some attempts to analyse my data, but I gave up. I was confused by the fact that when sniffing, several keypresses gave me these strings, which all works when I play them back:
AAB0210308030200C81D6A2818181909081909090819090818181908190909081909090955
AAB021030802BC010E1D602818181909081909090819090818181908190909081909090955
AAB021030802D000FA1D602818181909081909090819090818181908190909081909090955
AAB021030802C6010E1D602818181909081909090819090818181908190909081909090955
AAB021030802BC010E1D602818181909081909090819090818181908190909081909090955
AAB021030802E400FA1D6A2818181909081909090819090818181908190909081909090955
AAB021030802C6010E1D6A2818181909081909090819090818181908190909081909090955
AAB021030802C6010E1D6A2818181909081909090819090818181908190909081909090955
As you can see - the header data for count and length vary between them, still all works correctly since the payload is identical. I found that it's the ninth byte in the payload that's actually the command. Changing this byte value from 90 to 81 results in an 'off' command being sent instead of the 'on' command. Thus I can toggle the light switch by changing only this byte.
I'm not sure if i'm the one you wanted to lure-out, but if I take a look at the code that I translated to Javascript from the official python-file BitBucketConverter.py (below) together with the the decode-page on: https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/Decode-0xB1-sniffed-data. and disect it, then I see B0 and B1 are almost idenitcal, except B0 containcts 2 extra bytes:
note: This is a hex-representated string, so "AA"(as a string) represents to 0xAA (2-byte hex) (mind the string to hex conversion in hex2string, which I always find tricky to implement, since it is easy to mess up when
===Example B1===
AA B1 04 017C 046A 0BCC 2378 3818190908181908190909090908190819081818190909091A 55
//0xAA 0xB1 = header
//0x04 = 4 buckets
//0x01 0x7c = length bucket 1 : 380µs
//0x04 0x6a = length bucket 2 : 1130µs
//0x0B 0xcc = length bucket 3 : 3020µs
//0x23 0x78 = length bucket 4 : 9080µs
//3818190908181908190909090908190819081818190909091A = RF Data
//0x55 = end
===Example B0=== (with extra length- and repeat-bytes)
AA B0 23 04 08 017C 046A 0BCC 2378 3818190908181908190909090908190819081818190909091A 55
//0xAA 0xB0 = header
//0x23 = LENGTH OF COMPLETE MESSAGE between leading "AA B0" and last "55" <-------
//0x04 = 4 buckets
//0x08 = NUMBER OF REPEATS, hard programmed to repeat command 8 times from script... <-------
//0x01 0x7c = length bucket 1 : 380µs
//0x04 0x6a = length bucket 2 : 1130µs
//0x0B 0xcc = length bucket 3 : 3020µs
//0x23 0x78 = length bucket 4 : 9080µs
//3818190908181908190909090908190819081818190909091A = RF Data
//0x55 = end
===NodeJS/Javascript convert function===
function parseRF(szInpStr, repVal) {
const debug = false;
const verbose = true;
szInpStr = szInpStr.replace(/ /g, "");
var iNbrOfBuckets = parseInt(szInpStr.slice(4, 6), 16);
var arrBuckets = [];
var szOutAux = ` ${hex2string(iNbrOfBuckets, 2)} `;
szOutAux += `${hex2string(repVal, 2)} `;
for (let i = 0; i < iNbrOfBuckets; i++) {
szOutAux += szInpStr.slice(6 + i * 4, 10 + i * 4) + " "
arrBuckets.push(parseInt(szInpStr.slice(6 + i * 4, 10 + i * 4), 16))
}
szOutAux += szInpStr.slice(6 + iNbrOfBuckets * 4, -2);
var szDataStr = szOutAux.replace(/ /g, "");
szOutAux += " 55";
var iLength = parseInt(szDataStr.length / 2);
szOutAux = "AA B0 " + hex2string(iLength, 2) + szOutAux;
return szOutAux.toUpperCase();
}
hope that helps...?
And to apply my explenation with your examples:
AAB0 21 03 08 0302 00C8 1D6A 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02BC 010E 1D60 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02D0 00FA 1D60 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02C6 010E 1D60 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02BC 010E 1D60 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02E4 00FA 1D6A 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02C6 010E 1D6A 28181819090819090908190908181819081909090819090909 55
AAB0 21 03 08 02C6 010E 1D6A 28181819090819090908190908181819081909090819090909 55
Which concludes that header, message-length, repeats, buckets, RF data is always the same. The only (relatively small) changes are in length of bucket, that would probably be measuring-error, and can be ignored (hence the fact that all of them are working)
//0xAA 0xB0 = header
//0x21 = LENGTH OF COMPLETE MESSAGE between leading "AA B0" and last "55" <-------
//0x03 = 3 buckets
//0x08 = NUMBER OF REPEATS, same 8x as scripts... <-------
//0x03 0x02 = length bucket 1 : 770µs (above examples between 700-770)
//0x00 0xC8 = length bucket 2 : 200µs (above examples between 200-270)
//0x1d 0x6a = length bucket 3 : 3020µs (above examples between 5730-7520)
//28181819090819090908190908181819081909090819090909 = RF Data
//0x55 = end
lengths bucket 1
0x0302 = 770 µs
0x02BC = 700 µs
0x02D0 = 720 µs
0x02C6 = 710 µs
0x02BC = 700 µs
0x02E4 = 740 µs
0x02C6 = 710 µs
0x02C6 = 710 µs
lengths bucket 2
0x00C8 = 200 µs
0x010E = 270 µs
0x00FA = 250 µs
0x010E = 270 µs
0x010E = 270 µs
0x00FA = 250 µs
0x010E = 270 µs
0x010E = 270 µs
lengths bucket 3
0x1D6A = 5730 µs
0x1D60 = 7520 µs
0x1D60 = 7520 µs
0x1D60 = 7520 µs
0x1D60 = 7520 µs
0x1D6A = 5730 µs
0x1D6A = 5730 µs
0x1D6A = 5730 µs
.... and in what way will/can any of this be used to enable reading of key presses from a remote?
After learning how bit bucket works from here https://github.com/Portisch/RF-Bridge-EFM8BB1/issues/23 I decided to prepare a python script to help calculate the right 'B0' message to send using 'RfRaw' command in Tasmota from the received 'B1' sniffing message (rename file from 'BitBucketConverter.txt' to 'BitBucketConverter.py'.
BitBucketConverter.txt Do not use this version, it's too old already!
In the command line give the 'B1' message string and the retries value (in decimal): i.e. BitBucketConverter.py "AA B1 04 07EB 0157 00FD 3EBC 010101010101101001010101101010100103 55" 20