Home Assistant Community Add-on: SQLite Web

:tada: Release v2.2.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades nginx to 1.16.1-r6
  • :books: Update add-on documentation to use new YAML configuration format
  • :hammer: Re-branding
  • :hammer: Update add-on config with new password & list features
  • :hammer: Updates for upstream Supervisor changes
  • :arrow_up: Updates datasette to v0.36 (#65)
  • :arrow_up: Upgrades add-on base image to v5.0.1
  • :hammer: Update community forum links

Questions? Join our Discord server! https://discord.me/hassioaddons

:tada: Release v2.2.1

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Updates datasette to v0.38 (#69)
  • :arrow_up: Upgrades add-on base image to v5.0.3
  • :arrow_up: Upgrades gcc to 9.2.0-r4

Questions? Join our Discord server! https://discord.me/hassioaddons

Hi.
Thanks @frenck, neat plugin.
What does “toggle helper tables” do and how does it work? :slight_smile:

1 Like

It would be nice to be able to explore other .DB files in the config. For instance the zigbee.db from the ZHA Intergration.

1 Like

I used this addon and i must say congrats!

Because a need i moved .db file to non default path, i changed the recorder component, URL setting. It worked for HA, but looks like addon look for it on the default path only isnt it?

Is there any way to tell addon where to look for it?

Thanks in advance

1 Like

It would be great if there was some status indication when executing a query.

E.g. I’m trying to execute the query below from this guide:

SELECT
  SUM(pgsize) bytes,
  name
FROM dbstat
GROUP BY name
ORDER BY bytes DESC

However, when I click Execute nothing happens. It took me a while to figure out that the query takes too long to execute and simpler queries work.

1 Like

Your best bet is to suggest such feature to the original sqlite-web project. Or, better yet, if you have coding experience you can try implementing it yourself.
(The HA add-on just encapsulates that project into a docker image and pre-configures it to run inside HAOS.)

I would welcome this as well. This add-on famously has no configuration options, but maybe a “path to Db” would be a good addition. My db also is not in the standard path (mainly to keep backups small).

1 Like

Cant find SQLite Web in the AddOn Store.
Has it been removed?

No it is still there
Did you open the add-on store with the button in the lower right corner?

This is what I see in the Add-on Store. I have Advanced Mode checked under my profile

You need this:

Home Assistant Community Add-ons

Franck Nijhof [email protected]

*** ```

1 Like

Thanks. Now I have lots more add-on’s. Including SQLite Web

Hi,

just have installed you plugin. Looks like it is hard to read the page in dark mode. Could that be adjusted a bit?

Thanks!

I’m trying to add a database to query it, but sqlite crashes.
I’m just adding the path in the parameters as
/home/USER/smadata/SBFspot.db

in YAML it looks like
database: /home/robin/smadata/SBFspot.db

Restarted it, but HA tells it’ not running.
Next after starting it I only get a 502: Bad Gateway

Tips anyone ? Or simply impossible to add a local database ?
Thx-a-lot !

Hello,
Same problem here.

[03:00:03] FATAL: The database file '/media/HA-USB/database/home-assistant_v2.db' is not found

Hey, quick question into the round before I break something: after looking into hardening my backup process a bit recently, I still stumble upon threads where people experience a corrupted sqlite file/db when trying to recover from a backup. As a minimal solution I’d like to manually export longterm stats via the sqlite web addon from time to time (query to csv/sql file), to at least have my energy data put aside somewhere.
What I’m a bit worried about: my HA instance is running on a Pi3, and I’ve had experiences before where the whole system crashed because e.g. compiling esphome stuff brought it to its knees.

Can I break something by executing a potentially long-running “select * …” query against the stats tables? Anyone good or bad experiences with this? Any feedback welcome and appreciated :slight_smile:

Cheers!

If the host stays running, then you should be fine.
The issue mainly comes when it crash, which is often due to underrated or unstable powersupply.

grafik

Exactly what I was asking myself too just right now.

So…

  • Is it “helpful”, for what?
  • Is it potentially harmful?
  • Working at all or for HA database a “frustration button” as nothing happens when clicking it?
  • Questions over questions.

Can someone please :bulb: us.

I’m not sure what is happening, but SQLite Web will not start. I get the following log when starting SQLite Web:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-sqlite-web: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-sqlite-web successfully started
s6-rc: info: service sqlite-web: starting
s6-rc: info: service sqlite-web successfully started
s6-rc: info: service init-nginx successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[10:21:34] INFO: Starting SQLite Web...
 * Serving Flask app 'sqlite_web.sqlite_web'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:8080
Press CTRL+C to quit
[10:21:35] INFO: Starting NGINX...

But SQLIte Web has not started. This screenshot after I’ve clicked the Start button.

When I try to open the web UI I get an error massage that the SQLite Web addon has not been started.

What am I doing wrong?