Awesome
Tesla / Huawei Fusionsolar Energy Optimizer
This genezio app will match the energy that a huawei fusionsolar inverter generates from solar panels to a tesla, located on the same location, so that the tesla does not use more energy than what is being generated by the solar panels
Deploymenmt instruction steps:
- Copy config/default.json.template to config/default.json
- Enter your information in the default.json file
- There are multiple ways to get a tesla refresh token. I used this one: https://chrome.google.com/webstore/detail/tesla-access-token-genera/kokkedfblmfbngojkeaepekpidghjgag
- fusionsolarCredentials should be your user / pass that you use to sign in to https://eu5.fusionsolar.huawei.com/
- Once signed in, go to the details page where you see the real-time data, and copy the stationID from the URL. Should be something like: https://region04eu5.fusionsolar.huawei.com/pvmswebsite/assets/build/index.html#/view/station/NE=12345678/overview and you need to get the "NE-12345678" ID and save it in the config file
- solarLocation should be the location of your charging point
- MONGO_DB_URI is a mongodb connection URI where we store cached tokens and cookies (more bellow)
- Create a https://genez.io/ account, install the CLI tool: https://docs.genez.io/genezio-documentation/getting-started/install-the-genezio-cli and sign in
- Run "genezio deploy" in the current folder
- Enjoy!
How to get that MONGO_DB_URI:
- Go to https://www.mongodb.com/
- Create an account (if you don't already have one)
- Create an organization (if one was not automatically created)
- Create a project (if one was not automatically created)
- Create a database (M0, free is enough). This will create a cluster, and you will enter a user/password at some point
- Under Deployment / Security / Network Access click "Add IP Address" and choose to Allow Access From Anywhere
- Under Deployment / Database section, you will see our cluster. Click "Connect" and choose "connect your application"
- The connection string is the MONGO_DB_URI you have to write back to the "default.json" file. Just remember to enter your password.