Not stable work with Broadlink devices using RF control

For questions about IRControl, proposals for next releases, ideas for designing page layouts
Post Reply
SciMan
Posts: 4
Joined: 21 Feb 2018, 22:00

Not stable work with Broadlink devices using RF control

Post by SciMan »

Hi,

I'm new in this forum, so first I wish to thank you for the great job. I'm searching an alternative of the official application eControl from Broadlink, because of some problems with it. I made some tests with your IRControl application (it was quite easy to configure it and make a simple layout). Unfortunately I see similar problem and here it is... I'm trying to control a LED strip via RF signal. I have RM PRO+ device. I configured a button that represents the button for power on/off from the remote control. On a first look all works fine. But sometimes pushing of the button (from the application) caused the LED strip to be switched on, then immediately off or opposite. I tried to configure the button with action ondown, but this problem still occurs. I tried with some other devices in my home that use RF control via my Broadlink RM PRO+, but the problem is always the same. I cannot avoid wrong switching sometimes more than ones by single pushing of the button. Can you advice me how I can make so that one push of the button always causes only one change of the state?
info@cec.gmbh
Posts: 220
Joined: 25 Jul 2017, 14:27

Re: Not stable work with Broadlink devices using RF control

Post by info@cec.gmbh »

Hi SciMan

It does not have any differences between the triggers on an Action how the command is sent to the Broadlink device (except trigger timing is differnt). So this is not the problem. I propose to take trigger onclick for normal "button actions".

I can imagine that the stored radio control sequence is not corret or includes the same sequence several times. To learn radio control sequences with the Broadlink device is a little bit ugly. It have to be done in 2 steps. In the first step, which the device use to determine the radio control frequency, you have to press and hold the button of your remote control device up to the continue button appears. The second step is used to decode the radio control sequence. So you have to press the button on your remote control device only very short (the sequence should be sent only once to the Broadlink device). If the sequence is stored correctly in this way, I think it should work.

Kind regards,
Urs
SciMan
Posts: 4
Joined: 21 Feb 2018, 22:00

Re: Not stable work with Broadlink devices using RF control

Post by SciMan »

Hi again,
And thank you very much for your advice. I made a new learning of the commands for some devices and I pressed the buttons of the remote control for very short time as you suggested. This helped (I think) to control a LED strip and the lights in the room. I didn't have time to test too much, but it seems to be better now. However, there is another issue that I have. I want to control my water dispenser. I mounted in it a 4 channel RH module that controls the buttons on the front panel. And here it comes a problem. Short push of the button has one function, but long push (longer than 3s) has another function - enters programming mode and you are able to set the required temperature for the hot and cold water. In this case short push of the button is not all that I need. But when I learn the Boardlink device to push it for 4s, then I have unpredictable results. Sometimes it works fine (about 50% of the trials) and sometimes it breaks several times. So I'm searching a solution for this issue. I can imagine two solutions. First - a hardware one: short push in any case and additional monostable timer that will prolong the signal. So for each button I need two outputs - one for short push and one more for long push of the button. I don't prefer this solution (but I believe it will work). And a second solution - to fix manually the learned code. But I don't know how to do this. Probably you can help. Here is what I mean. The code should be a sequence of some digits. I suppose that when the button is pushed for longer time, the code is sent completely, the starts again from the beginning and so on, until the button is released. Probably when the Broadlink device is learning, it cannot find the correct end of the original sequence that must be repeated. So it must be possible to make a manual correction of this code. It should be saved like a file somewhere (in your application too). If I modify this file and try to fix the code, probably it will work perfectly. Am I right? Can you help me with this if it is possible?
Regards!
SciMan
info@cec.gmbh
Posts: 220
Joined: 25 Jul 2017, 14:27

Re: Not stable work with Broadlink devices using RF control

Post by info@cec.gmbh »

Hi SciMan

The Broadlink device does not have any capabilities to send infrared or RF signals continously as long as any key is pressed (or somthing similar). But it has the possibility to encode into the command sequence how many times the sequence should be repeated. This is normlally set to 0 repeats. Actually the IRControl App has no functionality to manipulate this repeat attribute, but it is a good idea to implement. So I can plan this for the next version of IRControl, but it is not clear, when it will be released.

So - yes you can also manipulate this repeat attribute in the command your device definintion if you are familar with XML files and Base64 encoding. All the configuration data of IRControl are stored in XML Files. You can export and import them with the Datatransfer function (Setup menu). You will find the RF sequences in the tag "irsequence" in the command part of the device XML file. This sequence (binary) is Base64 encoded for the Broadlink device. You will find there as fist byte a 0xb2 or 0xb7 (depending on sequence frequency) and as second byte a 0. This second byte specifys the repeat count (0 means no repeat, 1 means 1 repeat, ...). You can try to set this repeat byte, store the new sequence (again Base64 encoded) in the XML and reimport it in IRControl. Mybe a little bit an adventure, but not impossible.

Kind regards,
Urs
SciMan
Posts: 4
Joined: 21 Feb 2018, 22:00

Re: Not stable work with Broadlink devices using RF control

