-
Notifications
You must be signed in to change notification settings - Fork 3
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
Configure client-lvgl
using HA Panel (read panel config, render in voorkant)
#59
Comments
#9 is related |
including, as discussed on IRC, I suspect we will make a lot of friends if we can handle apexcharts configs and plot them |
Earlier on in our design of voorkant, we considered other home automation systems like openhab. If we now simply parse the panels from HA, then this is out of the window. We also would be commiting to following their UI quite closely. (we'd have to do work to follow their UI changes, etc). I think this might become tedious. I also think this is not needed, we might say that climate can do without aircon settings because frankly, in NL not a lot of people have a climate system like that. Having our own config would also allow us to store/retrieve it somewhere else for other home automation systems. |
I'm open to a conversion step. We can likely automate it, so people who just want to drag things in HA get their way, without tying us and power users to it. Then when we look at other backends, we can write another converter. |
Yes, this is what i was thinking as well. We don't want to burden the end-user with this, but we do want to keep our own format for the configuration that aligns with our capabilities. |
we might not need a converter from Json to json, but maybe from json to an object model that we use internally. This would mean just 'parsing' the json.... ? |
Yes, I think this is the way, at least for now. We can add more converters (for openhab, etc.) later, likely expanding our internal representation a bit at that time. |
This does mean that we should have 'how do we get config' per backend type. So, first step would be to get HABackend get the panel and parse that.. and than the backend should expose something that we can start creating uicomponents from... i think... |
you can get the url_paths like this:
{
"component_name": "lovelace",
"config": {
"mode": "storage"
},
"config_panel_domain": null,
"icon": "hass:view-dashboard",
"require_admin": false,
"title": "apex",
"url_path": "dashboard-apex"
}
{
"component_name": "lovelace",
"config": {
"mode": "storage"
},
"config_panel_domain": null,
"icon": null,
"require_admin": false,
"title": null,
"url_path": "lovelace"
} |
client-lvgl
using HA Panel (read panel config, render in voorkant)
We currently have some subcommands on the This should then read the dashboard and render whatever control we can render, and use the dummy control for things we don't know. |
In my test setup, this returns two panels - the default |
We already know we can't support the standard lovelace standard dashboard. This is the example of
This has 2 tabs/views, and on each view a card. |
#74 does a big chunk of this. Items left:
|
This item is logged to discuss/document how we're going to do configuration of the UI.
In short, the ideal is that you point voorkant to a HA-instance and it then shows a nice interface (after probably some authentication). This issue is about the UI shown after authentication.
In HA, you can configure cards (ui components) to show one or more ha entities. These cards are on a dashboard and you can configure dashboards manually.
The cards execute services on a domain, so HA does allow you to create a card like so:
This then tries to call
turn_on
/turn_off
on the vacuum, which it doesn't have and fails.As said, you can configure dashboards in HA. These dashboards hold the cards.
You can retrieve a dashboard with our client-cli like so:
client-cli dump-command "lovelace/config" '{"url_path":"dashboard-test"}'
which results in the following json:
We could simply parse this output and generate a UI from this. This would mean that our UI components are likely to become LVGL implementations of the HA cards.
The text was updated successfully, but these errors were encountered: