python-broadlink icon indicating copy to clipboard operation
python-broadlink copied to clipboard

CLI Send Command (from File) Not Working

Open Digicrat opened this issue 6 years ago • 5 comments

I just got the RM3 and am having multiple issues setting it up, but starting with the basics, I've joined the RM3 to the network (via broadlink.setup() function since I was using the wrong app for my first attempt).

I then tried using the provided cli script:

  • ./broadlink_discover # Finds the device and I output the line to a file
  • ./broadlink_cli --device @loft.device --learnfile JVC.VolDown # This worked
  • ./broadlink_cli --device @loft.device --send @JVC.VolDown # This does not
  • ./broadlink_cli --device @loft.device --send 2600940000011589122331... # Contents of saved file (truncated here for brevity).

The send command from file fails with an "error: unrecognized arguments: " message that echoes the contents of my JVC.VolDown file. Including the contents of the file in the commandline gives no error, but has no apparent effect either (I'll need to setup another IR receiver later to check whether it's transmitting anything). I can confirm that the RM3 works through the official app.

UPDATE: Trying again after relearning a command with the second RM3 I setup, I get the same unrecognized arguments message if I try pasting the output of --learn directly.

Am I missing something here?

Also, the discovery (when it works) reports RM2 and not RM3; is that significant?

Thanks

Digicrat avatar Jun 12 '18 02:06 Digicrat

I have the same issue. I can learn all the commands, but I can't send them from the file. broadlink_cli: error: unrecognized arguments: 2600840026132513261522130c2b0c2c0d2b0d2b0b2c25130c2b0b2d0c2c26120d2b25122715050a141522120c2c2711261b1c130c2b261226130b2c0c2b26120d2b0c2c250003d3251a1c14251424130c2b0c2c0c2b0d2b0c2c264a0b2c0c2c25130c2b26132512261226120c2c2513241425130b2c261226120c2c0c2b26120d2b0c2c25000d0500000000

darkpainy avatar Aug 31 '18 23:08 darkpainy

Try delete null line after MAC address in “ROOM.device” , it worked well for me.

daiyambal avatar Sep 08 '18 06:09 daiyambal

As daiyambal said the device file should contain something like "0x2737 192.168.1.34 0bb547770f78", without any CR/LF at the end of the line.

ciberado avatar Oct 26 '18 18:10 ciberado

Same problem I solved, via change code in broadlink_cli: -parser.add_argument("data", nargs='', help="Data to send or convert") +parser.add_argument("--data", nargs='', help="Data to send or convert") Now it works perfectly: broadlink_cli --device @ac --send -data @t24

alpet83 avatar Sep 24 '20 12:09 alpet83

Same problem I solved, via change code in broadlink_cli: -parser.add_argument("data", nargs='', help="Data to send or convert") +parser.add_argument("--data", nargs='', help="Data to send or convert") Now it works perfectly: broadlink_cli --device @ac --send -data @t24

@alpet83 you mad genious 👍 who knew it would be as easy as adding two missing -'s.
Thanks man.

Have a nice evening.

darkpainy avatar Sep 24 '20 16:09 darkpainy