Fixing RF setup issue#362
Conversation
| if args.durations else bytearray.fromhex(''.join(args.data)) | ||
| dev.send_data(data) | ||
| if args.learn or args.learnfile: | ||
| if (args.learn or args.learnfile) and not args.rfscanlearn: |
There was a problem hiding this comment.
There is no reason to add this conditional because these arguments are exclusive. The user will never use both on the same call.
There was a problem hiding this comment.
Doesn't it force a "learnfile" parameter here?
python-broadlink/cli/broadlink_cli
Line 236 in a731c9c
Which in that case you have entered rfscanlearn and learnfile as args
Maybe I'm not clear on what the proper command should be to learn rf and store it to a file?
There was a problem hiding this comment.
Ah yes, I understand now. Looks good to me. A suggestion:
if args.learn or (args.learnfile and not args.rfscanlearn):| data = None | ||
| timeout = 20 | ||
|
|
||
| time.sleep(10) |
There was a problem hiding this comment.
I understand what you are doing here. You were getting a ReadError, right? This will be resolved with this PR, we don't need to wait 10 secs.
There was a problem hiding this comment.
Great! glad to hear it, I can remove this change
|
@catch-twenty-two Apart from that, is the RF working for the RM4 Pro? Can you learn and send commands normally? |
Yes after these fixes I was able to pair RF with my RM 4 Pro and send commands |
May fix issue similar to #358 in the cli. Couldn't get anything to work until I added a pause before pulling data and added logic to skip learning IR if a RF argument had been given. Also had to implement this fix for my specific device #360