Wine database integration into Lovelace

I have a database (sqlite) that tracks my wine cellar contents. I have the wine racks numbered by row and column running around the room and each populated slot has all the details of the wine including a review by the pundits. The database is small with about 700 possible entries. I would like to integrate into HA interface. Can someone point me to information on how to access a separate database and display and manage on HA Lovelace? I had this working in homeseer but all the scripts are vba. I could add, remove, or search for a bottle from the interface.

Does this need to be an integration? I will invest the time to learn if I need to.

If you’re using a wrapper/software layer which provides an API for your database, then you can access it via the RESTful integrations:

If not, there are other solutions - many people integrate InfluxDB and Grafana into HA using various methods - but unfortunately I have no experience with them.

Thank you. I will check this out.

Edit: I looked at restful and since I don’t have a wrapper/software layer I don’t think it is my solution. However - thank you again for your input.

Hi @AllHailJ, have you been able to find a solution? I’d like to do the same thing for my cellar content with a MariaDB database hosted on my NAS. Then I thought using the SQL integration/sensor but not sure it is the right approach…

No I have not. I tried CSV file but that was too cumbersome. I am still managing out of a SQLite db with dbBrowser. I looked at SQL integration but that is tied to the home assistant database. I looked at perl to accomplish this but getting the interface would require python. I haven’t committed to the task of learning python. That will be a good one over the winter.

@deliwyn I think I know how I can do this. I can create a local website on one of my servers using php and then using an sqlite3 database display all the data on a rack column basis. I can then add ability to scroll through columns. Once I have the website built I can integrate it into HA using iframes. I do this with my daphile squeezebox.

I have to teach myself php and continue to learn apache. I am expecting about 3-5 months to get this done. Thanks for the push and will share it when I am done.

regards

1 Like

Am making good progress.

@deliwyn Here is a screenshot of one of the columns. I just today finished figuring out how to display in a table from the database. Have alot more work to do but thought I would give you a peek.

It is crude right now but I am starting to cross over the hump. I have a lot of work to do to harden code for missing files, adding one file for configuration, adding user configuration etc. I also need to talk about what you have to change in php.ini and what programs are required.

Would you be interested in testing an alpha version when I get there?

Regards

@deliwyn I have posted the code to https://github.com/AllHailJ/theWineCellar if you are interested.

latest update put on github.