Skip to content
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

Ft dashboard - #1958 #2083

Merged
merged 68 commits into from
Oct 13, 2024
Merged

Ft dashboard - #1958 #2083

merged 68 commits into from
Oct 13, 2024

Conversation

proddy
Copy link
Contributor

@proddy proddy commented Oct 10, 2024

Implements #1958 - The dashboard
plus other fixes, changes.

  • data fetches when dialog boxes open
  • use useMemo to reduce re-render with page titles
  • Analog Sensor - show error in WebUI when trying to using an invalid GPIO
  • Replace CTRL-C with CTRL-D, as CTRL-C stops PIO Monitor
  • Analog Sensor: fix polarity for Digital Out

@MichaelDvP
Copy link
Contributor

Because the devices page has headline with black background i've tested a black box for dashboard: What do you think?
grafik

@proddy
Copy link
Contributor Author

proddy commented Oct 13, 2024

I like the Blackground. I can add it

Do you like the highlight being solid blue instead of the border? I personally do.

Also, notice the slightly different spacing of the devices between the Dashboard and Devices pages. I compacted the Dashboard to show all the data in as little white space as possible. What do you think?

image

@MichaelDvP
Copy link
Contributor

For the black background i've used left padding 2 to allign with table ( padding 1 and frame 1):

        <Box
          sx={{
            backgroundColor: 'black',
            pt: 1,
            pl: 2
          }}
        >

The spacing is imho good. Dashboard will mostly have more lines.
Also coloring is imho ok.

@proddy proddy merged commit 00dcdec into emsesp:dev Oct 13, 2024
@mattreim
Copy link
Contributor

Is there a way to remove the scheduler entries in the dashboard?

@proddy
Copy link
Contributor Author

proddy commented Oct 13, 2024

Is there a way to remove the scheduler entries in the dashboard?

if you don't give the schedule entry a name, it will be excluded.

Is there a reason why you would not like scheduler entries not to be shown? It was a late addition.

@mattreim
Copy link
Contributor

mattreim commented Oct 13, 2024

My current scheduler entries are only for creating the remote thermostat and are therefore quite uninteresting for the dashboard. If that doesn't work, I can live with them just fine.

Otherwise I find the dashboard very practical. Thanks

@proddy
Copy link
Contributor Author

proddy commented Oct 13, 2024

We could add an option to the Scheduler like 'include in Dashboard' @MichaelDvP ?

or @mattreim do all your Scheduler entries need a name? Do you call them via the API?

@mattreim
Copy link
Contributor

The entries don't actually need a name and I don't want to call them either.

@mattreim
Copy link
Contributor

Is that normal?

Dashboard

@proddy
Copy link
Contributor Author

proddy commented Oct 13, 2024

no, was it always like that or did you make a change to the Scheduler entries?

@proddy
Copy link
Contributor Author

proddy commented Oct 13, 2024

The spacing is imho good. Dashboard will mostly have more lines. Also coloring is imho ok.

@MichaelDvP do you you think we should use the solid blue hover-over color in the rest of the app, like in Scheduler, Custom Entities, Configurations.... ?

@MichaelDvP
Copy link
Contributor

Is that normal?

Sometimes, temporary, while scanning the bus, sadly yes.
I think this is due to resorting devices if a new device is found on the bus and adding the new device sometimes. Devices are stored as vector and vector is not constant in memory and reallocated on adding/sorting a new device.
I tested to change device storage to deque and it seems to work (empty lines are gone).

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

we can also adjust the web code to only show the parent tree node (e.g. the device) only if it has children (the data entities). Or perhaps better in the C++ code. It's an easy add.

This only happens at startup when EMS-ESP is discovering new devices. I'm not at home so can't test on a live system, I've been coding this using dummy data all week.

@mattreim
Copy link
Contributor

mattreim commented Oct 14, 2024

no, was it always like that or did you make a change to the Scheduler entries?

I have now removed the name and now it looks like this. Even with the new version.

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

Then it's something else causing it, either an EMS device that doesn't have values yet or Custom Entities or Analog or Temp Sensors. Can you spot what is missing?

@MichaelDvP
Copy link
Contributor

@mattreim

Please check if it is fixed with https://github.com/MichaelDvP/EMS-ESP32/releases/tag/latest

@MichaelDvP
Copy link
Contributor

@proddy

We could add an option to the Scheduler like 'include in Dashboard' @MichaelDvP ?

Only for scheduler? Global for all scheduler entities? Seems not right to me.
Do we need it for sensors and custom entities too?
I think leave is as is or we have to add the flags to all entities (a/t-sensor/custom/scheduler), in consequence with favorite and exclude api/mqtt flags But this is a lot of work for the UI..

@MichaelDvP
Copy link
Contributor

BTW: We should change the text here:
grafik
hide from Dashboard is wrong now, Rename to: hide from Devices? Or remove this flag?
And for mark as favorite? Should we add show on Dashboard` Or is it clear that only favorites are shown on Dashboard?

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

think leave is as is or we have to add the flags to all entities

agree...leave as is.

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

BTW: We should change the text here: grafik hide from Dashboard is wrong now, Rename to: hide from Devices? Or remove this flag? And for mark as favorite? Should we add show on Dashboard` Or is it clear that only favorites are shown on Dashboard?

good catch. I say leave the word Favorite as its also integrated with the Star * in Devices
But 'hide from Dashboard' is old. I think we added it because there was a limit of the number of entries you could update on the Customization page. Perhaps we can link 'remove from dashboard' with 'remove from memory'. I'll create a new issue

@mattreim
Copy link
Contributor

@mattreim

Please check if it is fixed with https://github.com/MichaelDvP/EMS-ESP32/releases/tag/latest

This is what it looks like after 30 minutes of running time.

Dashboard

And I only have the two scheduler entries and nothing else.

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

@mattreim
Please check if it is fixed with https://github.com/MichaelDvP/EMS-ESP32/releases/tag/latest

This is what it looks like after 30 minutes of running time.

Dashboard

And I only have the two scheduler entries and nothing else.

and if you have time check with the latest .45?

@mattreim
Copy link
Contributor

Yes, of course

@mattreim
Copy link
Contributor

Now I've waited 10 minutes and it still looks exactly the same.

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

ok, thanks, I'll do some more testing. if I can't find it I'll send you a debug version which will output what the dashboard is using.

@MichaelDvP
Copy link
Contributor

Oh, this is scheduler with no named entities, this is a typo, i'll fix in my dev.

@proddy
Copy link
Contributor Author

proddy commented Oct 14, 2024

thanks Michael - I fixed that yesterday but it was still stuck in my local branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants