jasonacox / Powerwall-Dashboard

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

Docker-Compose V1 Fix - v3.0.1 #389

Closed jasonacox closed 1 year ago

jasonacox commented 1 year ago

This fixes an issue introduced by v3.0.0 for old Docker-Compose V1 systems.

The compose-dash.sh will dynamically use V1 compatible powerwall*.yml configuration files based on configuration setting (default or solar-only).

This add two YML files:

Close #388

jasonacox commented 1 year ago

✅ Docker-Compose V1 Upgrade

Upgrade Powerwall-Dashboard from 3.0.0 to 3.0.1
---------------------------------------------------------------------
This script will attempt to upgrade you to the latest version without
removing existing data. A backup is still recommended.

Upgrade - Proceed? [y/N] y

Resetting Timezone to Default...

Pull influxdb.sql, dashboard.json, telegraf.conf, and other changes...

No local changes to save
Already up to date.
Current branch main is up to date.

Setting Timezone back to America/Los_Angeles...

Updating Powerwall-Dashboard stack...
Running Docker Compose...
pypowerwall is up-to-date
influxdb is up-to-date
grafana is up-to-date
weather411 is up-to-date
telegraf is up-to-date

Waiting for InfluxDB to start...
 up!

Add downsample continuous queries to InfluxDB...
2023/11/19 07:41:48 error: retention policy already exists
2023/11/19 07:41:48 error: retention policy already exists
2023/11/19 07:41:48 error: retention policy already exists
2023/11/19 07:41:48 error: continuous query already exists
2023/11/19 07:41:48 error: continuous query already exists

Deleting old pyPowerwall...
pypowerwall
pypowerwall

Deleting old telegraf...
telegraf
telegraf

Deleting old weather411...
weather411
weather411

Restarting Powerwall-Dashboard stack...
Running Docker Compose...
influxdb is up-to-date
Creating pypowerwall ... 
grafana is up-to-date
Creating weather411 ... 
Creating pypowerwall
Creating pypowerwall ... done
Creating telegraf ... 
Creating telegraf ... done

---------------[ Update Dashboard ]---------------
Open Grafana at http://localhost:9000/

From 'Dashboard/Browse', select 'New/Import', and
upload 'dashboard.json' located in the folder
/home/tesla/Powerwall-Dashboard/dashboards/

Please note, you may need to select data sources
for 'InfluxDB' and 'Sun and Moon' via the
dropdowns and use 'Import (Overwrite)' button.

✅ Docker Compose V2

Upgrade Powerwall-Dashboard from 3.0.0 to 3.0.1
---------------------------------------------------------------------
This script will attempt to upgrade you to the latest version without
removing existing data. A backup is still recommended.

Upgrade - Proceed? [y/N] y

Resetting Timezone to Default...

Pull influxdb.sql, dashboard.json, telegraf.conf, and other changes...

No local changes to save
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), 627 bytes | 627.00 KiB/s, done.
From https://github.com/jasonacox/Powerwall-Dashboard
   faa3a81..0ed811e  main       -> origin/main
Updating faa3a81..0ed811e
Fast-forward
 RELEASE.md             |  5 +++++
 VERSION                |  2 +-
 compose-dash.sh        | 26 +++++++++++++++++++++++++-
 powerwall-v1-solar.yml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 powerwall-v1.yml       | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 upgrade.sh             |  2 +-
 6 files changed, 193 insertions(+), 3 deletions(-)
 create mode 100644 powerwall-v1-solar.yml
 create mode 100644 powerwall-v1.yml

Setting Timezone back to America/Los_Angeles...

Updating Powerwall-Dashboard stack...
Running Docker Compose...
[+] Running 5/0
 ✔ Container pypowerwall  Running                                                                                                                  0.0s 
 ✔ Container influxdb     Running                                                                                                                  0.0s 
 ✔ Container weather411   Running                                                                                                                  0.0s 
 ✔ Container telegraf     Running                                                                                                                  0.0s 
 ✔ Container grafana      Running                                                                                                                  0.0s 

Waiting for InfluxDB to start...
 up!

Add downsample continuous queries to InfluxDB...
2023/11/19 07:44:54 error: retention policy already exists
2023/11/19 07:44:54 error: retention policy already exists
2023/11/19 07:44:54 error: retention policy already exists
2023/11/19 07:44:54 error: continuous query already exists
2023/11/19 07:44:54 error: continuous query already exists

Deleting old pyPowerwall...
pypowerwall
pypowerwall

Deleting old telegraf...
telegraf
telegraf

Deleting old weather411...
weather411
weather411

Deleting old tesla-history...
tesla-history
tesla-history

Restarting Powerwall-Dashboard stack...
Running Docker Compose...
[+] Running 5/5
 ✔ Container pypowerwall  Started                                                                                                                  1.7s 
 ✔ Container influxdb     Running                                                                                                                  0.0s 
 ✔ Container weather411   Started                                                                                                                  1.7s 
 ✔ Container grafana      Running                                                                                                                  0.0s 
 ✔ Container telegraf     Started                                                                                                                  2.1s 

---------------[ Update Dashboard ]---------------
Open Grafana at http://localhost:9000/

From 'Dashboard/Browse', select 'New/Import', and
upload 'dashboard.json' located in the folder
/home/pi/Powerwall-Dashboard/dashboards/

Please note, you may need to select data sources
for 'InfluxDB' and 'Sun and Moon' via the
dropdowns and use 'Import (Overwrite)' button.