-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with export FLASK_APP=rmcontrol; python -m flask initdb #8
Comments
By the way, I checked this folder and there isn't a rmcontrol.db file. pi@hassbian:/home/rmcontrol/rmcontrol/database $ ls Maybe I something else didn't work and this database hadn't been created? |
I had some breakthrough, but it still isn't working or maybe I'm not understanding how it works. Anyway, I am running this on a Raspberry Pi. So the default user is pi. But when installing, I think most of the directories etc belong to root. So tried to chown -R pi:pi /home/rmcontrol/* and then tried the export FLASK_APP=rmcontrol; python -m flask initdb and this time it said the database was created. but now when I try to run the script, I can get to the webpage, but I don't see anything happening. How do I do a simple test to know if everything is working as it should? |
Ahh, good call on the permissions. If you see the "New command name", everything should be running correctly. Enter a name for your command, click the "+" sign, and then fire the remote toward your RM to learn the command (you will have 5 seconds after you click the "+" sign to fire the remote command). If the command was successfully learned, you will see it appear in the list above. Here's mine for example. I apologize for the back usability. I wrote the front-end pretty quickly, and it definitely needs improvement. Note: RM Control won't load commands from the official eControl app — you will have to teach RM Control all of the commands you'd like to use. |
@ericmagnuson thanks for creating this script though! Really useful now that I got to understand how to use it more. I have a question: How do you "patch" using the front end web ui? I understand how to enter the command and capture the remote code, as well as firing the code by clicking on a saved command. I also know how to delete an existing command, but there doesn't seem to be an easy way to "update/patch" an existing command and remote code? Also one last question, is there a limit to the code length? I keep getting errors from my RF remote, but no issues with a TV remote using IR. No problem capturing the code...just errors appear when firing the code already saved in the database. |
@luketoh The patch API method hasn't yet been integrated on the front-end. That's high on the to-do list, though! AFAIK, there is no limit to the code length. What error do you see in the console of the web app when you try to fire an RF code? |
@ericmagnuson @luketoh I'm a little confuse, what should I be doing after ~ $ I ran
|
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
The text was updated successfully, but these errors were encountered: