radinsky / broadlink-http-rest

Broadlink RM/RM2/RM Pro/RM3/BlackBean/A1 Web server with REST API (like..)
MIT License
156 stars 47 forks source link

On/Off commands not sent #22

Closed Harel-M closed 6 years ago

Harel-M commented 6 years ago

I think there is a mistake in line 135: result = getStatus(realcommandName, deviceName)

it should be: result = sendCommand(commandName, deviceName)

currently any command with 'on' or 'off' in the name are not sent....

radinsky commented 6 years ago

@Harel-M Could you please provide a command you're trying to use (full url) I will try to reproduce it in my environment?

Harel-M commented 6 years ago

Example: http://xx.xx.xx.xx:8000/RM_Livingroom/sendCommand/TVon but anything with on or off in the command name (that makes the condition in line 127 true) will behave the same.

It prints that the command is sent, but nothing happens (the amber led is not blinking on the device).

After doing the above change to line 135 it works (I don't see anywhere in the original code calling the sendCommand function)

radinsky commented 6 years ago

ok, I pushed a fix, any chance you can pull the recent change and check if it fixed the issue (i will be able to test it only tomorrow)? thanks!

Harel-M commented 6 years ago

Hi, I could only check it today... now it's working 👍

Thanks :)

uudruid74 commented 6 years ago

May have been my fault on that