Pi-hole Monitor Wemos D1 ESP8266

by Qrome Apr 19, 2019
Download All Files

Thing Apps Enabled

Please Login to Comment

Cool idea - troubleshooting now.
Threw a previously running octomonitor build into a case ..
Pulled the code from Github.

Won't compile :
Arduino: 1.8.9 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled, ck, 26 MHz, 40MHz, DOUT (compatible), 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\Mike\Desktop\Pi-hole-Monitor-master\Pi-hole-Monitor-master\piholemonitor\piholemonitor.ino:28:0:

Settings.h:73:21: error: 'D2' was not declared in this scope

const int SDA_PIN = D2;


Settings.h:74:21: error: 'D5' was not declared in this scope

const int SCL_PIN = D5;


exit status 1
'D2' was not declared in this scope

Been over it several times now, don't know what I'm missing.

Ahh so the problem I found is that it won't compile for a 'Generic 8266'
Only compiles for the Wimos D1 R1.
I used the generic on the octomonitors, lets see if this works.

Nope, no luck.
Compiled fine with Wemos D1 R1, but when uploaded to my Generic board it gives me a blank.
Yes, set the 1M SPIFFS.

I know the hardware is good, as the display and board were running your Octomonitor fine before this sketch upload.

It pings as an unknown board, so I'll have to dig into the board mnfr or pick up some Wemos D1 R1's.

How is it wired to the OLED? Are you using the diagram? It uses the exact same code base as my Printer Monitor. I flip between them as well.

Select Board: "WeMos D1 R2 & mini"

Wow, and from your first post -- you were way off. Wrong board, no spiffs. Do you even have the latest libs installed?

Please use GitHub for trouble shooting the code.

Followup: Thanks for the reply, and I've got success.
Yes, thanks. As above The hardware / wiring was known good, as this hardware was an old Ocomonitor that was running before reflashing to the Pihole monitor.
the prblem was the board selection.
The Octomonitor uploaded and ran on these boards as set to Generic 8266.
The Pihole monitor would not.

I've got generic 8266 12F boards.
I used the Node MCU ESP-12E module board,
rewrote the entire flash,
and had a successful compile and it's running now.

Glad to hear. Just an FYI -- both Printer Monitor and Pi-hole Monitor have the exact same code base -- only difference is the data sources. They should both compile and work with the same board selected. Thanks for the update.

Thanks for the followup.
Agreed, they appeared to have the same codebase, and I haven't used my Arduino IDE since the last buildouts of the 4 Octomonitors (with the same hardware) - and the Generic 8266 was selected already... probably a missclick after configuring the others - thus the confusion. There were only 512 (No Spiffs) etc available, and it wouldn't compile because of the pinouts - thus the initial confusion.

My only exp with the 8266 has been your Octomonitors, so this was a great learning experience.
I've got Node MCU compatable ESP-12F boards : https://amzn.to/2Por0Zr
It would compile but not run with the Wemos D1 R1 selected.
Worked great with the ESP12E board selected.

Thanks again for the great project.
I made some new ESP8266 cases, I'll upload later tonight.

Those are exactly the boards I use as well. The ESP-12F-- they compile with the "LOLIN(WEMOS) D1 R2 & mini" -- using the board from the ESP8266 2.5.0 core.

Cool as hell. Adafruit had an awesome tutorial on the pi-hole idea, this is an incredible step forward.

Oh, never saw the tutorial. Thanks -- I can't wait to see the makes.