dashy icon indicating copy to clipboard operation
dashy copied to clipboard

Widget help please

Open adm2k opened this issue 2 years ago • 13 comments

Question

Just started using Dashy and seem to have an issue with the pi-hole widget. I have spent several hours researching and can't seem to resolve. I have checked and rechecked the Pi-Hole API and it is correct.

Here is my config: widgets: - type: pi-hole-stats updateInterval: 60 useProxy: true options: hostname: ip address of pi-hole servere/admin apiKey: goes here...

Error message: image

From console: image

Any help is very much appreciated!

al...

Category

Setup and Deployment

Please tick the boxes

adm2k avatar Oct 17 '23 11:10 adm2k

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Oct 17 '23 11:10 liss-bot

Anyone?

adm2k avatar Oct 18 '23 10:10 adm2k

Anyone?

Can you share the specific part or your full dashy config.yml? Maybe replace things like api keys. Which pi-hole version are you on? Not the new 6 beta right?

CrazyWolf13 avatar Oct 20 '23 04:10 CrazyWolf13

Here is the "pi-hole" part of the config file whuch I shared originally: widgets:

  • type: pi-hole-stats updateInterval: 60 useProxy: true options: hostname: xxx.xxx.xx.xx/admin apiKey: xxxxxxxxxxxxxxxxxxxx

I have tried replacing the api key:

Pi-hole version 5.17.2

Thanks for your help!

adm2k avatar Oct 20 '23 09:10 adm2k

Here is the "pi-hole" part of the config file whuch I shared originally: widgets:

  • type: pi-hole-stats updateInterval: 60 useProxy: true options: hostname: xxx.xxx.xx.xx/admin apiKey: xxxxxxxxxxxxxxxxxxxx

I have tried replacing the api key:

Pi-hole version 5.17.2

Thanks for your help!

Can you test for me without proxy and then test with the hostname only being http://{ip}:{Port} without /admin, Because uncaught a could be due to the /a...

CrazyWolf13 avatar Oct 20 '23 10:10 CrazyWolf13

I removed the /admin and still getting the same original error. Alson removing th /admin lands on the default Lightpd web page.

adm2k avatar Oct 20 '23 11:10 adm2k

I removed the proxy as well

also, for reference I tested in Heimdall using the same ip and api key and it works.

adm2k avatar Oct 20 '23 11:10 adm2k

I removed the proxy as well

also, for reference I tested in Heimdall using the same ip and api key and it works.

'''

  • type: pi-hole-stats options: useProxy: true hostname: http://192.168.1.111:8080 apiKey: xxxxxxx id: 0_622_piholestats ''' For me the /admin was not neccessary.

I will look into pihole config to see if something there could cause this.

Edit: can you try with setting your port as well? (Default should be 80, if you normally don't specify a port when visiting pihole)

CrazyWolf13 avatar Oct 20 '23 13:10 CrazyWolf13

Here is the "pi-hole" part of the config file whuch I shared originally: widgets:

  • type: pi-hole-stats updateInterval: 60 useProxy: true options: hostname: xxx.xxx.xx.xx/admin apiKey: xxxxxxxxxxxxxxxxxxxx

I have tried replacing the api key:

Pi-hole version 5.17.2

Thanks for your help!

Can you try exatly this hostname with http? :

http://{ip}:{port}

CrazyWolf13 avatar Oct 21 '23 06:10 CrazyWolf13

I don't use a port to access PI-Hole. Just 192.168.86.xx/admin

adm2k avatar Oct 21 '23 11:10 adm2k

I don't use a port to access PI-Hole. Just 192.168.86.xx/admin

Please share the following as files not just screenshots or pastes: Your dashy conf.yml and your dashy log

CrazyWolf13 avatar Oct 22 '23 18:10 CrazyWolf13

Because it's getting a 500 for the CORS proxy, I'm wondering if that endpoint isn't working in your instance. Have you tried manually calling the /cors-proxy with PostMan or something, to see if it's actually accessible?

Depending on how you're running Dashy and Pi-Hole, you might not need to proxy the request for Pi-Hole widget (unless you've got a web server or something in front of Pi-Hole).

Can you provide details on your environment, and how are you running Dashy? (like Docker, bare metal, etc?).

Have you checked out the Widget Errors in the Troubleshooting guide?

And just to double-check, the API key you're using is the WEBPASSWORD found in /etc/pihole/setupVars.conf, right?

Lissy93 avatar Oct 23 '23 09:10 Lissy93

Not sure if it's the same problem I am having, but on my end the widget renders, however, there is no data. Looking at the code I found that the Target-URL does not have the summary and auth variables. I am not sure how they are supposed to be passed to cors-proxy.

Config:

 56   - name: Today
 57     icon: far fa-rocket
 58     widgets:
 59     - type: clock
 60       options:
 61         timeZone: America/********
 62         hideDate: false
 63         use12hour: true
 64     - type: pi-hole-stats
 65       updateInterval: 20
 66       useProxy: true
 67       options:
 68         hostname: http://192.168.***.***
 69         apiKey: ONE_RANDOM_TOKEN

image

Update 1:

It seems the master changes are not part of the 2.1.1 release

https://github.com/Lissy93/dashy/blob/2.1.1/src/components/Widgets/PiHoleStats.vue

Update 2:

Seems to work just fine if widget has the master changes image

smetroid avatar Nov 11 '23 17:11 smetroid

I'm having the same problem--is there a resolution for the pi-hole widgets? Thanks.

Crayzei avatar Jan 21 '24 02:01 Crayzei

@Crayzei - yes this is fixed in :latest and there'll be a new tagged version of Dashy released in the coming days.

This issue was caused by a change in the Pi Hole API spec. You'll need both the latest version of Pi-Hole, and the latest version of Dashy.

Lissy93 avatar Feb 27 '24 23:02 Lissy93