Git Product home page Git Product logo

broadlink-http-rest's People

Contributors

bigpresh avatar radinsky avatar uudruid74 avatar v20100t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

broadlink-http-rest's Issues

Learn command problem

I got this massage
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

after learn command

'module' object has no attribute 'SIGUSR1'

Hi, when running the script I get the following error:

Traceback (most recent call last):
File "server.py", line 523, in
signal.signal(signal.SIGUSR1,SigUsr1)
AttributeError: 'module' object has no attribute 'SIGUSR1'

If I'm deleting line 523 the script is working... but I guess there should be better solution.
I'm working on Windows 10. Maybe I'm missing any dependency package?

Thanks,

Send TV Channel Number

Hi,
I have a telly configured with my RM Pro.
How can I send commands through this API to send channel numbers without actually learning all possible numbers (I have 500+ channels)? I have another script that translates the Channel Name I say to my Google Home into its number

What I thought was to learn 10 separate commands, calling them 1, 2, ....0 with the corresponding number pressed on the remote.

Then, when the script executes and translates my channel name to channel number, let's say 56, it could call the sendCommand/5 and then the sendCommand/6.

Is this the only way to do it or am I missing something obvious?

Thanks!!

NameError: name 'GlobalPassword' is not defined

Hi,

I have migrate from Ubuntu 16.04 to Ubuntu 20.04 and now it doesn't work.

When I try to learn command I receive this error:

Exception happened during processing of request from ('192.168.123.14', 59197)
Traceback (most recent call last):
File "server.py", line 51, in do_GET
if GlobalPassword:
NameError: name 'GlobalPassword' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.8/socketserver.py", line 316, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.8/socketserver.py", line 347, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.8/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.8/socketserver.py", line 720, in init
self.handle()
File "server.py", line 44, in handle
self.handle_one_request()
File "/usr/lib/python3.8/http/server.py", line 415, in handle_one_request
method()
File "server.py", line 60, in do_GET
self.messageHandler()
File "server.py", line 121, in messageHandler
result = learnCommand(commandName,deviceName)
File "server.py", line 302, in learnCommand
deviceKey = device.key
AttributeError: 'rm' object has no attribute 'key'

Where is the problem?

TC2 switch support?

Firstly, broadlink_http_rest is working brilliantly for me so far. I picked up an RM-Pro and wanted to automate various IR and RF controlled stuff, and didn't really want to be running RM-Bridge on an Android device etc - this project is exactly what I was looking for, and I'm very grateful for it! (Take beer money donations?)

I've picked up a TC2 dual-gang lightswitch, which I plan to install soon and pair up with the RM-Pro via the Broadlink app, but once that bit is done, I'm curious on how to operate it via broadlink_http_rest - have you done such a thing / have any advice?

If I get it working, would you be interested in a PR adding documentation on it, and possibly any new features that are needed to make it work?

[Commands] in Settings.ini

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.

On/Off commands not sent

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....

system security / Google Assistant!

I'm thinking there should be some sort of security on learnCommand, or on re-learning an existing command? Maybe a host whitelist?

Thoughts on the best way to handle it?

RF does not receive and send

Hello, I have a problem with receiving and sending RF commands.
I have a rasperry with Openhab and I have installed the server and it runs perfectly.
I have mounted a broadlink RM pro +.
The IR codes (TV, air conditioning, etc.) are learned and sent correctly, both by the e-Control application and by the original remote control.
In contrast, for RF, testing with the e-control application and with the original command is impossible. Always time out waiting without reading anything.
Can someone help me please?
My idea is to control everything with Openhab in order to have everything centralized.

Where is the "learned code" saved?

Hey first of all awesome job, the code makes a hell lot easier when learning and replaying.
However I would like to know where exactly are those learned code(RF in this case) saved? Somewhere is the disk or "stored" in the web page?
http://xxx/room/learnCommand/curtainstop
returns Learned: curtainstop
but I can't not see the raw code.
It's painful when the OS crash and needs a new install, I will lose all of the learned code right? Can I just save it somewhere and re-use them(so that I don't need to learn them all over again)
Thank you so much! Please help

Sky Q Black

Hi,
I tried to acquire the sky q remote control.

But the code is not acquired.

Where am I wrong? I acquired other remote controls without problems.

Unable to send commands

10.0.0.35 - - [17/Jun/2018 01:47:11] "GET /sendCommand/tv1 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.35', 40025)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "server.py", line 44, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "server.py", line 60, in do_GET
    self.messageHandler()
  File "server.py", line 135, in messageHandler
    result = getStatus(realcommandName, deviceName)
UnboundLocalError: local variable 'realcommandName' referenced before assignment
----------------------------------------

RM Pro temperature

Hello,

