python-broadlink: StorageError: The device storage is full while learning and workaround
I recently got a new Broadlink RM mini 3 from Amazon US, the device type is 0x5F36. With python-broadlink, I am able to “learn” a few IR code, it is working fine. After a few codes learned, the device starts to complain “The device storage is full” error. This problem cannot be resolved by resetting the device, and I am pretty desperate at this point.
On deciding whether I will need to return the device, I realize that: after using enter_learning() function, the device has white indicator on, which means it indeed reads the IR code, but the error only comes when I try to use check_data() function. Further tests indicate that as long as I commented out the check_error() statement, the check_data function can actually correctly reporting IR code.
So I assume the “learning” functionality is actually writing IR codes into the device’s memory, which, from what I see, is very much limited. Since there is no “erase” option given, I assume a lot of users are going to encounter the same problem. And, since most users of python-broadlink only need to read out the IR code instead of really using the learning function, I think it would be great if an option for temporarily disabling the error check for full device storage could be given.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 41 (3 by maintainers)
YAYAYAYAYAY!!! This command did the trick!!! 😃)))) Now I need to learn the RF codes and configure the OpenHAB binding 😃)) I’m so glad I’m able to continue to the next step. Thank you so much for your help @felipediel @KTibow 🙏🙏🙏
You can use
python3 broadlink_cli --device "0x61a2 192.168.1.6 24dfa7b9c689" --rfscanlearn.Thanks for the pointer. You are right. Changing from using the “rm” class to using the “rm4” class works! Glad to finally get this working!
You’re right! My mistake, I’m sorry!
I was able to detect the problem using the library directly on python console, but the treatment is indeed in the other project.
*By problem I meant ask to check_data() before pressing the button.
Sorry I reopened this thread. The problem still happens, but I think I can help to replicate. And I believe it is a code problem.
Hope this help to solve. I spent my afternoon trying to make it work and getting this error. I notice when we started to learn any code, and don’t press any button on remote, the error popups in screen (about 5 seconds after the command) while the RM4 Mini still with the white led on.
But, if you press the remote control button just after entered the learning mode, it works beautifully.
So to replicate the problem, just enter the learn mode and just wait 5 seconds.
I’m a developer but zero skills with python. So, I suppose, the problemas has something about the delay between entering the learning mode and “grab” the code from the device while it still not ready yet.
And the error about full storage is just a “bad catch” somewhere, or the “bad code” returned crashes the write method.
Hope it drives for the solution, and btw REALLY THANKS for all the effort spent.
Wonderful! You were right!!! I didn’t notice I made a small mistake in the IP address. Sorry for this foolish mistake.
My next step was to record my appliances wireless remotes’ codes. However, the RM4 Pro didn’t recognize any RF codes, and, as such, it returned a “No data received…” message.
On the other hand, when I tried to record IR codes the RM4 Pro properly recorded them:
Am I missing a necessary step before recording RF codes?
@mjeshurun they mean to run it from the command line, possibly with
python3 -mbefore it.Thank you 🙏 To double check I understand what you mean. My next step is to open the broadlink_cli file with a text editor and check if the commands you wrote (and those highlighted in the code snippet) are in the broadlink_cli file verbatim?
Or do I need to add the commands you wrote somewhere into the broadlink_cli file?
The
try: exceptclause is similar to anif statement, but we ask for forgiveness instead of asking for permission in order to improve performance.If statement (asking for permission)
Try except (asking for forgiveness)
This code snippet is exactly what you are looking for.
When you call
devices[0].check_data(), you need to catch the exceptions with atry: exceptclause. Check the CLI implementation for more details.I’m following this set of commands:
After the last “enter_learning” command I get the error message, so I cant continue to the next commands that are supposed to be:
One more note just to complete my view of things. My “old” RM3 mini still requires the old “rm” class (old firmware being “v57”). The new RM3 minis I have purchased recently do not work with the “rm” class, they require the use of the “rm4” class (new firmware being “v44057”). Thanks for the help sorting this out.
Here I mean after commenting out line 74.
But actually, in my test, the first portion works even without commenting out the line. The
check_datamethod in the second part is giving outStorageError.