Post by SciMan »

Hi Urs,
This is exactly what I imagine, just didn't know the details. So, thank you for the detailed explanation. Unfortunately I got unexpected results. I learned 3 commands. First one - I pushed the button for very short time. Second - a little bit longer and third - about 3 - 4 seconds. Then I exported the files as you explained. When I decoded the sequence from base64 to binary I got the following:

Short push:

Code: Select all

b2 00 a0 00 0c 00 01 6e 24 0b 0c 23 0d 23 0c 23
0d 23 24 0b 0d 23 24 0c 24 0b 0d 23 0c 23 24 0c
0c 23 0d 23 0c 23 0c 24 0c 23 0c 23 0c 24 0c 23
24 0c 0c 23 0c 24 0c 23 0c 00 01 6e 24 0b 0c 24
0c 23 0c 23 0d 23 24 0c 0c 23 24 0c 24 0b 0c 24
0c 23 24 0c 0c 23 0c 24 0c 23 0c 24 0c 23 0c 23
0d 23 0c 23 24 0c 0c 24 0c 23 0c 23 0c 00 01 6e
24 0c 0c 23 0c 23 0c 24 0c 23 24 0c 0c 23 24 0c
24 0c 0c 23 0c 24 24 0b 0d 23 0c 23 0d 23 0c 23
0c 24 0c 23 0c 23 0d 23 24 0b 0d 23 0c 23 0c 24
0c 00 05 dc 00 00 00 00 00 00 00 00
Middle push:

Code: Select all

b2 09 34 00 0c 25 0c 25 0c 25 0c 24 0d 24 0c 24
25 0d 0c 24 0d 24 0c 24 0d 00 01 70 25 0d 0c 25
0c 24 0c 25 0c 24 25 0d 0d 24 25 0d 25 0d 0d 24
0c 25 25 0d 0c 24 0d 24 00 00 00 00
Long push:

Code: Select all

b2 3d 34 00 25 0d 0c 25 0c 24 25 0c 0c 25 0d 24
0c 25 0c 24 0c 25 0d 24 0c 25 0c 24 25 0d 0d 25
0c 24 0c 25 0c 00 01 71 25 0d 0d 24 0c 24 0d 24
0d 24 25 0d 0c 25 24 0d 00 00 00 00
As you can see, the second byte is used and it looks that it works exactly as it is expected. I assigned these three sequences to three buttons and I tested how they behave. With the short push, the corresponding relay on the receiver-module doesn't react at all. With the middle push - the relay is switched on for a short time, then switched off. With the long push - the relay is switched on for about 3-4s, then switched off.

After these results I'm thinking about the following:
- Why the second byte is not 0 as you expected?
- Why the middle and the long push work stable, but when I make a macro, it works unstable?
- Why the short push doesn't work at all and the sequence is longer?
- Why all sequences are different? I expect that the code is always the same.
Can you help me, please, to find the answers of these questions?

Best regards!
SciMan
info@cec.gmbh
Posts: 220
Joined: 25 Jul 2017, 14:27

Re: Not stable work with Broadlink devices using RF control

Post by info@cec.gmbh »

Hi SciMan

I have to say, that I have not yet analyzed how RF Codes exactly are buillt and what the Broadlink device do with it. I did not expect that the Broadlink can recognize if the sequence was sent multiple times. This is the reason that that repeate byte is set in sequence 2 + 3. So it is also obvious that the sequence is shorter and has the same length. (btw, the Broadlink header has 4 Bytes: 1 -> frequecy, 2 -> repeat Count, 3+4 length of sequence).

This 3 seqences looks similar for me. You have to know, that this is an amplitude curve and not a digital code. This values represents a puls length in 32,84ms units. You can imagine that the receiver of this code (in this case the Broadlink device) can't recognize this puls length exactly, so this are only roght values. It seams that the Broadlink device can't recognize, when the seqeuence starts, because they are shiftet. But I think this doesn't matter if the sequence is sent multiple times, because the receiver can recognize (or should) when the sequence starts. You can see there is a value significant higher than the others (around 70). I think this is a part of the start sequence.

I can't say definitely what's the Problem when sending Sequence 2/3 within a macro. What else is in this macro? Other Broadlink RC Actions? If it is so, you should separete them with an Sleep Command (Command Action, Parameter Sleep and as value the time in milliseconds). Otherwise they will be sent to close.

Why Sequence 1 is not working? I don't know. I think the Broadlink RF parts works well if it is irrelevant how long the sequence will be sent. In your usecase it seams to be a bit tricky.

Kind regards,
Urs
SciMan
Posts: 4
Joined: 21 Feb 2018, 22:00

Re: Not stable work with Broadlink devices using RF control

Post by SciMan »

Hi Urs,

I made a lot of trials, but I couldn't make it to work stable. On your question - what I'm doing in my macro... It sends several RF command and I always put big enough delay between the commands.
However, now I will try to work on my second idea that needs hardware modification of the receiving RF module. We will see what I will achieve.
Thank you for your effort to help. At least I learned a lot how the things work...
Regards!
SciMan
Post Reply