AllskyTeam / allsky-modules

User modules for allsky
MIT License
17 stars 17 forks source link

Limited Logging in InfluxDB Export Module #130

Closed starhopper-de closed 1 month ago

starhopper-de commented 2 months ago

Describe the bug I cannot write data in my InfluxDB (v2.7.6)

To Reproduce Simply leave the field InfluxDB Access Token blank results in:

Apr 23 20:53:59 allsky allskperiodic[6440]: The batch item wasn't processed successfully because: (401)
Apr 23 20:53:59 allsky allskperiodic[6440]: Reason: Unauthorized
Apr 23 20:53:59 allsky allskperiodic[6440]: HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.6', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Tue, 23 Apr 2024 18:54:03 GMT', 'Content-Length': '55'})
Apr 23 20:53:59 allsky allskperiodic[6440]: HTTP response body: {"code":"unauthorized","message":"unauthorized access"}
Apr 23 20:53:59 allsky allskperiodic[6440]: INFO: PI Status Data Written
Apr 23 20:53:59 allsky allskperiodic[6440]: INFO: Turning Fans OFF
Apr 23 20:53:59 allsky allskperiodic[6440]: INFO: CPU Temp is 32.6 and lower then set limit of 60, Fans are Off via fan pin 14
Apr 23 20:53:59 allsky allskperiodic[6440]: INFO: Rain State: Its Not Raining.......

Inserting my API Token results in no log at all?

Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: PI Status Data Written
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: Turning Fans OFF
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: CPU Temp is 33.1 and lower then set limit of 60, Fans are Off via fan pin 14
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: Rain State: Its Not Raining
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: Temperature below forced level 15
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: Turning Heater on using pin 4
Apr 23 20:55:01 allsky allskperiodic[6542]: INFO: Sensor SHT31 read. Temperature 8.0 Humidity 62.57 Relative Humidity None Dew Point 1.3 Heat Index -16.98 Pressure None Altitude None

needless to say, I saved my changes in the module manager. A reboot does not change this behavour.

Allsky Information:



 - Allsky Version:
 - Pi model: 4

**Sensors**
If using sensors please outline the sensors being used, include i2c addresses if applicable

**Additional context**
Add any other context about the problem here.
![Bildschirmfoto vom 2024-04-23 20-39-50](https://github.com/AllskyTeam/allsky-modules/assets/44210083/61850d96-b281-4a2f-98bc-3339fe483a53)
Alex-developer commented 1 month ago

You can only use numeric values, neither of the values you have added are numeric. Try adding a numeric value.

I have just tried it with AS_GAIN and its working fine for me