Open kevin-kling opened 12 months ago
Have you tried to execute it in the Swagger UI at http://192.168.11.90:8777/api/v1/? (replace IP address by yours)
Thank you for your help :) Swagger UI opens - but when I try to input the value it gives me a red sign during mouse over - so I can't input the id. Btw this happens in every input field in SwaggerUI - ID, name, ....
Which version of HtREST are you using? Looks like a problem with Flask ...
I'm using HTRest 0.1.11
I updatet my packages: No I got this error again which I initally fixed using flask 2.3.0:
2023-10-06 10:11:23,301 INFO [htrest.app|create_app]: open connection to heat pump (<htheatpump.htheatpump.HtHeatpump object at 0x7646ecb8>)
2023-10-06 10:11:23,356 INFO [htrest.app|create_app]: successfully connected to heat pump #140491
2023-10-06 10:11:23,422 INFO [htrest.app|create_app]: software version = 3.0.20 (8744)
2023-10-06 10:11:23,450 INFO [htrest.app|create_app]: *** created Flask app <Flask 'htrest.app'> with config <Config {'DEBUG': False, 'TESTING': False, 'PROPAGATE_EXCEPTIONS': None, 'SECRET_KEY': None, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(days=31), 'USE_X_SENDFILE': False, 'SERVER_NAME': None, 'APPLICATION_ROOT': '/', 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_SECURE': False, 'SESSION_COOKIE_SAMESITE': None, 'SESSION_REFRESH_EACH_REQUEST': True, 'MAX_CONTENT_LENGTH': None, 'SEND_FILE_MAX_AGE_DEFAULT': None, 'TRAP_BAD_REQUEST_ERRORS': None, 'TRAP_HTTP_EXCEPTIONS': False, 'EXPLAIN_TEMPLATE_LOADING': False, 'PREFERRED_URL_SCHEME': 'http', 'TEMPLATES_AUTO_RELOAD': None, 'MAX_COOKIE_SIZE': 4093, 'SWAGGER_UI_DOC_EXPANSION': 'list', 'RESTX_VALIDATE': True, 'RESTX_MASK_SWAGGER': False, 'ERROR_404_HELP': False, 'BUNDLE_ERRORS': True}>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/flask_restx-1.1.0-py3.9.egg/flask_restx/api.py", line 18, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/htrest", line 33, in
This fix seems not to work anymore
Even though, the following packages are installed: Flask==3.0.0 Flask-BasicAuth==0.2.0 Flask-Helper==2.1.1 Flask-Migrate==4.0.5 Flask-RESTful==0.3.10 flask-restx==1.1.0 Flask-Scaffold==0.5.1 Flask-Script==2.0.6 Flask-SQLAlchemy==3.1.1
Have you tried any of the sollutions here? https://stackoverflow.com/questions/67496857/cannot-import-name-endpoint-from-view-func-from-flask-helpers-in-python
Maybe "pip install Flask-RESTful==0.3.9" will help?!
I already tried these workarounds but not really working. I tried to flask.scaffold working but it seems really old having a look on the dependecies.
Found no Flask-Restful version that would be working
Hi, thank you very much for writing this tool. Makes my old heatpump kind of smart :)
Works great - I'm only having troubles reading and possibly writing (not tested yet) the timeprogram using: /api/v1/timeprog/
Error message: { "message": "get() got an unexpected keyword argument 'id'" }
I'm not really sure how to troubleshoot that issue.
If someone has a solution I would be really happy because I'm trying to let the heatpump run when the PV produces enought energy - which is not working without these commands :)
BTW: Needed to use flask version 2.3.3 because the newest version is making troubles as well. Maybe the error is connected to that.