-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TeslaMate crashed, halting add-on; Cannot index string with string "title" #32
Comments
This will be failing on this command: ha-addon-teslamate/scripts/dashboards.sh Lines 60 to 62 in 2b40dd2
This suggests the call to the Grafana API isn't returning data in the expected format. Is Grafana definitely running and accessible on port 3000 and accessible by the user you've defined? What do you get if you SSH into your HA and run (replace curl --silent --show-error \
--user "$USER:$PASS" \
-H "Content-Type: application/json" \
http://a0d7b954-grafana:3000/api/folders As an aside, it looks like I’ve got another location to make things more robust. This shouldn’t stop the whole plugin from starting. |
Thanks for the quick reply. It shows
Odd, I thought I start Grafana with
Lets assume, I follow "Note that the security admin password and usernames can only [...] or remove the add-on and re-add it.". Will I lose all my dashboard data, etc. or is this stored somewhere in InfluxDB? |
You'll only lose the dashboards which aren't provided by TeslaMate. The addon will add them back once access can be gained. The data that's used to generate them will be safe in InfluxDB. Take a backup before you do to be safe. |
Well, losing all other dashboards is not an option and backing up inside the Grafana container is a bit complicated. The Grafana add-on reads "Note: As the addon now supports both Ingress and direct access, the default admin user has a password of hassio. Due to the implementation the password cannot be changed, however you can delete and create a new user, if so please ensure to update the grafana_ingress_user option." Using
gets me past Grafana and into PostgresSQL. Teslamate's log now shows ...
I start the database with
and Teslamate with (excerpt)
|
I should add that PostgresSQL is complaining about "roles"?
|
🤔 that would suggest something is awry with your PostgresSQL database user or the command we're running to check if the DB exists. Are you able to run this command, replacing the variables: $(PGPASSWORD="$DATABASE_PASS" psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -Atqc "\list $DATABASE_NAME" |
Err, where would I run this command? I reckon inside the docker container? I got into it with
Shouldn't your |
Oh sorry. Yes, it needs to be run from within the either the TeslaMate or PostgresSQL containers - they both have the
Nope. This is how you pass in the password non-interactively as the It's the same as running: $ export PGPASSWORD="$DATABASE_PASS"
$ psql -h "$DATABASE_HOST" -p "$DATABASE_PORT" -U "$DATABASE_USER" postgres -Atqc "\list $DATABASE_NAME" I've just noticed that you appear to be using the PostgresSQL addon that used to live at https://github.com/matt-FFFFFF/hassio-addon-postgres. This is no longer maintained and has been removed. I used to reference this addon from my addons repo by removed it because it's so old and Matt didn't want to maintain it anymore. IIRC this addon only created a single user when it started and that's the user you need to use for TeslaMate and the If you're not using the PostgresSQL addon for anything else yet, I recommend switching to https://github.com/alexbelgium/hassio-addons/tree/master/postgres If you want to test things as they are you could try things interactively from within the PostgresSQL container: $ psql -U "$DATABASE_USER" postgres -Atqc "\list $DATABASE_NAME" This should return something like this:
If you still get the roles error, I think it indicates you're using the wrong username so will need to correct this or manually create a new user. |
Thanks, I followed your recommendation, removed the PostgresSQL add-on and installed https://github.com/alexbelgium/hassio-addons/tree/master/postgres instead. I fired up this add-on with the configuration
which is the default config (default user is And voila with the updated configuration of Teslamate (see below), the add-on started just fine.
So far so good. I've generated tokens as well. Can I expect to see only future data in the Grafana dashboard or also past data? Currently, I get nothing ;-) Well, not nothing but a "Templating Failed to upgrade legacy queries" warning. |
Whoops. Fixed in #33 |
Ok, researched further and found https://github.com/lildude/ha-addon-teslamate/blob/main/imgs/grafana-postgres.png. I got mine going now with
|
The screenshot has all the info needed I think and I've fixed the path to that so it renders. The latest release now includes improvements to handle situations where there are problems importing the dashboards which won't stop the addon from starting and will report more info on failure. |
Great, thanks again for your support! |
I've fiddled around with both the PostgresSQL add-on and the Grafana add-on (was working fine with InfluxDB before) but cannot get Teslamate to even start. Anyone any hint?
Log files says ...
I start Grafana with
Teslamate starts with ...
The text was updated successfully, but these errors were encountered: