pi-hole / PADD

PADD (formerly Chronometer2) is a more expansive version of the original chronometer.sh that is included with Pi-Hole. PADD provides in-depth information about your Pi-hole.
1.36k stars 122 forks source link

PADD 3.8.0 display error with 3.5" PiTFT #251

Closed Falconcrest closed 1 year ago

Falconcrest commented 2 years ago

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 commented 2 years ago

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

Falconcrest commented 2 years ago

only the misalignment without real error message.

Pic

Sorry for the bad quality.

cmdshft commented 2 years ago

Same issue here with a Hyperpixel 4 display

IMG_4433

yubiuser commented 2 years ago

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

Falconcrest commented 2 years ago

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

yubiuser commented 2 years ago

What do you want me to remove instead?

yubiuser commented 2 years ago

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

yubiuser commented 2 years ago

Everything above 79x25 is considered mega so far and assumed there are enough lines https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L926

yubiuser commented 2 years ago

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

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

yubiuser commented 2 years ago

tiny and mini are broken as well.

Falconcrest commented 2 years ago

root@pihole:~# stty size 59 183

yubiuser commented 2 years ago

And tput cols and tput lines

Falconcrest commented 2 years ago

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

yubiuser commented 2 years ago

But then it should easily fit...

https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L1108-L1109

So we get console_width=183 and console_height=59 wich passes https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L926-L934

And we should get size mega

Falconcrest commented 2 years ago

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

Falconcrest commented 2 years ago

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

yubiuser commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

cmdshft commented 2 years ago

fix coming soon?

yubiuser commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

Thanks, this looks reasonable.

Falconcrest commented 2 years ago

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

yubiuser commented 2 years ago

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 commented 2 years ago

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

nineteenletterslong commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

yubiuser commented 2 years ago

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

yubiuser commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

ashblade commented 2 years ago

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 commented 1 year ago

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

yubiuser commented 1 year ago

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 https://github.com/pi-hole/PADD/pull/260

iamenderst commented 1 year ago

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

EdmundGerber commented 1 year ago

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 commented 1 year ago

This is expected. PR https://github.com/pi-hole/PADD/pull/260 fixed this. I'm waiting approval on https://github.com/pi-hole/PADD/pull/257 (which is the fix for this visual issue) and will immediately release a new PADD version with both fixes included.

EdmundGerber commented 1 year ago

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

yubiuser commented 1 year ago

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