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

[Commands] in Settings.ini #12

Closed lmfilio closed 6 years ago

lmfilio commented 6 years ago

Is there anything I need to put into the [Commands] of the Settings.ini to make a sendCommand work?

I tried testing but I am receiving a log of "timeout":

pi@raspberrypi:~/rm3/broadlink-http-rest $ sudo python server.py Starting broadlink-rest server on port 80 ... 127.0.0.1 - - [07/Jun/2018 19:06:46] "GET /sendCommand/test HTTP/1.1" 200 - 127.0.0.1 - - [07/Jun/2018 19:06:56] Request timed out: timeout('timed out',)

Appreciate the help.

uudruid74 commented 6 years ago

You need to use learnCommand to learn the command you want to send. And you don't need root.

lmfilio commented 6 years ago

I tried entering this in a browser - https://localhost/learnCommand/aircon

Here is the response:

pi@raspberrypi:~/rm3/broadlink-http-rest $python server.py Starting broadlink-rest server on port 80 ... 127.0.0.1 - - [08/Jun/2018 10:58:52] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [08/Jun/2018 10:59:01] "GET /learnCommand/test HTTP/1.1" 200 - 127.0.0.1 - - [08/Jun/2018 10:59:11] Request timed out: timeout('timed out',) 127.0.0.1 - - [08/Jun/2018 10:59:53] "GET /learnCommand/aircon HTTP/1.1" 200 - 127.0.0.1 - - [08/Jun/2018 11:00:03] Request timed out: timeout('timed out',)

Do I need to press a sample IR button in between the command and the RTO?

uudruid74 commented 6 years ago

Yes, it is timing out waiting on you to push a button. If you are using the blackbean, you'll see the LED go white. Not sure how other devices are set.