[SOLVED] List items in UI from SQL

He people, i need some help , can i show list item from SQL database in UI? for example
in Group show :
Day 1 - weather ok
Day 2 - cool
Day 3 - warm
Day 4 - sunny

This topic not related to weather , just i need know can i do same thing ? All information i want dynamically assign to UI from SQL, that mean i don’t want add DAY manually, please advise :slight_smile:

What exactly are you trying to do?

Why a database? It sounds as if you want to show the information actually held by those dayx items.To show the states of items is a standard function of a sitemap.
Or did I misunderstand ?

1 Like

I want store SMS messages to SQL, i found the script who to store it from MQTT perspective to SQL database, but i don’t know who to present stored values in UI

Put the SMS message in a String Item and use the persistence service to store them

Can you please show me example i don’t know yet who to realize it, for instance :
Message come from different numbers and i want see it on UI, how i can use " persistence "? does it automatically will create new item assigned to received message ? Can you please provide some sample code? I never used " persistence " .

@Kamil_Resulov
Hi,
We are not here to write code for you. I can give you pointer
Show you where the docs are
Then you have a go.
Search the docs, search the forum
Write your code and if it doesn’t work, we’ll help make it work.

Rules:


Persistence:

1 Like

Ok, thanks for links my question is not who to store data but how it present on UI, and is it possible to make present list of items from SQL with

I don’t want spend to much time is it will be no possible for me or too effort to get my aim ?

You can get a list of the item being persisted by you SQL persistence service by using the REST API:

To view items on the UI:
For BasicUI and Classic UI you need to use a sitemap:
https://www.openhab.org/docs/tutorial/sitemap.html

For HABpanel:

1 Like

Let me try, thanks a lot

openHAB is not easy if you want to do things out of the ordinary. You will need to learn to write rules, sitemaps and manual item configurations. There are lots of examples in the docs, and forum.

Anything is possible. The main advantage of OH is that it allows many, many technologies to work together.

If you don’t want to put the effort, you’re on your own

I think for me is easy to add Firebase to the app instead of do implementation something else, i look for you solution and make decision to use of Firebase, because it will be add notification too…
By thanks any way