jasonacox / Powerwall-Dashboard

Grafana Monitoring Dashboard for Tesla Solar and Powerwall Systems
MIT License
303 stars 66 forks source link

V2.10.0 - Docker Compose and Container Upgrades #374

Closed jasonacox closed 1 year ago

jasonacox commented 1 year ago

v2.10.0 - Updates

Docker Compose Config Improvements

Upgrade Containers

Related:

mcbirse commented 1 year ago

Hi Jason,

I have added commits with the proposed changes for powerwall.yml (similar to #366) which include:

Also:

Please review, and happy for you to modify as you see fit, or let me know if you see any issues with the changes.

jasonacox commented 1 year ago

GREAT additions @mcbirse! Thank you! 🙏 I'm going to start testing this before we merge...

First pass of verify.sh after upgrade.sh:

image
jasonacox commented 1 year ago

I'm seeing some issues with the Power Flow animation where a light gray border appears around the animation. I need to investigate...

image

I'm seeing JavaScript errors as the resize for the animation happens.

image

I'm going to try different Grafana versions to see if this is a bug or a conflict with our code. If it is a conflict, I'll likely revert the Grafana upgrade with the PW_STYLE=clear option in pypowerwall.env for anyone who wants to experiment with newer Grafana versions to get it to work.

jasonacox commented 1 year ago

I was finally able to get a clean run (no JavaScript errors) with Grafana v9.2.20. The border artifacts go away and the animation looks good with PW_STYLE=clear and PW_STYLE=grafana-dark. However, pushing it to recompute based on date ranges and other standard tasks I would do, did produce some JavaScript errors but not related to the animation.

From my testing (one version at a time) I discovered that something changed with v9.3+ that causes problems with our iFrame animation code and auto-resizing, specifically the border artifacts and JS errors. At v9.5 a different panel title formatting is introduced that seems to break the look as well. I think it will require a lot more investigation.

I'm reverting the upgrade of Grafana and keeping it at v9.1.2 as it seems the most stable in my testing. It also works well with both clear and grafana-dark modes. I'm going to continue to investigate how we get to a newer version. The other updates make sense to push forward and having grafana-dark as the default will help any others exploring newer Grafana version, including the ones raised in the Issues and Discussions.

jasonacox commented 1 year ago

v2.10.0 has been released....

image
jgleigh commented 1 year ago

@jasonacox Getting this error while trying to upgrade: sed: 1: "compose.env": command c expects \ followed by text

mcbirse commented 1 year ago

Hey @jgleigh - I have pushed a quick fix to the upgrade script which should hopefully fix this problem. 🤞

I looked into this error, and it appears to be a compatibility issue between GNU sed (Linux based) and BSD sed (used in Mac OS). Are you using Mac?

It seems sed -i (update in-place with no backup file) does not work on Mac. Instead it expects a backup file, whereas on Linux this is accepted and will skip creating the backup file.

sed -i'' would be acceptable on both platforms to skip creating the backup file. However I decided to change the command to sed -i.bak to create the backup file anyway, as this is consistent with use of sed throughout the other scripts so must work across all platforms (hopefully).

Let us know if the upgrade works for you now.

jgleigh commented 1 year ago

@mcbirse That fixed it! Yes this was on a Mac. Thanks again.

jasonacox commented 1 year ago

Thanks @jgleigh for spotting the issue and thank @mcbirse for the fix!