Toon app: PiHoleStats

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Toon app: PiHoleStats

Post 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 10067 times
yustmenl
Starting Member
Starting Member
Posts: 19
Joined: Tue May 24, 2011 9:44 pm

Re: Toon app: PiHoleStats

Post 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
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Toon app: PiHoleStats

Post 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.
yustmenl
Starting Member
Starting Member
Posts: 19
Joined: Tue May 24, 2011 9:44 pm

Re: Toon app: PiHoleStats

Post 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?
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Toon app: PiHoleStats

Post 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.
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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?
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Toon app: PiHoleStats

Post 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:
Attachments
Pihole_preview.png
Pihole_preview.png (171.65 KiB) Viewed 9050 times
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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!
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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 :) ?
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Toon app: PiHoleStats

Post 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.
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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"
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Toon app: PiHoleStats

Post by TerrorSource »

Web password is not the Token.

You need to extract the token from /etc/pihole/setupVars.conf file
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post by Joskep »

Sorry sorry sorry !
I didnt do...one moment
Joskep
Member
Member
Posts: 141
Joined: Sat Mar 09, 2019 11:07 pm

Re: Toon app: PiHoleStats

Post 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!!!!
Post Reply

Return to “Toon Apps”