Right now the remote control function works well.
can you provide a guide that without A1 how to record temperature by RM PRO in domoticz so that can be display in homekit?
i find a new virtual temp sensor named rm already created in domoticz but the temperature keeps 0.
if only some setting needs configured or another python needed?
thanks!

Interested in Advanced Features?

I've been running my personal "advanced macro" branch for awhile now and just merged it to my "master". It contains a number of nifty features, such as being able to toggle a status variable to keep track of a device's status when the remote would normally toggle. Or you can ping a device to see if it's online before you turn it on. Conditional logic and loops are supported, external shell commands, parameter substitution, wake on lan, etc.

Rather than just rest API to send an IR command, it's more of a home automation middle-ware that sits between apps like IFTTT and your IR devices, capable of rather complex decisions. The existing settings file format remains the same.

Let me if you are interested and I can issue a PR, or just check out my repo and give it a whirl.

Error Message

Radinsky - thanks for putting together this plugin. I'm trying to install it for the first time on Raspberry Pi V3 (Jessie) and I'm getting an Error message. Any idea what that is?

`pi@raspberrypi:~ $ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libv8-3.14.5
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libpython-dev libpython2.7-dev python2.7-dev
The following NEW packages will be installed:
libpython-dev libpython2.7-dev python-dev python2.7-dev
0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded.
Need to get 18.2 MB of archives.
After this operation, 25.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython2.7-dev armhf 2.7.9-2+deb8u1 [17.9 MB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main python-dev armhf 2.7.9-1 [1,188 B]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpython-dev armhf 2.7.9-1 [19.6 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main python2.7-dev armhf 2.7.9-2+deb8u1 [287 kB]
Fetched 18.2 MB in 25s (718 kB/s)
Selecting previously unselected package libpython2.7-dev:armhf.
(Reading database ... 117302 files and directories currently installed.)
Preparing to unpack .../libpython2.7-dev_2.7.9-2+deb8u1_armhf.deb ...
Unpacking libpython2.7-dev:armhf (2.7.9-2+deb8u1) ...
Selecting previously unselected package libpython-dev:armhf.
Preparing to unpack .../libpython-dev_2.7.9-1_armhf.deb ...
Unpacking libpython-dev:armhf (2.7.9-1) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.9-2+deb8u1_armhf.deb ...
Unpacking python2.7-dev (2.7.9-2+deb8u1) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.9-1_armhf.deb ...
Unpacking python-dev (2.7.9-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpython2.7-dev:armhf (2.7.9-2+deb8u1) ...
Setting up libpython-dev:armhf (2.7.9-1) ...
Setting up python2.7-dev (2.7.9-2+deb8u1) ...
Setting up python-dev (2.7.9-1) ...
pi@raspberrypi:~ $ cd /tmp/
pi@raspberrypi:/tmp $ git clone https://github.com/mjg59/python-broadlink
Cloning into 'python-broadlink'...
remote: Counting objects: 142, done.
remote: Total 142 (delta 0), reused 0 (delta 0), pack-reused 142
Receiving objects: 100% (142/142), 27.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (62/62), done.
Checking connectivity... done.
pi@raspberrypi:/tmp $ cd python-broadlink
pi@raspberrypi:/tmp/python-broadlink $ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating broadlink.egg-info
writing requirements to broadlink.egg-info/requires.txt
writing broadlink.egg-info/PKG-INFO
writing top-level names to broadlink.egg-info/top_level.txt
writing dependency_links to broadlink.egg-info/dependency_links.txt
writing manifest file 'broadlink.egg-info/SOURCES.txt'
reading manifest file 'broadlink.egg-info/SOURCES.txt'
writing manifest file 'broadlink.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/broadlink
copying broadlink/init.py -> build/lib.linux-armv7l-2.7/broadlink
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/broadlink
copying build/lib.linux-armv7l-2.7/broadlink/init.py -> build/bdist.linux-armv7l/egg/broadlink
byte-compiling build/bdist.linux-armv7l/egg/broadlink/init.py to init.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/not-zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying broadlink.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
creating dist
creating 'dist/broadlink-0.3-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing broadlink-0.3-py2.7.egg
creating /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg
Extracting broadlink-0.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding broadlink 0.3 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg
Processing dependencies for broadlink==0.3
Searching for pycrypto==2.6.1
Reading https://pypi.python.org/simple/pycrypto/
Best match: pycrypto 2.6.1
Downloading https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda
Processing pycrypto-2.6.1.tar.gz
Writing /tmp/easy_install-2Mrn07/pycrypto-2.6.1/setup.cfg
Running pycrypto-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2Mrn07/pycrypto-2.6.1/egg-dist-tmp-V1nvyE
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
zip_safe flag not set; analyzing archive contents...
Adding pycrypto 2.6.1 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/pycrypto-2.6.1-py2.7-linux-armv7l.egg
Finished processing dependencies for broadlink==0.3
pi@raspberrypi:/tmp/python-broadlink $ cd /home/pi
pi@raspberrypi:~ $ git clone https://github.com/NightRang3r/broadlink-http-rest
Cloning into 'broadlink-http-rest'...
remote: Counting objects: 56, done.
remote: Total 56 (delta 0), reused 0 (delta 0), pack-reused 56
Unpacking objects: 100% (56/56), done.
Checking connectivity... done.
pi@raspberrypi:~ $ sudo pip install netaddr
Downloading/unpacking netaddr
Downloading netaddr-0.7.19-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Installing collected packages: netaddr
Successfully installed netaddr
Cleaning up...
pi@raspberrypi:~ $ sudo pip install configparser
Downloading/unpacking configparser
Downloading configparser-3.5.0.tar.gz
Running setup.py (path:/tmp/pip-build-Az4Tuw/configparser/setup.py) egg_info for package configparser

Installing collected packages: configparser
Running setup.py install for configparser

Skipping installation of /usr/local/lib/python2.7/dist-packages/backports/__init__.py (namespace package)
Installing /usr/local/lib/python2.7/dist-packages/configparser-3.5.0-nspkg.pth

Successfully installed configparser
Cleaning up...
pi@raspberrypi:~ $ nano broadlink-http-rest.service
pi@raspberrypi:~ $ sudo mv broadlink-http-rest.service /etc/systemd/system
pi@raspberrypi:~ $ sudo systemctl daemon-reload
pi@raspberrypi:~ $ sudo systemctl enable broadlink-http-rest.service
Created symlink from /etc/systemd/system/multi-user.target.wants/broadlink-http-rest.service to /etc/systemd/system/broadlink-http-rest.service.
pi@raspberrypi:~ $ sudo systemctl start broadlink-http-rest.service
pi@raspberrypi:~ $ sudo systemctl status broadlink-http-rest.service
โ— broadlink-http-rest.service - broadlink-http-rest
Loaded: loaded (/etc/systemd/system/broadlink-http-rest.service; enabled)
Active: failed (Result: exit-code) since Wed 2017-04-05 11:20:21 UTC; 4s ago
Process: 2946 ExecStart=/usr/bin/python /home/pi/broadlink-http-rest/server.py (code=exited, status=1/FAILURE)
Main PID: 2946 (code=exited, status=1/FAILURE)

Apr 05 11:20:21 raspberrypi python[2946]: self.server_bind()
Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/BaseHTTPS...d
Apr 05 11:20:21 raspberrypi python[2946]: SocketServer.TCPServer.server_bind...)
Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/SocketSer...d
Apr 05 11:20:21 raspberrypi python[2946]: self.socket.bind(self.server_address)
Apr 05 11:20:21 raspberrypi python[2946]: File "/usr/lib/python2.7/socket.py...h
Apr 05 11:20:21 raspberrypi python[2946]: return getattr(self._sock,name)(*args)
Apr 05 11:20:21 raspberrypi python[2946]: socket.error: [Errno 98] Address a...e
Apr 05 11:20:21 raspberrypi systemd[1]: broadlink-http-rest.service: main pr...E
Apr 05 11:20:21 raspberrypi systemd[1]: Unit broadlink-http-rest.service ent....
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $ `

