Git Product home page Git Product logo

rmcontrol's People

Contributors

ericmagnuson 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

Watchers

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

rmcontrol's Issues

Issue linking with Homebridge

@ericmagnuson - thanks for sharing your RM controller plugin! I'm very excited to use this instead of the alternate Android+VM solution.

I am running into some issues linking the RM control with Homebridge. I'm able to get the commands through: even though I'm defining the http_method as POST in the homebridge config file, they are showing up as "GET" on the RM controller. See below:

Homebridge config file:

"accessory": "HttpMulti",
"name": "Projector Screen",
"deviceType": "switch",
"on_url": "http://127.0.0.1:5000/commands/Screen%20Up",
"off_url": "http://127.0.0.1:5000/commands/Screen%20Down",
"http_method": "POST"

Homebridge status info when toggling the switch from HomeKit:

[12/20/2016, 11:26:36 PM] [Projector Screen] Set CurrentState: 1
[12/20/2016, 11:26:36 PM] [Projector Screen] Turning On
[12/20/2016, 11:26:36 PM] [Projector Screen] on=http://127.0.0.1:5000/commands/Screen%20Up off=http://127.0.0.1:5000/commands/Screen%20Down method=undefined
[12/20/2016, 11:26:36 PM] [Projector Screen] Error getting state (status code undefined): null
[12/20/2016, 11:26:36 PM] [Projector Screen] Success turning on

Rmcontrol status info for this command:

127.0.0.1 - - [20/Dec/2016 23:26:36] "GET /commands/Screen%20Up HTTP/1.1" 405 -

Which does not appear to do anything with the Broadlink device.

For comparison, a successful command from the webpage interface with the rmcontroller gives:

127.0.0.1 - - [20/Dec/2016 23:28:04] "POST /commands/Screen%20Up HTTP/1.1" 500 -

Which does successfully send a command through the Broadlink device.

Impressive work so far! I'm looking forward to getting the last couple of issues worked out!

config error

I seem to be doing something wrong in the config file.

It seems to keep throwing an error any chance you could point out where I'm going wrong?

thanks in advance

"accessories": [{
"accessory": "HttpMulti",
"name": "Light",
"on_url": "http://127.0.0.1:5000/POST /commands/living%20room%20lights%20on HTTP/1.1",
"off_url": "http://127.0.0.1:5000/POST /commands/living%20room%20lights%20off HTTP/1.1",
"status_url": "http://127.0.0.1:5000/status%28light%29",
"deviceType": "light"
}

Web not responding when adding code

When adding a command by pressing the "+" button, there is an error in the console.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/rmcontrol/rmcontrol/__init__.py", line 146, in create
    code = device.check_data()
  File "/usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg/broadlink/__init__.py", line 440, in check_data
    response = self.send_packet(0x6a, packet)
  File "/usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg/broadlink/__init__.py", line 250, in send_packet
    response = self.cs.recvfrom(1024)
timeout: timed out

Any clue to fix this? Thank you!

Issue with export FLASK_APP=rmcontrol; python -m flask initdb

pi@hassbian:/home/rmcontrol $ export FLASK_APP=rmcontrol; python -m flask initdbTraceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/main.py", line 15, in
main(as_module=True)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/cli.py", line 507, in main
cli.main(args=args, prog_name=name)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/cli.py", line 374, in main
return AppGroup.main(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/cli.py", line 251, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "rmcontrol/init.py", line 44, in initdb_command
init_db()
File "rmcontrol/init.py", line 32, in init_db
db = get_db()
File "rmcontrol/init.py", line 65, in get_db
g.sqlite_db = connect_db()
File "rmcontrol/init.py", line 53, in connect_db
db = sqlite3.connect(os.path.join(app.root_path, 'database/rmcontrol.db'))
sqlite3.OperationalError: unable to open database file

Thanks..

acdeMac-mini:~ mac$ export FLASK_APP=rmcontrol; python -m flask initdb
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 111, in _get_module_details
import(mod_name) # Do not catch exceptions initializing package
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Flask-0.12-py2.7.egg/flask/init.py", line 17, in
from werkzeug.exceptions import abort
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/init.py", line 152, in
import('werkzeug.exceptions')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/exceptions.py", line 71, in
from werkzeug.wrappers import Response
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/wrappers.py", line 26, in
from werkzeug.http import HTTP_STATUS_CODES,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/http.py", line 28, in
from urllib.request import parse_http_list as _parse_list_header
ImportError: No module named request

Thanks!

Ive been looking @ the RM for a while now for using with Homebridge, and with this I can buy it.

So does this do RF as well as IR, if so I may have brought those Arduino kits for nothing :(

Python-dev had to be installed

When executing

pip install pycrypto

there was an error that prevented me from getting pycrypto installed. Something about

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. src/MD2.c:31:20: fatal error: Python.h: No such file or directory

I searched the net for a reason why and it was suggested that I had to install Python-dev

sudo apt-get install python-dev

after that, I ran pip install pycrypto again and it worked.

Error: No such command "initdb".

Hi I'm really hoping to get this working but having some issues when I get to....
export FLASK_APP=rmcontrol; python -m flask initdb

I keep getting the Error: No such command "initdb".

I've done a clean install of everything but obviously have missed something.

hope someone can point me in the right direction! cheers Keith

Error when using GET /

Hi Eric,

After sudo python run.py , I get the following when I load the webpage, and enter GET / , and then click on the + sign. Any ideas what is wrong?

pi@hassbian:/home/rmcontrol $ sudo python run.py

  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
    192.168.0.100 - - [18/Feb/2017 17:18:50] "GET / HTTP/1.1" 200 -
    192.168.0.100 - - [18/Feb/2017 17:18:50] "GET /static/app.css HTTP/1.1" 304 -
    192.168.0.100 - - [18/Feb/2017 17:18:50] "GET /static/app.js HTTP/1.1" 304 -
    192.168.0.100 - - [18/Feb/2017 17:18:50] "GET /commands HTTP/1.1" 200 -
    ^C----------------------------------------
    Exception happened during processing of request from ('192.168.0.100', 59171)
    Traceback (most recent call last):
    File "/usr/lib/python2.7/SocketServer.py", line 295, 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 "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/serving.py", line 228, in handle
    rv = BaseHTTPRequestHandler.handle(self)
    File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
    File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/serving.py", line 263, in handle_one_request
    return self.run_wsgi()
    File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/serving.py", line 205, in run_wsgi
    execute(self.server.app)
    File "/usr/local/lib/python2.7/dist-packages/Werkzeug-0.11.15-py2.7.egg/werkzeug/serving.py", line 193, in execute
    application_iter = app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1994, in call
    return self.wsgi_app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/lib/python2.7/dist-packages/Flask-0.12-py2.7.egg/flask/app.py", line 1598, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/home/rmcontrol/rmcontrol/init.py", line 142, in create
    device = get_device()
    File "/home/rmcontrol/rmcontrol/init.py", line 85, in get_device
    device.discover()
    File "/usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg/broadlink/init.py", line 477, in discover
    dev = discover()
    File "/usr/local/lib/python2.7/dist-packages/broadlink-0.3-py2.7.egg/broadlink/init.py", line 110, in discover
    response = cs.recvfrom(1024)
    KeyboardInterrupt

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.