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

PADD 3.8.0 display error with 3.5" PiTFT #251

Closed
Falconcrest opened this issue Jul 27, 2022 · 44 comments · Fixed by #257
Closed

PADD 3.8.0 display error with 3.5" PiTFT #251

Falconcrest opened this issue Jul 27, 2022 · 44 comments · Fixed by #257

Comments

@Falconcrest
Copy link

After the update to padd 3.8.0 at least the first line above with the details of the versions of pihole, web and padd is missing.

@yubiuser
Copy link
Member

Is there some real error message shown? Or only the misalignment? Could you add a screenshot or photo?

@Falconcrest
Copy link
Author

Falconcrest commented Jul 27, 2022

only the misalignment without real error message.

Pic

Sorry for the bad quality.

@cmdshft
Copy link

cmdshft commented Jul 27, 2022

Same issue here with a Hyperpixel 4 display

IMG_4433

@yubiuser yubiuser added the Bug label Jul 27, 2022
@yubiuser
Copy link
Member

Thanks I think I know where this is coming from. It's probably due to the two new lines adding model and inteface.

@Falconcrest
Copy link
Author

Maybe you can correct something there so that it fits again.

@yubiuser
Copy link
Member

What do you want me to remove instead?

@yubiuser
Copy link
Member

Please run stty size and post the output. I need to see how big the terminal is.

@yubiuser
Copy link
Member

Everything above 79x25 is considered mega so far and assumed there are enough lines

PADD/padd.sh

Line 926 in 380636a

elif [ "$console_width" -lt "80" ] || [ "$console_height" -lt "26" ]; then

@yubiuser
Copy link
Member

Bildschirmfoto zu 2022-07-27 09-11-47

26 - 27 - 28 in a row. I think we should go for 28.

@yubiuser
Copy link
Member

tiny and mini are broken as well.

@Falconcrest
Copy link
Author

root@pihole:~# stty size
59 183

@yubiuser
Copy link
Member

And tput cols and tput lines

@Falconcrest
Copy link
Author

root@pihole:# tput cols
183
root@pihole:
# tput lines
59

@yubiuser
Copy link
Member

But then it should easily fit...

PADD/padd.sh

Lines 1108 to 1109 in 380636a

console_width=$(tput cols)
console_height=$(tput lines)

So we get console_width=183 and console_height=59 wich passes

PADD/padd.sh

Lines 926 to 934 in 380636a

elif [ "$console_width" -lt "80" ] || [ "$console_height" -lt "26" ]; then
if [ "$console_height" -lt "22" ]; then
padd_size="slim"
else
padd_size="regular"
fi
# Mega
else
padd_size="mega"

And we should get size mega

@Falconcrest
Copy link
Author

I compared it, the code is identical, but what can I say, 1 line is missing at the top.

@Falconcrest
Copy link
Author

Is there a solution? Thanks a lot for your efforts!

@yubiuser
Copy link
Member

I haven't figured out one yet. I don't know why it does not fit, although there are enough lines. The trivial solution would be to remove newly added lines. In the next few days I won't have time to work on this. In the meantime you could just use the previous version.

@Falconcrest
Copy link
Author

OK, we will wait, thanks!
Sorry, by the way there are 2 lines that are not displayed when I look very closely...26 lines are displayed in version 3.7.1.

@nineteenletterslong
Copy link

nineteenletterslong commented Aug 1, 2022

I have a PiTFT 3.5" and have the exact same issue with the line being cut off. Went back to previous (also because of other bug).

For reference, since the values are different than previous user.

pi@pihole:~ $ tput cols
364
pi@pihole:~ $ tput lines
89

@EdmundGerber
Copy link

What do you want me to remove instead?

The logical things to remove would be the two new items. For now I'm sticking with 3.7.1, so same difference, for me.

@nineteenletterslong
Copy link

Possibly split some information out a tab or two instead of having separate lines, if possible.

@cmdshft
Copy link

cmdshft commented Aug 19, 2022

fix coming soon?

@yubiuser
Copy link
Member

yubiuser commented Aug 19, 2022

@Falconcrest

root@pihole:# tput cols
183
root@pihole:# tput lines
59

@nineteenletterslong

pi@pihole:~ $ tput cols
364
pi@pihole:~ $ tput lines
89


I spend some thoughts on this today and I think I know why the numbers are so high: did you run those commands in a terminal connected via ssh to your RPi? They certainly reflect the size of your terminal on your device accessing the Pi, but not the terminal displayed at your RPi display. Could you run those commands directly on the Pi so we get the numbers from the actual Pi dispaly?

@nineteenletterslong
Copy link

Great point!

Just plugged a keyboard in and ran it on the pi (again, PiTFT 3.5")

pi@pihole:~ $ tput cols
80
pi@pihole:~ $ tput lines
26

@yubiuser
Copy link
Member

Thanks, this looks reasonable.

@Falconcrest
Copy link
Author

Falconcrest commented Aug 19, 2022

I would confirm the information from @nineteenletterslong.
In the absence of a currently unavailable keyboard, I counted. ;-)

