That did most the trick, thank you. Some dependencies were missing. paho-mqtt is back up but inputs that use it arenât saving data. The Web log is filling up with:
Aug 19 20:46:09 grow python[4671]: influxdb_client.rest.ApiException: (401)
Aug 19 20:46:09 grow python[4671]: Reason: Unauthorized
Aug 19 20:46:09 grow python[4671]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 20 Aug 2025 03:46:09 GMT', 'Content-Length': '55'})
Aug 19 20:46:09 grow python[4671]: HTTP response body: b'{"code":"unauthorized","message":"unauthorized access"}'
Aug 19 20:46:10 grow python[4671]: 2025-08-19 20:46:10,620 URL for 'last_data' raised and error: (401)
Aug 19 20:46:10 grow python[4671]: Reason: Unauthorized
Aug 19 20:46:10 grow python[4671]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 20 Aug 2025 03:46:10 GMT', 'Content-Length': '55'})
Aug 19 20:46:10 grow python[4671]: HTTP response body: b'{"code":"unauthorized","message":"unauthorized access"}'
Aug 19 20:46:10 grow python[4671]: Traceback (most recent call last):
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/mycodo_flask/routes_general.py", line 337, in last_data
Aug 19 20:46:10 grow python[4671]: data = query_string(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/utils/influx.py", line 301, in query_string
Aug 19 20:46:10 grow python[4671]: ret_value = query_flux(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/utils/influx.py", line 286, in query_flux
Aug 19 20:46:10 grow python[4671]: tables = client.query_api().query(query)
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/client/query_api.py", line 203, in query
Aug 19 20:46:10 grow python[4671]: response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params),
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/service/query_service.py", line 285, in post_query
Aug 19 20:46:10 grow python[4671]: (data) = self.post_query_with_http_info(**kwargs) # noqa: E501
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/service/query_service.py", line 311, in post_query_with_http_info
Aug 19 20:46:10 grow python[4671]: return self.api_client.call_api(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 343, in call_api
Aug 19 20:46:10 grow python[4671]: return self.__call_api(resource_path, method,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 173, in __call_api
Aug 19 20:46:10 grow python[4671]: response_data = self.request(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 388, in request
Aug 19 20:46:10 grow python[4671]: return self.rest_client.POST(url,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/rest.py", line 311, in POST
Aug 19 20:46:10 grow python[4671]: return self.request("POST", url,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/rest.py", line 261, in request
Aug 19 20:46:10 grow python[4671]: raise ApiException(http_resp=r)
Aug 19 20:46:10 grow python[4671]: influxdb_client.rest.ApiException: (401)
Aug 19 20:46:10 grow python[4671]: Reason: Unauthorized
Aug 19 20:46:10 grow python[4671]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 20 Aug 2025 03:46:10 GMT', 'Content-Length': '55'})
Aug 19 20:46:10 grow python[4671]: HTTP response body: b'{"code":"unauthorized","message":"unauthorized access"}'
Aug 19 20:46:10 grow python[4671]: 2025-08-19 20:46:10,649 URL for 'last_data' raised and error: (401)
Aug 19 20:46:10 grow python[4671]: Reason: Unauthorized
Aug 19 20:46:10 grow python[4671]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 20 Aug 2025 03:46:10 GMT', 'Content-Length': '55'})
Aug 19 20:46:10 grow python[4671]: HTTP response body: b'{"code":"unauthorized","message":"unauthorized access"}'
Aug 19 20:46:10 grow python[4671]: Traceback (most recent call last):
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/mycodo_flask/routes_general.py", line 337, in last_data
Aug 19 20:46:10 grow python[4671]: data = query_string(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/utils/influx.py", line 301, in query_string
Aug 19 20:46:10 grow python[4671]: ret_value = query_flux(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo.bullseye/mycodo/utils/influx.py", line 286, in query_flux
Aug 19 20:46:10 grow python[4671]: tables = client.query_api().query(query)
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/client/query_api.py", line 203, in query
Aug 19 20:46:10 grow python[4671]: response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params),
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/service/query_service.py", line 285, in post_query
Aug 19 20:46:10 grow python[4671]: (data) = self.post_query_with_http_info(**kwargs) # noqa: E501
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/service/query_service.py", line 311, in post_query_with_http_info
Aug 19 20:46:10 grow python[4671]: return self.api_client.call_api(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 343, in call_api
Aug 19 20:46:10 grow python[4671]: return self.__call_api(resource_path, method,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 173, in __call_api
Aug 19 20:46:10 grow python[4671]: response_data = self.request(
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/api_client.py", line 388, in request
Aug 19 20:46:10 grow python[4671]: return self.rest_client.POST(url,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/rest.py", line 311, in POST
Aug 19 20:46:10 grow python[4671]: return self.request("POST", url,
Aug 19 20:46:10 grow python[4671]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 19 20:46:10 grow python[4671]: File "/opt/Mycodo/env/lib/python3.11/site-packages/influxdb_client/_sync/rest.py", line 261, in request
Aug 19 20:46:10 grow python[4671]: raise ApiException(http_resp=r)
Aug 19 20:46:10 grow python[4671]: influxdb_client.rest.ApiException: (401)
Aug 19 20:46:10 grow python[4671]: Reason: Unauthorized
Aug 19 20:46:10 grow python[4671]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.8', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Wed, 20 Aug 2025 03:46:10 GMT', 'Content-Length': '55'})
Aug 19 20:46:10 grow python[4671]: HTTP response body: b'{"code":"unauthorized","message":"unauthorized access"}'