Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.41k stars 256 forks source link

New Request... increase icon size on buttons. #960

Closed Doughboy68 closed 10 months ago

Doughboy68 commented 1 year ago

I was playing around with Nextion and I found a larger font that works. Instead of using NotoSans-Regular(h:32..., I found one with h:48. Here are some screenshots what I did to compare... I had to move both the button over to the left a few pixels and the brightness over to the right a few so a 3-digit 100% would display properly (otherwise the 1 gets hidden by larger button size for icon).

After editing, can easily change to the regular size font and don't really notice the icon shifted left, but the percent is a bit less whitespace on the right but can also set xcen to Center so smaller values look better.

What do people think of this? Would it look better to have a slightly larger icon in the buttons? This looks like a time consuming job to go change all, unless there is some trick to do it I don't know about!

Original: image

My modified version with larger font: image

Original font with modified spacing: image

edwardtfn commented 1 year ago

I like that, and I think it should be combined with multi-line support (like in #740).

Don't you want to do the change and create a PR?

@Blackymas, any comments here?

Doughboy68 commented 1 year ago

I am concerned about the fonts increasing tft size. This h48 font add 1.74MB to the TFT file, making current dev version 9.06MB in size. I did make a TFT with additional h80 fonts and was 12.2MB which loaded fine. I think the h80 font is too large for the style of this project anyways but h48 is a nice size. Not sure how bit a TFT can be, but have to keep in mind if adding more in-panel control in future this may eat into available storage.

edwardtfn commented 1 year ago

We have áreas to save storage. Those components with multiple pages can be replaces by a single page (just have to figure out how to handle the lage Indicator) and remove some pictures. ESPHome memory is more a concern right now.

edwardtfn commented 1 year ago

But I've called @Blackymas to the discussion more to hear about the new visual of this, usability, etc. I want to hear more opinions.

edwardtfn commented 1 year ago

I've cleaned up unused pics and added NotoSans h64, so maybe you wanna play a bit with this again. 😉

Doughboy68 commented 1 year ago

I tired this and noticed you used the bigger font for speed control. The right speed up/down buttons are "invisible" on my us panel but I can still press them since I remember their location and they work. Think is issue with wrong color settings.

Doughboy68 commented 1 year ago

Oh and buttons on the buttons pages are not updating status in real time when pressing, but show correct state when exiting and going back into screen. Probably related somehow. (EDIT.. nothing seems to update in real-time including hard button status).

And one more thing, the reboot button has not worked for several dev versions now, I have not mentioned it before thinking may just be a side-effect of some changes being worked on and will get fixed eventually.

And the tomorrow weather screen has a glitch around the temp below icon on left, looks like an incorrect background graphic used.

edwardtfn commented 1 year ago

It's really nice that you have tested and provided feedback about everything. Thanks a lot for that!!

I tired this and noticed you used the bigger font for speed control. The right speed up/down buttons are "invisible" on my us panel but I can still press them since I remember their location and they work. Think is issue with wrong color settings.

Fixed!

Oh and buttons on the buttons pages are not updating status in real time when pressing, but show correct state when exiting and going back into screen. Probably related somehow. (EDIT.. nothing seems to update in real-time including hard button status).

I have to look at that. On my basic test I couldn't see this, but I've made so much changes recently and possibly broke something. Are you sure you have the latest blueprint version?

And one more thing, the reboot button has not worked for several dev versions now, I have not mentioned it before thinking may just be a side-effect of some changes being worked on and will get fixed eventually.

Which reboot button are you talking about?

  1. The one at boot page?
  2. The one at settings page?
  3. The one at the device page in Home Assistant?

And the tomorrow weather screen has a glitch around the temp below icon on left, looks like an incorrect background graphic used.

Fixed!

Doughboy68 commented 1 year ago

Sorry, it is the reboot button when long pressing the clock/time, so settings page. The curved arrow icon just toggles on/off blue/cyan color but does not reboot. The reboot with HA works.

Ill watch for update in dev and load panel to test.

edwardtfn commented 1 year ago

I've just pushed the latest code to GItHub.

Doughboy68 commented 1 year ago

Loaded new tft and recompiled., Fan fixed, temperature fixed. Still but same issue with icons not updating in real time. I confirmed I have latest blueprint, downloaded again to make sure and even fully restarted HA.

Also sleep mode doesn't seem to work initiated from panel, but updates on panel when set in HA. Brightness and Dim also have issues - they update correctly in HA when set on the panel, but not really correctly when done from HA, the brightness changes but the values do not seem to sync with ones in panel.

edwardtfn commented 1 year ago

Also sleep mode doesn't seem to work initiated from panel, but updates on panel when set in HA. Brightness and Dim also have issues - they update correctly in HA when set on the panel, but not really correctly when done from HA, the brightness changes but the values do not seem to sync with ones in panel.

Do you see any error message on your ESPHome logs?

edwardtfn commented 1 year ago

I found the bug with Settings page. Working in a fix.

edwardtfn commented 1 year ago

Settings page fixed! You have to update ESPHome only.

edwardtfn commented 1 year ago

I will look at the live update thing later today.

Doughboy68 commented 1 year ago

Ok that latest updated fixed the reboot and sleep button.

One minor issue is if changing the brightness and dimming with HA sliders, it updates the nspanel display brightness correctly, but the values of sliders and the percentage value do not update in the panel. A reboot of nspanel sets those values to what was last set in HA. Setting the sliders directly in nspanel does update HA correctly so the issue is updating from HA->Nspanel

edwardtfn commented 1 year ago

One minor issue is if changing the brightness and dimming with HA sliders, it updates the nspanel display brightness correctly, but the values of sliders and the percentage value do not update in the panel. A reboot of nspanel sets those values to what was last set in HA. Setting the sliders directly in nspanel does update HA correctly so the issue is updating from HA->Nspanel

Fixed!

edwardtfn commented 1 year ago

About the issue with the live update of the screen, I've tested both US and EU models, Home page, Buttons pages, etc. and it is working fine. Could you please take a look at your logs (both ESPHome and Home Assistant) for some error message?

Doughboy68 commented 1 year ago

About the issue with the live update of the screen, I've tested both US and EU models, Home page, Buttons pages, etc. and it is working fine. Could you please take a look at your logs (both ESPHome and Home Assistant) for some error message?

I do not see any errors. This morning I recompiled my NSPanel used for dev test, re-downloaded blueprint. I deleted the nspanel from home assistant and the automation and created a new device. Still the same issue - nothing updates unless I change screens. I have four other NSPanels - three on the main version, and one on an older dev version and they all work fine.

edwardtfn commented 1 year ago

Ok. I will investigate more. Which values specifically are not updating?

By the way, I think I will have to revert back the icons size 64 as all the changes on HMI are making the files big again. :(

Doughboy68 commented 1 year ago

Ok. I will investigate more. Which values specifically are not updating?

By the way, I think I will have to revert back the icons size 64 as all the changes on HMI are making the files big again. :(

Seems like nothing is updating without a forced refresh (eg. selecting another screen then going back) Main screen: chips for thermostat modes, alarm mode, hard button rectangular on/off indicators at bottom. Buttons screens: buttons do not update even when pressed on panel. Thermostat does not update (eg. if change modes from cool to heat does not change icons). Fan page does not correct to the actual correct speed reported back from fan (eg. when changing from low to medium I think the setting is 66% but then mine changes to 74%, Low set to 33% but changes to 25%). Exiting fan page and going back in shows correct values. I did not check entities screens, light screens, or alarm screens, will do later when at home.

The problem seems to be system-wide so I bet once found then everything will be fixed.

Do you think it may help if I flashed the blank.tft again and reload with correct one?

edwardtfn commented 1 year ago

Do you think it may help if I flashed the blank.tft again and reload with correct one?

No. I don't think this is related to the TFT. I haven't tested all those itens you mentioned, but I've tested values on Home page and also buttons pages and everything looks fine.

When you go to your device page (Settings > Devices and Services > ESPHome), are the sensors "Current page" and "Nextion display" showing correct values?

edwardtfn commented 1 year ago

I have tried disabling the sensor "Current page" and I got exactly the same behavior you described. Please take a bloke at that one.

edwardtfn commented 1 year ago

That sensor was disabled by default on ESPHome. I will fix that and push to dev, but now as the sensor was already created in your system you have either to enable it manually or remove/add your panel to Home Assistant again.

Doughboy68 commented 1 year ago

This one... image I will enable and try when home

Update... resolved the issue :)

Doughboy68 commented 1 year ago

Resolved the issue enabling service.

Doughboy68 commented 1 year ago

Settings page fixed! You have to update ESPHome only.

Just downloaded the latest dev today and this seems broken again... cannot restart.

Also all the buttons pages are blank, and adding entities pages does not enable the entities button. Maybe you are making some significant changes and this is a work in progress, will look for updates later.

I updated blueprint and esphome.

edwardtfn commented 1 year ago

I'm not making any big change and this is not my intention until the next release, but sometimes the small changes have huge consequences. ;)

this seems broken again... cannot restart.

Any message in your logs? It's starting fine on my panels.

Also all the buttons pages are blank,

Fixed!

and adding entities pages does not enable the entities button

There is an specific toggle on the blueprint settings to enable that icon, regardless if you have entities selected. Is that enabled?

Doughboy68 commented 1 year ago

Updating fixed the buttons for me. I did not see the new entity toggle so that is working now.

The settings page acts a bit like it did prior to you fixing a few days ago... Reboot doesn't work pressing in nspanel, and sleep toggle pressing in nspanel doesn't update in HA. Sliders for brightness work fine though and update both ways.

edwardtfn commented 1 year ago

The settings page acts a bit like it did prior to you fixing a few days ago... Reboot doesn't work pressing in nspanel, and sleep toggle pressing in nspanel doesn't update in HA. Sliders for brightness work fine though and update both ways.

Fixed!

edwardtfn commented 10 months ago

Still pending some tests, as it was a quite big change, but this is implemented in dev and hopefully will be included in the next release.

edwardtfn commented 9 months ago