Comments (9)
Ok, so I wrote some code for Pi-hole to be able to control groups via the API. I am going to submit a PR for it to see if they would add it in the next rev. I guess now I need to look at this code and see if I can add in a switch for it to be controlled via the plug-in.
from homebridge-pihole.
Hi @jacklawry!
This could be a real extension of this plugin functionality which is now limited to only disable/enable the entire Pi-hole.
I tried to look which requests the admin page makes when disabling a list and I couldn’t find a hint on where to add timer as a param in the request, though there should be an internal timeout inside the plugin to handle this.
I don’t have so much time to go any further in this feature now so if you want to try and integrate it, PR are always welcome!
from homebridge-pihole.
I am looking for the same thing! I manage mine based on groups that are enabled or disabled. I currently do it via a crontab. However, in looking at the code, the api.php and api_FTL.php doesn't appear to expose the more functional parts of the Pi-hole. Those files, if you wish to look at them, are in /var/www/html/admin. There is an api_db.php there, but it isn't included in the api.php, so you have to call it specifically to access any of its features.
But in looking in /var/www/html/admin/scripts/pi-hole/php/groups.php, it isn't a simple edit_group call. It requires all of the information on it (id, name, description, and enabled). It also requires a login token, unless $api is set.
I am going to look at it some more.
from homebridge-pihole.
At the moment I am able to control all the blocks I need (mainly YouTube) via ssh rules that I can enable and disable via some saved logic in the Shortcuts app on my phone but this would be loads better if it can be done.
from homebridge-pihole.
I think I am still going to look at this. I did submit the API change to Pi-hole FTL. Will see if it gets incorporated. In the mean time I will work on a fork of this to see if I can extend it based on the assumption they will accept it.
from homebridge-pihole.
@arendruni I am thinking of extending your plug-in to include multiple switches to control groups. I will fork it and see what I can come up with.
from homebridge-pihole.
Do you already know what needs to be changed to add this new feature?
from homebridge-pihole.
I have an idea, but nothing in stone. I am thinking that the plugin becomes a platform plugin, instead of multiple accessories that have to be independently configured. The main accessory can be turned on or off (enable / disable) and then other accessories representing groups that can be independently controlled.
from homebridge-pihole.
Ok, quick update. Pi-hole revved and didn't include my code. They forgot to review it before the update. I reached out to them and they apologized. However, they believe they are very close to 6.0, which has the functionality we need to make this concept work.
So, going to put this on the back burner momentarily until they get 6.0 out.
from homebridge-pihole.
Related Issues (20)
- [BUG] Homebridge 1.3.0-beta 40 HOT 2
- New install, Pi Hole not accessible HOT 1
- Homebridge 1.3.1 : This plugin slows down Homebridge HOT 1
- [BUG] makeRequest debugging causes exception
- [BUG] New Pi-hole release (Pi-hole v5.4, Web Interface v5.6, FTL v5.9) seems to mess with homebridge-pihole? HOT 1
- error about gpis pins and device not being a Raspberry Pi HOT 15
- When running in Client Bridge no "add device" in HomeKit possible (connection fail) HOT 1
- [BUG] Homebridge taken offline if Pi-hole is down HOT 5
- [BUG] Pi-hole switch always in 'off' mode. HOT 10
- [BUG] Homekit switch not changing pihole state anymore HOT 3
- When homebridge ist startet, correct function requires singe switch on/off HOT 3
- [BUG]Pi-Hole switch in HomeKit still not working HOT 1
- Recent Pihole update broke plugin HOT 5
- Plug in not working. shows fine in Homekit but not responsive[BUG] HOT 3
- Connectivity broken in HomeKit as of Pi-Hole FTL v5.20 and Web v5.18 HOT 6
- [BUG] Homebridge-pihole plugin suddenly not working HOT 3
- Ability to toogle two piholes on and off with one button HOT 3
- [BUG] HOT 2
- [INFO]API chnaged with piHole v6 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-pihole.