unltdnetworx / ioBroker.pi-hole

Adapter for cotrolling pi-hole in ioBroker smarthome
MIT License
14 stars 5 forks source link

non standard PiHole installation - subdirectory support? #15

Closed spaceduck518 closed 4 years ago

spaceduck518 commented 4 years ago

Hi, my PiHole setup is installed at a sub directory, this means the current integrated access via IP:PORT (80 or 443) is not working in this case. Can you add support for accessing PiHole on a sub directory? URL syntax is: https://IP-ADRESS:443/admin

Thanks!

unltdnetworx commented 4 years ago

Did you check "secure connection" for https? The directory where it is installed doesn't matter.

spaceduck518 commented 4 years ago

Yes, i did and all datapoints are filled, the connection seems OK so far. The reason why i open this issue is: When i try to deactivate PiHole from iobroker, PiHole stays active and i see the following error:

pi-hole.0 | 2020-06-24 22:11:15.708 | error | (40523) Error: getaddrinfo EAI_AGAIN IP-ADDRESS:443 pi-hole.0 | 2020-06-24 22:11:04.941 | info | (40523) pi-hole deactivated

Additional information: An apache webserver is running parallel on port 443 - this means that the address at the log doesn't lead to the PiHole installation! Are you sure that the directory is doesn't matter in this case?

Setting the IP including sub directory at the adapter settings page gives the following error: pi-hole.0 | 2020-06-24 22:27:03.258 | error | (44908) null

PiHole version is V5.0

unltdnetworx commented 4 years ago

Do you reach your pi-hole installation via this URL? https://IP-Address/admin/index.php

IP-Adress should be the IP or domain you're typing into the adapter. Do you run a reverse proxy?

spaceduck518 commented 4 years ago

Do you reach your pi-hole installation via this URL? https://IP-Address/admin/index.php

Yes, i do.

Do you run a reverse proxy?

No.

unltdnetworx commented 4 years ago

Do you reach your pi-hole installation via this URL? https://IP-Address/admin/index.php

Yes, i do.

The adapter doesn't do anything else. How do you dectivate the pi-hole? The values you're typing in are seconds. 0 means permanently.

spaceduck518 commented 4 years ago

According to my understanding, setting the datapoint "pi-hole.0.actPiHole" to "FALSE" should be deactivate pi-hole for the given time in datapoint "pi-hole.0.deactPiHoleTime".

unltdnetworx commented 4 years ago

Ah, there is the mistake.

You have to set pi-hole.0.deactPiHoleTime to a time in seconds or 0 to permanently stop the system. To reactivate you can set pi-hole.0.actPiHole true/1.

Please close the issue, if this is the solution.

spaceduck518 commented 4 years ago

Thanks! It's working as expected now!