yes, the turning on does nothing as well. i did manually turn off in pi-hole and it did reflect as off in HE
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:46:07.792 am [error](http://{HE IP}/device/edit/1329)java.lang.NullPointerException: Cannot get property 'FTLnotrunning' on null object on line 109 (method parse)
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:46:07.787 am [debug](http://{HE IP}/device/edit/1329)Received 'null'
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:46:07.782 am [debug](http://{HE IP}/device/edit/1329)Parsing 'hubitat.device.HubResponse@1335f09'
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:45:56.854 am [error](http://{HE IP}/device/edit/1329)java.lang.NullPointerException: Cannot get property 'FTLnotrunning' on null object on line 109 (method parse)
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:45:56.849 am [debug](http://{HE IP}/device/edit/1329)Received 'null'
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-11 11:45:56.843 am [debug](http://{HE IP}/device/edit/1329)Parsing 'hubitat.device.HubResponse@1ec0cc1'
I do have my firewall set up for access from my HE to Pi-Hole. I do see the "combined" details on HE with my Queries, Blocked, and Clients, so not sure why it's not properly pulling the status. I'll have to take a look more when I get out of work
Super weird, as a refresh is the exact thing as a "poll". The code literately calls poll.
That sounds to me like a rights issue. Are you sure you don't need an Auth Key? Or if not, can you check that you removed the auth key item from line 149 def path = getApiPath() + "?" + toggle + "&auth=" + apiToken
that was it! i removed "+ apiToken" from lines 88 and 149 and it can now control it. i wonder what apiToken was providing since I had it blank.
to make this work for me, the updates i did:
33: input name: "apiToken", type: "text", title: "API token", required: false
88: def path = getApiPath() + "?summaryRaw" + "&auth="
149: def path = getApiPath() + "?" + toggle + "&auth="
EDIT:
just updated the code to see what apiToken was giving and it is "null". i wonder if having an if statement in the script to say "if apiToken = null THEN apiToken = "" " would suffice
EDIT 2:
played with it a bit more, made the following changes and it still works:
I think right now you could create a virtual switch in HE which does work with the homekit integration, then set it up to be a two way mirror.
e.g. the create two simple RM Rules that mirror each other.
1 triggers off of a change in this device and sets the virtual switch to the same state if not already set, and then the another triggers off of a change in on the virtual switch and sets this device to the same state if not already set
updated to the latest version (v 2023.01.12) and now i can't control the on/off again
[dev:1329](http://{HE IP}/logs#dev1329)2023-01-13 10:02:59.348 am [error](http://{HE IP}/device/edit/1329)java.lang.NullPointerException: Cannot get property 'FTLnotrunning' on null object on line 127 (method parse)
So, curious how hard it would be to add a presence sensor to this driver? I notice that if my Pi Hole server is offline, the switch status just indicates the last known status. It would be pretty cool if the driver could report "Offline" if the Pi Hole server has gone down for whatever reason..