Closed QuiiBz closed 1 year ago
Found a solution by using command
instead of environment
, it seems like the environment variables are not working:
command:
- '-i'
- 'clientid'
- '-s'
- 'clientsecret
- '-u'
- 'username'
- '-p'
- 'password'
I can't reproduce the issue. I have the netatmo-exporter running locally in a Docker container configured using environment variables and it works fine.
Even with your configuration copy&pasted it seems to pick up the configuration parameters fine.
Could you check which version of the netatmo-exporter you are using? Maybe it's an old image.
I'm experiencing the same.
However for me no workarounds work. I've tried settings in environment
, in env_file
or as command
. I receive with all attempts the same error.
I've reset client id/client secret & changed my Netatmo Password, still no luck.
It worked for a couple of days (eg Sunday until today morning) but things went stopped working shortly after the raspberry pi crashed the exporter was running on as a Docker Compose based Container.
Version running here is 1.4.0 from ghcr.io (tested with latest
too).
Same thing happens when going with the Binaries provided as Releases (which are named incorrectly as it isn't really a "bz2" archive):
# ./netatmo-exporter-1.4.0-arm64.bz2 -i <client-id> -s <client-secret> -u <email> -p <password>
INFO Login as <email>
FATA Error creating client: oauth2: cannot fetch token: 400
Response: {"error":"invalid_client"}
I found - at least for me - the fix. And it's stupid.
The Application on Netatmo Developer Portal got disabled for some reason. I cannot really tell why this happened - changes don't seem to be exposed to that level - but after enabling it again things are just fine.
which are named incorrectly as it isn't really a "bz2" archive
Checked that yesterday and the arm64 binary really was not compressed. This is fixed now.
I'm inclined to close this issue. For me, it looks like both occurrences were just wrong credentials.
My initial issue wasn't due to wrong credentials, as moving from environment
to command
resolved the issue.
I don't have the bandwidth right now to check the version of the Docker image I was using, but I always use the latest available. Also, it's running on a Raspberry PI (so arm64).
@QuiiBz I can keep it open, but like already commented, I was not able to reproduce the issue you had with the exporter not being able to read the values from environment. Your use-case of using Docker on arm64 is close to my own, so I wondered if maybe the version would be different.
Here's the id of the image I have locally: 83db35395031
@QuiiBz Could you look for the "digest" of the image instead? It's part of the output when you do docker inspect <imagename/id>
I think its this part?
"RepoDigests": [
"xperimental/netatmo-exporter@sha256:7ee132fff9d19b91084a21ac6347d563ceb72358a26f81b4d9fe4009d8d2f4c7"
],
@QuiiBz I have tested with the image you posted and did not find an issue in the exporter picking up the environment variables.
Looking at your docker-compose.yml
again I had an idea, though: I always assumed the single-quotes around the values were just for demonstrating which value you put there. But if you actually put single-quotes around the values in the docker-compose file then these quotes will be passed on with the value as there is no quoting needed in the file. And if the exporter then tries to use 'value'
instead of value
for authentication this will lead to an error.
Is this maybe what happened?
@QuiiBz Have you checked the idea from the last comment and can confirm that this was the original issue?
I’ll be back home in a week and will verify this, but it seems plausible.
@QuiiBz Any update on this?
Thanks for the reminder. After removing the quotes, it seems like it's working fine!
Hi, I have an error when running this exporter. I created an app in Netatmo developer portal, copied the client and secret id, and copied my username and password and I still get this "invalid_client" error.
The credentials are the right ones, I checked multiple times. I also tried to create another app and activate/deactivate the app, but still had the same error.
Here's the full docker-compose service: