Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary disable no longer works #7

Closed
CorneliousJD opened this issue May 31, 2022 · 9 comments
Closed

Temporary disable no longer works #7

CorneliousJD opened this issue May 31, 2022 · 9 comments

Comments

@CorneliousJD
Copy link

With some recent pi-hole update, the temp disable no longer actually works, it will disable it indefinitely until you re-enable it again.

Any chance this could be updated and fixed? i assume something w/ the API changed?

@johnholbrook
Copy link
Owner

Hmm, thanks for the report - I can have a look into this this weekend.

@CorneliousJD
Copy link
Author

Hmm, thanks for the report - I can have a look into this this weekend.

rgr that, no rush on my end, for now I changed it to toggle which will also work fine for the time being.
if you need me to test anything let me know :)

@johnholbrook
Copy link
Owner

for now I changed it to toggle which will also work fine for the time being

That's interesting – the plugin calls the same pi-hole API endpoints for both actions, so it's odd that p-h update would break the 'temporarily disable' action but not the 'toggle' action. Maybe the problem is in my code somewhere.

@CorneliousJD
Copy link
Author

for now I changed it to toggle which will also work fine for the time being

That's interesting – the plugin calls the same pi-hole API endpoints for both actions, so it's odd that p-h update would break the 'temporarily disable' action but not the 'toggle' action. Maybe the problem is in my code somewhere.

if it is the code that's the problem it would likely specifically be with the time, e.g. i had 900 seconds as my time to temp disable, but when using it, it just disables it completely and no longer passes the time anymore, but it USED to work for sure, as I used it regularly :)

@Firecul
Copy link

Firecul commented Jun 30, 2022

At the moment it's disabling using the indefinite mode I think then the script reenables when ready, rather than having pi-hole do the reenabling I think.

@johnholbrook
Copy link
Owner

At the moment it's disabling using the indefinite mode I think then the script reenables when ready, rather than having pi-hole do the reenabling I think.

This is correct.

I guess it's conceivable that if you set the disable time to a sufficiently large number of seconds, the plugin disables p-h but for some reason 'forgets' to send the API request to enable before the specified amount of time has elapsed. I'll bet if the plugin asks p-h directly to disable for the specified duration instead, that would likely solve this issue.

(For my own reference when I get around to fixing this in the future, the API reference says "Temporal disabling is possible by specifying the amount of seconds, e.g. api.php?disable=10&auth=...")

@Firecul
Copy link

Firecul commented Jul 3, 2022

I'll bet if the plugin asks p-h directly to disable for the specified duration instead, that would likely solve this issue.

It would and it would also make it more foolproof. Using your example, if someone put the time quite high and then shut down the computer (before the program sent the reenable command) it would be permanently disabled until they remembered/noticed. So I definitely think that would be a worthwhile change.

@p1r473
Copy link

p1r473 commented Aug 5, 2022

@johnholbrook when will this make it into a new release?
Also- I tested it with the current version, and was not having any problems, but agree we should definitely use the built in pihole timer for disabling.

@johnholbrook
Copy link
Owner

Funny you should ask that: https://github.com/johnholbrook/streamdeck-pihole/releases/tag/v1.1

I've submitted the updated plugin file to Elgato via email, so hopefully it will be available on the App Store within a few days, but it can also be downloaded and installed manually from the releases page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants