Netatmo Developer Homepage to create a new token and update the information in the Systems Manager Parameter Store.
I actually needed to do that regularly… and as I am always too busy and lazy… this resulted in multiple hours or days of “downtime” of the service… and the display was showing old data…
So, my clients (my family), was once again not able to use this properly…
As you can see, this is a “tiny” bit more complicated than before :-)
It took me a while (and a few /dev and prompts with Amazon Q Developer) to implement it.(If you want to know more about Q, watch this video…)
Now, if the AWS Lambda function that retrieves the data from Netatmo, will continue to fail with an 403 error.
If it does, it will now automatically start a Github Actions Workflow that is able to run a full “OAuth flow” using Playwright, simulating user actions in the OAuth flow!
My family is now happy as the data is always up to date on the physical display :-).
I finally do not need to update the tokens regularly manually anymore and the project “self-heals” once the tokens expire.
In addition, I also get my “own” history of the data retrieved from Netatmo which I can potentially analyze if I want to. I’m not doing it yet, but who knows? :-)
Everything that I’ve built so far is written in code, using Github Actions to deploy the required infrastructure.
The only things needed to be set up manually:
The code is not yet open source…
Would you be curious for me to make this aailable on Github?
Please let me know in the comments or reach out to me on LinkedIn!