consecutive commands issue

Hi,
There is an issue with the new version (didn't happen in the script before the update last month),
when sending two commands one after the other, many times the seconds one don't work (I encounter it especially with RF commands for lights switches).

Was there any timeout that was removed from the script in the new version? usually such things happen when the commands are sent too close to each other...
When I try with the old script it's working good.

Copy an paste commands differnt devices

Hello! When I try to copy a command from a previously recognized device "1" to the list of commands of the device "2" nothing happens.
I get {" ok ":" Sent: ac2 "} but the device does not respond at all. What can be done?
I can not train each device separately, because I disassembled it and left only the control board to reduce its size.
thank

Multiple RM Pro

How to add more than 1 RM Pro in the settings.ini?
How to send command to only 1 of the RM Pro declared in settings.ini?

No response at random times

When I hit a button multiple times rapidly, and push a new command before the old one completes, I get multiple outputs. For example, if I hit a button 3 times very fast, I might get 6 commands sent rather than 3. Operator Error.

I'm currently having an issue where the server seems to not be responsive. Is there some way to debug this? I have to kill it and restart it constantly

RM3 Mini support?

hi,
i was able to learn a command with RM3 Mini, but everytime i try to send it I get
"GET /sendcommand/lampon HTTP/1.1" 200 -
Failed
the Autodetect function recognized the mini as
[BroadlinkRM2]
IPAddress = 10.0.0.30
MACAddress = xx:xx
Device = 0x2737
Timeout = 10
Type = RM2

I've also tried changing device type to 0x27c2 which according to python-broadlink script is the identifier for RM3 Mini - didn't help though .

is it supposed to work with RM3 Mini as well?

Multiple RM support

Hi,

I have 3 BlackBeans and I would like to use all of them with a single instance running of the python server. As of now I have to run 3 instances. Could you extend your application so its usable for this szenario?

If you use the name of the device in the settings.ini for addressing each device, all broadlink devices could be accessed in that way:

http://localhost:8080/Broadlink1/getStatus/
http://localhost:8080/Broadlink2/getStatus/
http://localhost:8080/BroadlinkXYZ/getStatus/
http://localhost:8080/A1/temperature/
etc.

This would be great :)

