{"id":13631531,"url":"https://github.com/simianAstronaut/pi-hole-visualizer","last_synced_at":"2025-04-17T22:31:04.190Z","repository":{"id":218035064,"uuid":"122432058","full_name":"simianAstronaut/pi-hole-visualizer","owner":"simianAstronaut","description":"Visualize Pi-hole statistics on the Raspberry Pi Sense-HAT","archived":false,"fork":false,"pushed_at":"2018-09-25T03:34:22.000Z","size":53087,"stargazers_count":82,"open_issues_count":1,"forks_count":10,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-29T22:36:28.934Z","etag":null,"topics":["network-monitoring","pi-hole","python3","raspberry-pi","sense-hat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simianAstronaut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T04:48:38.000Z","updated_at":"2024-07-10T06:44:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1b3d666-0d8f-4126-b820-14d1965dd221","html_url":"https://github.com/simianAstronaut/pi-hole-visualizer","commit_stats":null,"previous_names":["simianastronaut/pi-hole-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simianAstronaut%2Fpi-hole-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simianAstronaut%2Fpi-hole-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simianAstronaut%2Fpi-hole-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simianAstronaut%2Fpi-hole-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simianAstronaut","download_url":"https://codeload.github.com/simianAstronaut/pi-hole-visualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223768501,"owners_count":17199355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network-monitoring","pi-hole","python3","raspberry-pi","sense-hat"],"created_at":"2024-08-01T22:02:29.111Z","updated_at":"2024-11-08T23:30:55.333Z","avatar_url":"https://github.com/simianAstronaut.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Pi-hole Visualizer  \nPi-hole Visualizer displays Pi-hole statistics on the Raspberry Pi Sense-HAT with multiple animations.\n\n![sense-hat display](https://github.com/simianAstronaut/pi-hole-visualizer/blob/master/images/sense_hat.gif)  \n\n### Details  \n- Pi-hole Visualizer cycles between five different customizable animations at regular intervals.  \n\n- The first animation(icon) displays the global connection status. A green pulsating icon represents a functioning internet connection.\n\n- The second animation(vertical bar chart) depicts the overall volume of DNS queries generated on the network. Each column represents a specific and adjustable time interval relative to the previous 24-hour timeframe. The time interval ranges from 10 minutes to 3 hours. The chart can be color coded to represent the level of DNS traffic or percentage of ads blocked.  \n\n- In the third animation(spiral graph), the daily ad block percentage is represented by the number of red pixels displayed.  \n\n- The fourth animation(horizontal bar chart) displays the relative level of DNS queries generated by top clients on the network in descending order.  \n\n- The last animation(pie chart) displays the proportion of each DNS record type.  \n\n- Options include manual chart selection, randomization of pixel generation, specifying the orientation of the display, and low-light mode.  \n\n- Joystick controls allow for adjustment of program options interactively.  \n\n- Pi-hole Visualizer is either run from the command line or enabled as a systemd service to run automatically at boot.  \n---  \n  \n### Requirements\n* To install Pi-hole, run `curl -sSL https://install.pi-hole.net | bash`.\n* The Sense-HAT package can be installed with `sudo apt-get install sense-hat`.  \n \n---  \n\n### Authorization  \nTo view statistics regarding top clients and query types, authorization from the Pi-hole web server is required. If you are running Pi-hole Visualizer on the same machine that is running Pi-hole, it is assumed a configuration file containing the password hash is located at (`/etc/pihole/setupVars.conf`) and no action is required.  \nIf you are on a remote machine, you can enable authorization by creating an environment variable containing the password hash. Append the following line to (`~/.bash_profile`) or (`~/.profile`): `export WEBPASSWORD=\"hash_value\"`.  \n\n---  \n  \n### Usage\n**`dns_stats.py [OPTION]`**  \n\n#### Options  \n`-h, --help`  \nShow this help message and exit.  \n\n`-i {10, 30, 60, 120, 180}, --interval {10, 30, 60, 120, 180}`  \nSpecify interval time in minutes. Defaults to one hour.\n\n`-c {basic, traffic, ads}, --color {basic, traffic, ads}`  \nEnter 'basic' to generate bar charts in the default red color, 'traffic' to color code based on level of DNS queries, or 'ads' to color code by ad block percentage.\n\n`-a ADDRESS, --address ADDRESS`  \nSpecify address of DNS server, defaults to localhost.\n\n`-o {0, 90, 180, 270}, --orientation {0, 90, 180, 270}`  \nSpecify orientation of display so that RPi may be installed in non-default orientation.\n\n`-ll, --lowlight`  \nLower LED matrix brightness for use in low light environments.  \n\n`-r, --randomize`  \nRandomize order of pixels displayed.  \n\n`-s {1, 2, 3, 4, 5}, --select {1, 2, 3, 4, 5}`  \nSpecify which animation(s) to display, with multiple items separated by a space.  \n\n#### Joystick Controls  \n- _UP - PUSH_  \nCycle color mode.  \n\n- _RIGHT - PUSH_  \nCycle interval selection.  \n\n- _DOWN - PUSH_  \nToggle low-light mode.  \n\n- _LEFT - PUSH_  \nCycle display orientation.  \n\n- _MIDDLE - PUSH_  \nToggle randomization.  \n\n- _MIDDLE - HOLD_  \nExit program.  \n \n---  \n  \n ### To Install As a System Service  \n 1. Make the script and unit file executable:  \n `sudo chmod +x dns_stats.py`  \n `sudo chmod +x dns_stats.service`  \n \n 2. Check that the path in the unit file after `ExecStart` matches the path of your script.  \n \n 3. Copy the unit file to the system directory:  \n `sudo cp dns_stats.service /lib/systemd/system`  \n \n 4. Enable the service to run at startup:  \n `sudo systemctl enable dns_stats`  \n \n 5. Reboot:  \n `sudo reboot`  \n \n 6. To check the status of the service:  \n `sudo systemctl status dns_stats`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsimianAstronaut%2Fpi-hole-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FsimianAstronaut%2Fpi-hole-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FsimianAstronaut%2Fpi-hole-visualizer/lists"}