Page 1 of 2

Toon app: PiHoleStats

PostPosted: Mon Mar 23, 2020 11:19 pm
by TerrorSource
Long time ago i made an app (DomoticzBoard) which Toonz has improved over the time.
Last couple of weeks i brainstormed over new ideas for apps while i was redesigning my homenetwork and i came up with the idea for a PiHole app.

It's just a simple app which queries the PiHole server and shows the stats of PiHole on the Toon.
App has a tile which shows the total ads blocked on that day and the amount of ads blocked in %.

Click on the Tile or the Sys Tray icon shows more information queried from PiHole.
- status
- domains_being_blocked
- dns_queries_today
- ads_blocked_today
- ads_percentage_today
- queries_forwarded
- queries_cached
- clients_ever_seen
- unique_clients
- gravity_last_updated

To Do (if possible):
- Enable/Disable PiHole
- Pause for x minutes
- Color text in Tile when PiHole is disabled
- Data shown in a nicer way (not just text)

Github repo: https://github.com/TerrorSource/PiHoleStats


piholestats_screenshot_2.png
piholestats_screenshot_2.png (98.05 KiB) Viewed 4889 times

Re: Toon app: PiHoleStats

PostPosted: Tue Apr 28, 2020 1:05 pm
by yustmenl
Nice App, thanks!!
I installed and realized i had to update

maybe also a nice idea for a update, have a massage on toon when there is an update available for pi-hole!
and maybe an option to update the lists from toon when possible offcource.

Oh and on my toon the icon isn't showing but just a white block. not a big problem but nevertheless ithought i would mention it

Re: Toon app: PiHoleStats

PostPosted: Tue Apr 28, 2020 1:21 pm
by TerrorSource
yustmenl wrote:Nice App, thanks!!
I installed and realized i had to update

maybe also a nice idea for a update, have a massage on toon when there is an update available for pi-hole!
and maybe an option to update the lists from toon when possible offcource.

Oh and on my toon the icon isn't showing but just a white block. not a big problem but nevertheless ithought i would mention it


Im not sure it i can retrieve that information from pihole.

Do you have the latest TSC-resourcefile? Icons should be in it. You can check that via Instellingen > TSC > Check for updates.

Re: Toon app: PiHoleStats

PostPosted: Sun May 03, 2020 10:23 pm
by yustmenl
Gues that is the problem, wil update it tomorrow

Edit: i updated it and the Icon is visable now.

P.S. i noticed that the stats are updated automaticly, can you create an auto refresh?

Re: Toon app: PiHoleStats

PostPosted: Mon May 25, 2020 8:17 am
by Joskep
Goodmorning, i would like to use this nice app together with my Pihole.
Is see you where planning to add the feature ON/OFF, do you think this is gonna happen?
It would be nice to enable/disable the pihole via the Toon, people who are using pihole can imagine that you would like to disable it for a few minutes (like you can on the webinterface).

Would be nice!

Greetz

Re: Toon app: PiHoleStats

PostPosted: Sat May 30, 2020 3:33 pm
by TerrorSource
Joskep wrote:Goodmorning, i would like to use this nice app together with my Pihole.
Is see you where planning to add the feature ON/OFF, do you think this is gonna happen?
It would be nice to enable/disable the pihole via the Toon, people who are using pihole can imagine that you would like to disable it for a few minutes (like you can on the webinterface).

Would be nice!

Greetz


I looked into it while i created the app.

Authorization and a token is needed to enable/disable or pause PiHole for x seconds.
https://discourse.pi-hole.net/t/pi-hole-api/1863

Not sure if it can be done without token in PiHole 4 or PiHole 5.

Re: Toon app: PiHoleStats

PostPosted: Mon Jun 01, 2020 7:42 am
by Joskep
Okay. But isn.t it an idea to create that option and let the users by themselfes adjust the password-settings in "/etc/pihole/setupVars.conf) via SSH?

Re: Toon app: PiHoleStats

PostPosted: Fri Jun 05, 2020 10:46 pm
by TerrorSource
Joskep wrote:Okay. But isn.t it an idea to create that option and let the users by themselfes adjust the password-settings in "/etc/pihole/setupVars.conf) via SSH?


Working on a new version with pre-programmed pause buttons (meaning that you cannot set the timers yourself)
Still in a doubt to put a button on the Tile, i prefer not as there's not much space left on the Tile.

Preview:

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 8:30 am
by Joskep
WOW!!!!!

Thats an very good feauture!!
Everybody who uses Pihole knows that sometimes url.s are blocked when you only want to visit them for 1 time. This would be nice!

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 4:43 pm
by Joskep
I just installed the app and i see the button, unfortanatly they don.t work (yet).

It still keeps saying "enabled" and when i go to an ad test page it says i am still ad blocking.

Or am i to quik and you are stil busy :) ?

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 5:54 pm
by TerrorSource
Joskep wrote:I just installed the app and i see the button, unfortanatly they don.t work (yet).

It still keeps saying "enabled" and when i go to an ad test page it says i am still ad blocking.

Or am i to quik and you are stil busy :) ?


Did you fill in the Token in the settings screen?

It should refresh the screen after clicking a button, if not, give it a few seconds.

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 7:38 pm
by Joskep
I filled in my password, like i do when i login normally. Is that correct?

When i login via cellphone and choose 'disable' the i see the apo on the Toon changes "enabled" into "disabled"

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 7:51 pm
by TerrorSource
Web password is not the Token.

You need to extract the token from /etc/pihole/setupVars.conf file

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 7:52 pm
by Joskep
Sorry sorry sorry !
I didnt do...one moment

Re: Toon app: PiHoleStats

PostPosted: Sat Jun 06, 2020 8:07 pm
by Joskep
Is it the 64 character after "WEBPASSWORD=" ?

I did in (manually ;-( but the same result.or do you mean another token?

EDIT: WORKS!!!!!

I forgot one character.

Thanks!!!!