PADD
PADD copied to clipboard
Hyperpixel support
Adding new hyper size based on giuliomagnifico's script.
By submitting this pull request, I confirm the following: please fill any appropriate checkboxes, e.g: [X]
- [X] I have read and understood the contributors guide, as well as this entire template.
- [X] I have made only one major change in my proposed changes.
- [X] I have commented my proposed changes within the code.
- [ ] I have tested my proposed changes, and have included unit tests where possible.
- [X] I am willing to help maintain this change if there are issues with it later.
- [X] I give this submission freely and claim no ownership.
- [ ] It is compatible with the EUPL 1.2 license
- [ ] I have squashed any insignificant commits. (
git rebase
)
Please make sure you Sign Off all commits. Pi-hole enforces the DCO.
What does this PR aim to accomplish?: A detailed description, screenshots (if necessary), as well as links to any relevant GitHub issues
Issue 119 was opened for this. I am attempting to work that logic into production.
How does this PR accomplish the above?: A detailed description (such as a changelog) and screenshots (if necessary) of the implemented fix It adds a new hyper screen that is larger than mega.
What documentation changes (if any) are needed to support this PR?: A detailed list of any necessary changes New hyper screen size added.
- You must follow the template instructions. Failure to do so will result in your pull request being closed.
- Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.
I tested it and doesn't work. It's based on my custom layout but I didn't added a new layout, just modified the "Mega" one. When I have some time I'll try to find out the trouble, my original code is here: https://gist.github.com/giuliomagnifico/beb9b3211b7a3580457b438bb4c9326d
We will need to create a new screen size to not affect those currently using the mega size. Which is why I modified your script to put your logic in a new "hyper" size section.
What results were you seeing with this, was it only showing mega and not the new size? I might have the size checker values set wrong. From what I counted, your screen is at least 100 characters wide and 27 lines tall.
Yes, thanks you for done it, but this script loads the Mega size, not Hyper. And yes, the size of my 4" display (and others 800x480px 4" displays) is 100 lines and 27 cols but unfortunately this script doesn't load the correct size.
When will this be merged? Still waiting for my Hyperpixel/PiHole setup to become more awesome :)
Last report was that it didn't work.
I added the console height and width output to the piHoleVersion file that gets generated on boot. If someone that has a hyperpixel display can run the script in this pull request, and let me know what the console_width and console_height values are in the piHoleVersion file, I can update the script to display the hyper screen instead of the mega screen.
The URL to curl
for that is https://raw.githubusercontent.com/pi-hole/PADD/1880e3b6127a71a33937dd08454c85f41a713e99/padd.sh
I added the console height and width output to the piHoleVersion file that gets generated on boot. If someone that has a hyperpixel display can run the script in this pull request, and let me know what the console_width and console_height values are in the piHoleVersion file, I can update the script to display the hyper screen instead of the mega screen.
I'm running Hyperpixel 4.0 (no touch screen) and it returns the following:
last_check=20201027
console_width=100
console_height=30
core_version=5.1.2
core_version_latest=5.1.2
core_version_heatmap=^[[32m
web_version=5.1.1
web_version_latest=5.1.1
web_version_heatmap=^[[32m
ftl_version=5.2
ftl_version_latest=5.2
ftl_version_heatmap=^[[32m
padd_version=v3.4
padd_version_latest=v3.4
padd_version_heatmap=^[[32m
version_status="Pi-hole is up-to-date!"
version_heatmap=^[[32m
version_check_box="[^[[32m✓^[[m^O]"
pico_status="[^[[32m✓^[[m^O] Sys. OK"
mini_status_="[^[[32m✓^[[m^O] System OK"
tiny_status_="[^[[32m✓^[[m^O] System is healthy."
full_status_="[^[[32m✓^[[m^O] System is healthy."
@jeroenboumans From what I can tell, the script should have resulted in the new "hyper" screen size being displayed. Did the screen appear correct to you, or did it look the same as before? The main difference will be how the logo in the top left appears, all the other sizes say PADD, but this one says PI-HOLE.
@Kerdic that is correct. It showed the PiHole logo as can be seen in this photo.
Good deal, it looks like it is working to me.
The only question left, which could be addressed in a different PR, would be if the colorful retro logo is used (current), or the more tame green color. Thank you for verifying!
This is the PADD repo, please use the PADD logo.
I have updated the logo used. Can someone verify the spacing still looks good now on the title lines?
Looking good 👍
@jeroenboumans unfortunately is not correct, you're using the wrong font, for that my mod doesn't fit (the height of) your hyperpixel 4", it should looks like this (now I'm using the touch version for that the front of the screen is different, but I'm using the non-touch drivers, so it's the same):
Infact if you look at your first text "Pi-Hole®" (up-left) is displayed as "Pi-HoleR" :-)
I'm following the thread but I don't know how to help, I tried a lot of time the @Kerdic mod but I can't get it to being loaded! I tried to change the value from console_width=99 console_height=29, 25, etc... I tried different numbers but it still load me the Mega size.
The weird thing is that, if I launch it via ssh, on my local terminal it works (and I think is how @Kerdic is testing it), but I don't know why it won't be loaded on the HyperPixel 800x480px! I don't know how to help, because there's no output logs, no errors, it simply loads the Mega size but the height/width variables are correct!
Now that I see @jeroenboumans font, I'm thinking there's something related to the font or the font size/style. Please can you post the output of cat /etc/default/console-setup
? Thanks.
Mine is (Termius font is the same as guess):
CHARMAP="UTF-8"
CODESET="guess"
FONTFACE="guess"
FONTSIZE="8x18"
@giuliomagnifico didn't change anything to the font/style settings. My output running the command (i'm guessing this is not setup by default):
ACTIVE_CONSOLES="/dev/tty[1-6]"
CHARMAP="UTF-8"
CODESET="guess"
FONTFACE=""
FONTSIZE=""
VIDEOMODE=
@jeroenboumans Try to use 8x18 font. By editing the file via sudo nano /etc/default/console-setup
or sudo dpkg-reconfigure console-setup
and see if it loads the Hyper size for you or is my trouble.
@giuliomagnifico Applied the 8x18 through the setup but now some weird behaviour happens at the bottom. Looks like it also switches back to the Regular size as can be seen here
@jeroenboumans hmmm 26 lines... I thought it was 27 lines height... maybe try to change the console_height in line 927 to 26. I've done a lot of test with differente value but I don't remember if I already tested 26 instead of 27 lines.
When I'll be at home I'll try again, or try you.
maybe try to change the console_height in line 927 to 26.
That did it :)
I believe both mega and hyper would have the same height if we changed it to 26, but I am not sure.
I updated the script to take that out of consideration. The production code uses mega if it is larger than any other screens by default. I have simply split that section on width now, less than 100 width will be mega, where 100 and greater will be hyper.
I think that should allow this to work for mega screens, and also hyper screens with the default and modified font selection.
Could someone verify the new script?
@Kerdic just tested, and works fine finally! I can't test it for smaller size but on 800x480px Hyperpixel works, thanks a lot!
I also did notice the R instead of ® character showing, but in the script, that character appears correct. So, I am not sure what is going on there.
@giuliomagnifico Great! And the ® looks correct also!
@Kerdic yes the R instead the ® is only a font issue, just set it to "guess" and "8x18" and it works, I don't know what's the trouble but I don't think is related to the Pi-Hole or PADD. With any layout you get the wrong ® if you don't set the font for what I tested.
Any ideas on when this will be merged with master?
Any ideas on when this will be merged with master?
No unfortunately, but if you want to update I've done some mods here: https://giuliomagnifico.medium.com/add-unbound-stats-to-padd-for-pi-hole-38b2ea87db2b in the link there's also the updated release without Unbound stats.
Any ideas on when this will be merged with master?
When there's independent confirmation that it works and doesn't break anything.
I will support this if any issues are found, but I don't have this display to verify. And I actually don't use PADD anymore, I switched to home assistant and am running pi-hole from a container. But again, I'll help get this into production if anything needs changed.
Any ideas on when this will be merged with master?
No unfortunately, but if you want to update I've done some mods here: https://giuliomagnifico.medium.com/add-unbound-stats-to-padd-for-pi-hole-38b2ea87db2b in the link there's also the updated release without Unbound stats.
I can't find a link for the non-unbound padd file