@yubiuser yubiuser linked a pull request Aug 20, 2022 that will close this issue
1 task
@yubiuser
Copy link
Member

yubiuser commented Aug 20, 2022

I fixed the issue. In "mini", IP is now shown next to hostname. In "tiny" I had to sacrifice the IPv6 address. In "regular" and "slim" I removed the device model and IPv6 address but added an IPv6 checkbox. In "mega" I combined DNS with the DHCP section.
Bildschirmfoto zu 2022-08-20 09-53-20
Bildschirmfoto zu 2022-08-20 10-02-10
Bildschirmfoto zu 2022-08-20 12-13-41
Bildschirmfoto zu 2022-08-20 12-14-24
Bildschirmfoto zu 2022-08-20 19-07-45


Testing and feedback welcome. You can find this version at

https://raw.githubusercontent.com/pi-hole/PADD/0b4351c3adf2069d63a7b2c0cba890ab165802d1/padd.sh


P.S. The red "DNSSEC" on "mega" is fixed already

@Falconcrest
Copy link
Author

It works! A very, very good job! Thank you, it was worth the wait.

@nineteenletterslong
Copy link

nineteenletterslong commented Aug 20, 2022

Works great, still have red DNSSEC though but thanks for your efforts

also you probably should probably put a space after the DHCP title line to keep it in accordance with how the other lines are. Maybe put a few spaces before it to make it look a little more separate from DNS, or whatever you feel like

@rdwebdesign
Copy link
Member

rdwebdesign commented Aug 21, 2022

In small screens you can combine a shorter uptime text and cpu temp on a single line.

To get a shorter uptime you can use:

system_uptime=$(awk '{print int($1/86400)"d:"int(($1%86400)/3600)"h:"int(($1%3600)/60)"min"}' '/proc/uptime')

It will return something like this:
5d:13h:41min

You can use an even shorter string using:

system_uptime=$(awk '{print int($1/86400)"d:"int(($1%86400)/3600)"h"}' '/proc/uptime')

5d:13h

@cmdshft
Copy link

cmdshft commented Aug 21, 2022

When will this be pushed to the main release link so I can update normally?

@yubiuser
Copy link
Member

It'll take a bit. The PR that changes that is still in draft mode as I'm still working on it.

@yubiuser
Copy link
Member

yubiuser commented Sep 2, 2022

It's been 2 weeks - is that a normal amount of time for the changes you made?

As we all do this in our free time - yes. You can already use the version I linked above.

@iamenderst
Copy link

Your testing version fixed the issue for me. PiTFT Plus 480x320 3.5

v3.7.1
PXL_20220905_162336166

Release v3.8.0
PXL_20220905_163251701

Testing v3.8.0
PXL_20220905_163137672

@yubiuser
Copy link
Member

yubiuser commented Sep 5, 2022

Thanks for the testing. I was involved a bit more in the latest changes of "core" Pi-hole but will focus now again on PADD. It's probably only a few hours to finish this change. With all this testing it should convince the reviewers easily.

@accordxtc
Copy link

Thanks @yubiuser for your help fixing this. Just applied to my screen, missed having it fit all the correct data. Much appreciated

@ashblade
Copy link

Thanks so much for all you do @yubiuser ! Fixed 3.8.0 version posted above works great on my PiTFT as well. Good to see that everything fits again. 🥇

@cmdshft
Copy link

cmdshft commented Sep 30, 2022

It's been 3 months, can the fixes be pushed to the main release yet?

@yubiuser
Copy link
Member

I was going to finish this but in the meantime Pi-hoel/ FTL had made some changes so I could not go on. We now first need to merge #260

@iamenderst
Copy link

The testing version in the link above works fine until 3.8.1 is release.
Thanks yubiuser!

@EdmundGerber
Copy link

Testing and feedback welcome. You can find this version at

https://raw.githubusercontent.com/pi-hole/PADD/0b4351c3adf2069d63a7b2c0cba890ab165802d1/padd.sh

P.S. The red "DNSSEC" on "mega" is fixed already

I've been using the version of 3.8.0 that was linked, and it's been fine until yesterdays PiHole update ([Pi-hole FTL v5.18.2, Web v5.16 and Core v5.13). Padd starts, shows a red X for Core, and beside that states 'Pihole's DNS server is off!'. However, the web interface shows pihole is working as normal. I've tried Pihole -r, but no change. Any ideas?

@yubiuser
Copy link
Member

This is expected. PR #260 fixed this.
I'm waiting approval on #257 (which is the fix for this visual issue) and will immediately release a new PADD version with both fixes included.

@EdmundGerber
Copy link

Thanks for the reply. Knowing it's expected behaviour - and not something hamfisted I did - is a plus.

@yubiuser
Copy link
Member

Finally fixed with https://github.com/pi-hole/PADD/releases/tag/v3.8.1

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

Successfully merging a pull request may close this issue.

9 participants