unltdnetworx / ioBroker.pi-hole

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

Feature request: Read Status -> Enabled/Disabled (Time) #14

Closed Balze2 closed 4 years ago

Balze2 commented 4 years ago

Hi unltdnetworrx,

I use your great adapter successfully! Thanks for your effort! IMHO there's one feature missing (I know there's no easy way from the pi-hole API). If one of my network users disables the Pi-Hole, there's no way to read this back and visualize that it's diabled. If I would only use your adapter in iobroker, i could easily track and visualize how long pi hole is diasabled. But if someone disables pi-hole via it's web interface your adapter will not be noticed.

It would be great to have datapoints for the enabled/disabled status and the disabled timing.

Best regards

Balze

unltdnetworx commented 4 years ago

Hi Balze, you only have to wait for the refresh-intervall to get new values from pi-hole. If you didn't changed the settings, this is 60 seconds. Then the value of "pi-hole.0.summary.status" changes to disabled. How you can handle it in VIS is discribed in the ioBroker forum.

Maybe I should do a short tutorial on that.

Balze2 commented 4 years ago

Hi unltdnetworx,

thank you for your quick response!

That was how I assumed pi-hole.0.summary(Raw).status should work. But in my Instance it stays "disabled" regardless what status pi-hole in fact is. (And it is refreshed with "disabled" over and over again. -> green flashing when refreshed) And it doesn't matter if I change it from enabled to disabled from the pi-hole-admin-console or using iobroker. Could you check this out with your instance please. Any ideas? :)

Best regards

Balze

Balze2 commented 4 years ago

Update:

I updated Gravity and set the loglevel from debug to info! Now it's working as you described the behaviour of pi-hole.0.summary(Raw).status.

Thanks and best regards,

Balze

unltdnetworx commented 4 years ago

Thanks for the feedback, maybe it will help somebody else.