AttributeError: rm instance has no attribute 'key'

getting temperature works. this is what i get trying to learn rf signals

Exception happened during processing of request from ('192.168.0.11', 38202)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 293, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "server.py", line 44, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "server.py", line 60, in do_GET
    self.messageHandler()
  File "server.py", line 121, in messageHandler
    result = learnCommand(commandName,deviceName)
  File "server.py", line 302, in learnCommand
    deviceKey = device.key
AttributeError: rm instance has no attribute 'key'

raspberry pi error log

Hello,

when i run the server.py,it report an error,

socket.error: [Errno 98] Address already in use

any suggestion regarding this issue?

pi@raspberrypi:~/broadlink/broadlink-http-rest $ sudo python server.pyTraceback (most recent call last):
  File "server.py", line 250, in <module>
    start()
  File "server.py", line 195, in start
    httpd = server_class(server_address, handler_class)
  File "/usr/lib/python2.7/SocketServer.py", line 420, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 434, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Duraflame?

[strike]Hey ... not really a code issue, more of a request for info from the community.

I just bought a Duraflame heater with remote and was going to control it with this project (actually my fork of this), but ... it records just fine, but playing back the code does nothing! Apparently, every time it sends the command, it records it differently!

I'm at a loss how this stupidly simple remote is fooling the system. There are no clocks or anything. I'm lost. What's recorded should work when played back![/strike]
Apparently the stock remote has better range than the rm3. It was a range/angle issue. Sorry

Could you please provide an example of how to make a simple Macro Command?

Hey all gurus, pretty noob here, please help! Based for the readme

Added simple Macro language Any Command can start with the word MACRO followed by a list of other commands. Each command will be done in order. You may repeat a command (useful for navigating menus) by putting a comma followed a repeat count after the command. For example, "right,5" will send the "right" command 5 time. You can use also use "sleep1", "sleep2", "sleep3", etc. to insert a pause. In this case, a comma is optional.

Could you please show an example of how to make a macro command? It confused me a bit.
I would like to open the curtain for about 10 seconds and send a stop curtain command, I've already learn the curtainopen and curtainstop, and where to "put" those macro with what syntax?
I try this code but looks like it won't work:

test = MACRO curtainopen,1 sleep10 curtainstop,1

Please help, thanks!

running issues

I use this api for control broadlink RM Pro but I got this error when i running.

this is my setting.
[General]
Timeout = 4
serverPort = 8080
serverAddress = 192.168.1.113

[Commands]

[LivingRoom]
IPAddress = 192.168.1.113
MACAddress = 34:EA:34:E8:2C:37
Device = 0x2737
Timeout = 10
Type = RM2

And this error.
Traceback (most recent call last):
File "/home/tpponmat/workspace/hive_os/broadlink-http-rest/server.py", line 524, in
serverParams = readSettingsFile()
File "/home/tpponmat/workspace/hive_os/broadlink-http-rest/server.py", line 499, in readSettingsFile
device.auth()
File "/usr/local/lib/python2.7/dist-packages/broadlink/init.py", line 228, in auth
response = self.send_packet(0x65, payload)
File "/usr/local/lib/python2.7/dist-packages/broadlink/init.py", line 305, in send_packet
response = self.cs.recvfrom(2048)
socket.timeout: timed out

sendCommand not working after migration

Hi,
I've installed your code cloning the git repo in a new machine running raspbian buster.

I've copied over my settings.ini file and installed all dependencies.

The server starts fine but, when I try to send a command, I get the following error

Exception happened during processing of request from ('192.168.1.10', 39708)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in init
self.handle()
File "server.py", line 44, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 60, in do_GET
self.messageHandler()
File "server.py", line 142, in messageHandler
result = sendCommand(commandName, deviceName)
File "server.py", line 238, in sendCommand
deviceKey = device.key
AttributeError: rm instance has no attribute 'key'

Can you please suggest what I could check?

Thanks!

Error: when I send request to the server I got an error:

The ip and mac address is correct.

Exception happened during processing of request from ('192.168.10.22', 63908)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 56, in do_GET
result = getTempRM()
File "server.py", line 177, in getTempRM
device = broadlink.rm((RMIPAddress, RMPort), RMMACAddress)
TypeError: init() takes exactly 4 arguments (3 given)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.