Yes, I made a short video to show that for example refreshing the webpage will change the previously set channel to channel 15…
The Web log shows this error:
Oct 09 00:08:06 sera python[2084]: 2024-10-09 00:08:06,532 URL for ‘last_data’ raised and error: (401)
Oct 09 00:08:06 sera python[2084]: Reason: Unauthorized
Oct 09 00:08:06 sera python[2084]: 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’: ‘Tue, 08 Oct 2024 21:08:06 GMT’, ‘Content-Length’: ‘62’})
Oct 09 00:08:06 sera python[2084]: HTTP response body: {
Oct 09 00:08:06 sera python[2084]: “code”: “unauthorized”,
Oct 09 00:08:06 sera python[2084]: “message”: “unauthorized access”
Oct 09 00:08:06 sera python[2084]: }
Oct 09 00:08:06 sera python[2084]: Traceback (most recent call last):
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/mycodo/mycodo_flask/routes_general.py”, line 337, in last_data
Oct 09 00:08:06 sera python[2084]: data = query_string(
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/mycodo/utils/influx.py”, line 301, in query_string
Oct 09 00:08:06 sera python[2084]: ret_value = query_flux(
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/mycodo/utils/influx.py”, line 286, in query_flux
Oct 09 00:08:06 sera python[2084]: tables = client.query_api().query(query)
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/client/query_api.py”, line 203, in query
Oct 09 00:08:06 sera python[2084]: response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params),
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/service/query_service.py”, line 285, in post_query
Oct 09 00:08:06 sera python[2084]: (data) = self.post_query_with_http_info(**kwargs) # noqa: E501
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/service/query_service.py”, line 311, in post_query_with_http_info
Oct 09 00:08:06 sera python[2084]: return self.api_client.call_api(
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 343, in call_api
Oct 09 00:08:06 sera python[2084]: return self.__call_api(resource_path, method,
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 121, in __call_api
Oct 09 00:08:06 sera python[2084]: self._signin(resource_path=resource_path)
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 657, in _signin
Oct 09 00:08:06 sera python[2084]: http_info = SigninService(self).post_signin_with_http_info()
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/service/signin_service.py”, line 74, in post_signin_with_http_info
Oct 09 00:08:06 sera python[2084]: return self.api_client.call_api(
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 343, in call_api
Oct 09 00:08:06 sera python[2084]: return self.__call_api(resource_path, method,
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 173, in __call_api
Oct 09 00:08:06 sera python[2084]: response_data = self.request(
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/api_client.py”, line 388, in request
Oct 09 00:08:06 sera python[2084]: return self.rest_client.POST(url,
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/rest.py”, line 311, in POST
Oct 09 00:08:06 sera python[2084]: return self.request(“POST”, url,
Oct 09 00:08:06 sera python[2084]: File “/opt/Mycodo/env/lib/python3.9/site-packages/influxdb_client/_sync/rest.py”, line 261, in request
Oct 09 00:08:06 sera python[2084]: raise ApiException(http_resp=r)
Oct 09 00:08:06 sera python[2084]: influxdb_client.rest.ApiException: (401)
Oct 09 00:08:06 sera python[2084]: Reason: Unauthorized
Oct 09 00:08:06 sera python[2084]: 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’: ‘Tue, 08 Oct 2024 21:08:06 GMT’, ‘Content-Length’: ‘62’})
Oct 09 00:08:06 sera python[2084]: HTTP response body: {
Oct 09 00:08:06 sera python[2084]: “code”: “unauthorized”,
Oct 09 00:08:06 sera python[2084]: “message”: “unauthorized access”
Oct 09 00:08:06 sera python[2084]: }
I’m not sure what action causes the error as I’m not able to reproduce it consistently, tried deleting and recreating the edge trigger functions/input/custom input several times, only on rare occasions the error is logged…