DewGew / DZGA-Flask

Domoticz Google Assisting using Flask
GNU General Public License v3.0
8 stars 4 forks source link

Remove check if ssl files exist #41

Closed DewGew closed 7 months ago

Xenomes commented 7 months ago

Hi, thanks for the update. I've updated the Git. However, when I start it, I can't log in anymore. The CLI log only reports two lines:

2023-11-18 21:56:23 Smarthome server has started.
2023-11-18 21:56:23 Running with ssl

To regain access, I updated the db usessl to 0.

DewGew commented 7 months ago

Did you try with https instead of http?

Xenomes commented 7 months ago

Yes i did, even with and without / login. Tomorrow i will test it outside the docker container.

Xenomes commented 7 months ago

Outside of the Docker container is not working for me. I will try a clean virtual install later today.

P.S. There are some typos in the wiki installation guide. https://raw.githubusercontent.com/DewGew/DZGA-Flask/development/scripts/install.sh source DZGA-Flask/env/bin/activate At the uninstall Flask to flask

Xenomes commented 7 months ago

On a clean install, running in the Python venv, SSL works. Running it in Docker (Dockerfile) results in an error:

Traceback (most recent call last):
  File "/smarthome.py", line 428, in <module>
    app.run('0.0.0.0', port=8181, debug=True, ssl_context=context)
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 889, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "/usr/local/lib/python3.12/site-packages/werkzeug/serving.py", line 1075, in run_simple
    srv = make_server(
          ^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/werkzeug/serving.py", line 915, in make_server
    return ThreadedWSGIServer(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/werkzeug/serving.py", line 790, in __init__
    ssl_context = load_ssl_context(*ssl_context)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/werkzeug/serving.py", line 633, in load_ssl_context
    ctx.load_cert_chain(cert_file, pkey_file)
FileNotFoundError: [Errno 2] No such file or directory
DewGew commented 7 months ago

Ok im not using docker. I cant help you there. I hope someone else knows.

Xenomes commented 7 months ago

Okay, i was able to run/start it as a services on my live system.