LucidLogger

So here is my first attempt to track Miles per kWh on my Trip dashboard. Hope it is useful for someone else.

Screenshot from 2025-08-30 10-49-39.webp


Query is:
SQL:
SELECT UNIX_TIMESTAMP(StartDate)*1000 as StartDate, UNIX_TIMESTAMP(EndDate)*1000 as EndDate, 
Start_address, End_address,  km_diff  / 1.609344 as km_diff, consumption_kWh, (km_diff / 1.609344) / consumption_kWh as Miles_per_kWh, (StartRange - EndRange) / 1.609344 as RangeDiff, DurationMinutes, avg_consumption_kWh_100km * 1.609344 as avg_consumption_kWh_100km,
 Round(outside_temp_avg * 9/5 + 32,1) as outside_temp_avg,speed_max / 1.609344 as speed_max,power_max/1.35962 as power_max,power_min/1.35962 as power_min,power_avg/1.35962 as power_avg, (select km_diff / DurationMinutes * 60) / 1.609344 as avg_kmh,
lat, lng, EndLat, EndLng, UNIX_TIMESTAMP(StartDate)*1000 as StartDateRAW, UNIX_TIMESTAMP(EndDate)*1000 as EndDateRAW
from trip WHERE
  $__timeFilter(StartDate) and km_diff < 1000 and CarID = $Car and (Start_address like '%$Textfilter%' or End_address like '%$Textfilter%')

order by StartDate desc

Overrides are:
Screenshot from 2025-08-30 10-59-14.webp
 
Hi Chris, minor issue. I park underground at work and my Office to home trip never records. Do you know what initiates a Trip start? I tried placing the car in Park and then Drive when outside of the parking garage, but no luck.
 
Anyone else's Logger stop working today? My Home Assistant integration is pulling current values, but LucidLogger stopped updating.
 
Restart got things working again, but I lost about 36 hours of updates (Trips / Charging sessions). I guess I'll schedule a restart once a month or so. Charging session from this AM still isn't showing up. I guess that data is lost.
 
The LucidLogger has now hundreds of charging curves, so I want to share the data with you. I hope to get more LucidLogger users to collect more data so we can compare them.
I hope that's useful for you.
What I can see, europe chargers are faster. Especially Alpitronics. It is pretty sure to get more than 250kW with a preconditioned battery and below 10%.


1765236074469.webp
 
Can you add the Lucid Gravity? I don't see it as an option in the dropdown.
 
We have a new feature for LucidLogger. Shared chargings can now be displayed as a matrix. This is my Lucid Air Pure AWD 2024 in Germany.
1771163400366.webp


To get to this view, you have to go to your charging history dashboard and click on share.
1771163486599.webp


After that, click on SOC. It's on the bottom of the next page.
1771163543033.webp
 
Wondering if someone can assist in setup issue. Running docker through container station on a qnap nas. Install went through ok.
qnap docker.webp

but i get a DB connection refused in the logs that gives me another refusal every 15 seconds.
qnap docker 2.webp

If i go to the admin page I get this
errortext = 'Error: Connection refused - URL: http://teslalogger:5000/getallcars'

everything in the shell completed without error.

any ideas would be appreciated.
 
Tried to delete the message above but missed the 45min timer.

The initialization continued passed that point. Docker continer has 5 apps running.

View attachment 40638

From logfile everything seemed to be completed

I can not resolve localhost:8888 but using the ip:8888 it works

under settings - my tesla/mylucid I get an error "JSON Parse error!"

in the teslalogger.webserver log I get the following:
 
I can not resolve localhost:8888 but using the ip:8888 it works

This suggests that what you're con ecting to is listening on the main IP/interface (ie eth0 or ens192), but not on the loopback interface (lo0).

Assuming what you're connecting to is on the same system/container. Otherwise connecting to localhost will never work.
 
Thanks. A little more of a novice than to understand your response. This is how the webserver is setup in my docker; I did setup the teslalogger admin panel (user/password) and set the URL's for http://localhost:8888/admin in the teslalogger setting section. (and http://localhost:3000 for grafana)


Screenshot 2026-08-23 110644.webp
 
Thanks. A little more of a novice than to understand your response. This is how the webserver is setup in my docker; I did setup the teslalogger admin panel (user/password) and set the URL's for http://localhost:8888/admin in the teslalogger setting section. (and http://localhost:3000 for grafana)

Please post all your logfiles and screenshots of your problems. Othervise it's very hard to guess your problems. What I can see on my backend, you didn't make it to connect your car to Lucid's servers.
 
that is correct. Everything installed per https://github.com/bassmaster187/TeslaLogger/blob/master/docs/en/lucid-install.md via a putty connection to the QNAP NAS
I connect to admin panel via the ip:8888/admin and set my password and other settings. when I click the my tesla/my lucid button I get the JSON error.
I attached each containers logs to this post. QNAP has a debug option that downloads all logs but the container logs only show in windows so I copied and pasted into the attached files.


I also see that there are errors in the container for the db that repeats every minute. (I saved this in txt files like the others but when uploaded to post it did not go through)
Initializing database
2026-08-24 12:43:24 0 [Warning] InnoDB: Failed to set O_DIRECT on file./ibdata1; OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.
2026-08-24 12:43:24 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2026-08-24 12:43:24 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2026-08-24 12:43:24 0 [ERROR] Plugin 'InnoDB' init function returned error.
2026-08-24 12:43:24 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2026-08-24 12:43:24 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2026-08-24 12:43:24 0 [ERROR] Aborting

Installation of system tables failed! Examine the logs in
/var/lib/mysql/ for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

shell> /usr/sbin/mysqld --skip-grant-tables --general-log &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables;

Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.

The latest information about mysql_install_db is available at
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira
 

Attachments

Last edited:
settings/credentials screen shot
1787571458280.webp


also attached logfile (in pdf form, wouldnt take it in txt) from the credentials page download
 

Attachments

You didn't provide the logfile of the database and it looks like this is the problem.
I don't know how fast your Qnap is, but I saw some cheap Synology need 30 minutes to init the database.

try to start from scratch.
> docker compose down

delete the content of the folder mysql. NOT the folder itself!!!

> docker compose up -d

And wait! Be patient - it may take one hour if your NAS is very slow!

You have to wait untill you can read this in your mariadb container logs:
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/sqlschema.sql

if that doesn't work, please send me the log of the database
 
Back
Top