diff --git a/CHANGELOG-FULL.md b/CHANGELOG-FULL.md index 0e32481..bb644c5 100644 --- a/CHANGELOG-FULL.md +++ b/CHANGELOG-FULL.md @@ -1,5 +1,10 @@ # Changelog +## 0.6.0 + +* Data import from TeslaFi (see [README](https://github.com/matt-FFFFFF/hassio-addon-repository/blob/master/teslamate/README.md)) +* BREAKING CHANGE - Fix bug with MQTT namespaces, set this to an empty string `''` to avoid changes to MQTT paths. + ## 0.5.2 * Teslamate 1.21.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e9385..ad08dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,8 @@ # Changelog -## 0.5.2 +## 0.6.0 -* Teslamate 1.21.1 - -## 0.5.1 - -* Fix [bug](https://github.com/matt-FFFFFF/hassio-addon-teslamate/pull/12) with ingress paths - -## 0.5.0 - -* [Ingress support](https://github.com/matt-FFFFFF/hassio-addon-teslamate/pull/1)! Thanks to [tcm0116](https://github.com/tcm0116) -* Teslamate 1.21.0 +* Data import from TeslaFi (see [README](https://github.com/matt-FFFFFF/hassio-addon-repository/blob/master/teslamate/README.md)) +* BREAKING CHANGE - Fix bug with MQTT namespaces, set this to an empty string `''` to avoid changes to MQTT paths. [Full Changelog](https://github.com/matt-FFFFFF/hassio-addon-teslamate/blob/master/CHANGELOG-FULL.md) diff --git a/README.md b/README.md index 1dc2504..79fc7ec 100644 --- a/README.md +++ b/README.md @@ -81,3 +81,20 @@ grafana_port: 3000 # this is correct if you use the community addo grafana_user: admin grafana_pass: mysecretpassword ``` + +## Data Import from TeslaFi + +It is now possible to import CSV data from TeslaFi, refer to the [official docs](https://docs.teslamate.org/docs/import/teslafi). + +Follow this process: + +1. Copy the CSV data to the `/share/teslamate` folder on your Home Assistant instance. +You can do this using the [Samba](https://github.com/home-assistant/addons/blob/master/samba/DOCS.md) or [SSH](https://github.com/home-assistant/addons/blob/master/ssh/DOCS.md) addons. + +2. Make sure the `import_path` configuration setting is set to `/share/teslamate`. + +3. Restart the TeslaMate addon and navigate to the web UI, you should be presented with the import screen. + +4. Import the data + +5. Once imported sucessfully, delete the CSV files to avoid the import screen being presented. diff --git a/config.json b/config.json index 3cc0051..f71c72a 100644 --- a/config.json +++ b/config.json @@ -27,12 +27,13 @@ "grafana_port": 3000, "grafana_user": "admin", "grafana_pass": "pass", + "import_dir": "/share/teslamate", "mqtt_host": "core-mosquitto", "mqtt_user": "user", "mqtt_pass": "pass", "mqtt_tls": true, "mqtt_tls_accept_invalid_certs": false, - "mqtt_namespace": "account_0", + "mqtt_namespace": "", "timezone": "Europe/London" }, "schema": { @@ -49,6 +50,7 @@ "grafana_port": "int", "grafana_user": "str", "grafana_pass": "str", + "import_dir": "str", "mqtt_host": "str", "mqtt_user": "str", "mqtt_pass": "str", @@ -57,6 +59,9 @@ "mqtt_namespace": "str", "timezone": "str" }, + "map": [ + "share:rw" + ], "url": "https://github.com/matt-FFFFFF/hassio-addon-repository/blob/master/teslamate/README.md", "image": "mattffffff/teslamate-{arch}" } diff --git a/scripts/ha-bootstrap.sh b/scripts/ha-bootstrap.sh index 9c8fde7..9d1e01f 100755 --- a/scripts/ha-bootstrap.sh +++ b/scripts/ha-bootstrap.sh @@ -1,24 +1,26 @@ #!/usr/bin/env bashio # Database things -export DATABASE_USER=$(bashio::config 'database_user') -export DATABASE_PASS=$(bashio::config 'database_pass') -export DATABASE_NAME=$(bashio::config 'database_name') export DATABASE_HOST=$(bashio::config 'database_host') +export DATABASE_NAME=$(bashio::config 'database_name') +export DATABASE_PASS=$(bashio::config 'database_pass') export DATABASE_PORT=$(bashio::config 'database_port') +export DATABASE_USER=$(bashio::config 'database_user') # MQTT things export DISABLE_MQTT=$(bashio::config 'disable_mqtt') export MQTT_HOST=$(bashio::config 'mqtt_host') -export MQTT_USERNAME=$(bashio::config 'mqtt_user') +export MQTT_NAMESPACE=$(bashio::config 'mqtt_namespace') export MQTT_PASSWORD=$(bashio::config 'mqtt_pass') -export MQTT_TLS=$(bashio::config 'mqtt_tls') export MQTT_TLS_ACCEPT_INVALID_CERTS=$(bashio::config 'mqtt_tls_accept_invalid_certs') -export MQTT_NAMESPACE=export MQTT_TLS=$(bashio::config 'mqtt_namespace') +export MQTT_TLS=$(bashio::config 'mqtt_tls') +export MQTT_USERNAME=$(bashio::config 'mqtt_user') + # Other things -export TZ=$(bashio::config 'timezone') +export IMPORT_DIR=$(bashio::config 'import_dir') export PORT=4000 +export TZ=$(bashio::config 'timezone') # Import dashboards if [ $(bashio::config 'grafana_import_dashboards') == 'true' ]; then