Qrome / Pi-hole-Monitor

ESP8266 and OLED Pi-hole Monitor
MIT License
79 stars 14 forks source link

Always getting Failed to connect and get data #3

Closed DerSeb90 closed 5 years ago

DerSeb90 commented 5 years ago

I flashed it with Platformio with ArduinoJson in libs folder from the Repo. After a few runs it is getting more and more data. Sometimes the summary works and the others doesn't.

Sending: http://10.1.4.3:80/admin/api.php?summary Failed to connect and get data: http://10.1.4.3:80/admin/api.php?summary Sending: http://10.1.4.3:80/admin/api.php?overTimeData10mins Failed to get data: http://10.1.4.3:80/admin/api.php?overTimeData10mins Sending: http://10.1.4.3:80/admin/api.php?topClientsBlocked=3&auth=4ba89e70bb8243ef7ce9fbd9dfec1ddd11d5c62464f322419f4f094f29d120c9 Failed to get data: http://10.1.4.3:80/admin/api.php?topClientsBlocked=3&auth=4ba89e70bb8243ef7ce9fbd9dfec1ddd11d5c62464f322419f4f094f29d120c9 Sending: http://10.1.4.3:80/admin/api.php?summary Response Code: 200 Response: {"domains_being_blocked":"111,810","dns_queries_today":"199,878","ads_blocked_today":"10,948","ads_percentage_today":"5.5","unique_domains":"863","queries_forwarded":"26,955","queries_cached":"161,974","clients_ever_seen":"17","unique_clients":"17","dns_queries_all_types":"199,878","reply_NODATA":"66","reply_NXDOMAIN":"31","reply_CNAME":"2,715","reply_IP":"1,333","privacy_level":"0","status":"enabled","gravity_last_updated":{"file_exists":true,"absolute":1556416208,"relative":{"days":"3","hours":"10","minutes":"13"}}} Pi-Hole Status: enabled Todays Percentage Blocked: 5.5

Qrome commented 5 years ago

Use the web interface and try loading the compiled binary in the release. Also, what eap8266 core are you using?

Please provide as much information as you can about your setup.
ESP8266 core version? What Board are you using? What Board is selected in the IDE?

Have you tried running the pre-compiled binary file?

Qrome commented 5 years ago

Is it possible your issue is due to your network configuration? It does not even appear it is getting good responses. Perhaps you have naproxy (or basic auth) configured on your pi-hole? It isn't getting JSON responses to even try to parse them.

Is the IP of your Pi-hole Monitor on the same subnet as your Pi-hole Server?

DerSeb90 commented 5 years ago

I'm using an Wemos d1 mini. ESP8266 Core. Pre Compiled Filed also not work. Connection is ab 90-100% and same Subnet. platform = espressif8266 Manual API Connection Works without Problems. No Proxy.

DerSeb90 commented 5 years ago

The OctoPrint Monitor works like a charm btw.

Qrome commented 5 years ago

From the errors, it is connection issue. It is failing on the initial connection to your pi-hole server. I have a couple of these running as well as the class running in my Scrolling Clock and do not have any issues getting connected -- every time.

Not sure but I wonder if the platform = espressif8266 might cause it to work differently.

DerSeb90 commented 5 years ago

There was an Board Update on PlatformIO. Now its working like a charm every time. Thank you for the Project.