Toon app: PiHoleStats

Forum about forum-provided applications on Toon

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Toon app: PiHoleStats

Postby TerrorSource » Mon Mar 23, 2020 11:19 pm

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 4888 times
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby yustmenl » Tue Apr 28, 2020 1:05 pm

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
yustmenl
Starting Member
Starting Member
 
Posts: 18
Joined: May 2011

Re: Toon app: PiHoleStats

Postby TerrorSource » Tue Apr 28, 2020 1:21 pm

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.
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby yustmenl » Sun May 03, 2020 10:23 pm

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?
yustmenl
Starting Member
Starting Member
 
Posts: 18
Joined: May 2011

Re: Toon app: PiHoleStats

Postby Joskep » Mon May 25, 2020 8:17 am

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
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby TerrorSource » Sat May 30, 2020 3:33 pm

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.
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby Joskep » Mon Jun 01, 2020 7:42 am

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?
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby TerrorSource » Fri Jun 05, 2020 10:46 pm

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 3871 times
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby Joskep » Sat Jun 06, 2020 8:30 am

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: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby Joskep » Sat Jun 06, 2020 4:43 pm

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 :) ?
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby TerrorSource » Sat Jun 06, 2020 5:54 pm

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.
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby Joskep » Sat Jun 06, 2020 7:38 pm

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"
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby TerrorSource » Sat Jun 06, 2020 7:51 pm

Web password is not the Token.

You need to extract the token from /etc/pihole/setupVars.conf file
TerrorSource
Administrator
Administrator
 
Posts: 494
Joined: May 2017

Re: Toon app: PiHoleStats

Postby Joskep » Sat Jun 06, 2020 7:52 pm

Sorry sorry sorry !
I didnt do...one moment
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Re: Toon app: PiHoleStats

Postby Joskep » Sat Jun 06, 2020 8:07 pm

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!!!!
Joskep
Member
Member
 
Posts: 110
Joined: March 2019

Next

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest