qrome / printer-monitor Goto Github PK
View Code? Open in Web Editor NEWOctoPrint 3D Printer Monitor using Wemos D1 Mini ESP8266
License: MIT License
OctoPrint 3D Printer Monitor using Wemos D1 Mini ESP8266
License: MIT License
I can't seem to get the configuration right. I keep getting the forbidden error. There are a couple new fields in the config that was not in the video I was watching. The video was 1.2 and this is 1.7. The API key and IP address are correct. How critical is the host name, OctoPrint User/Password? I have tried my main username/password without success and even added another account, but with no luck.
Adding a battery shield for full Wireless use is without a doubt possible. But I'm wondering if you could read the battery level through one of the analog pins every so often and display it on the display?
The configuration page of the web interface correctly saves the www_password when the save button is pressed, but when the page loads the next time, the field is cleared again (which I think is also the right choice). The trouble is that if you hit save again, to save another setting, the password gets cleared. And then you're locked out, unless you enter a blank password in the authentication dialog.
I was thinking that you could either:
a) check for an empty password, and choose not to set www_password if it's empty, but someone might want an empty password, IDK.
b) set the field to something weird, like notapassword and then if the form comes back as notapassword, then you don't set www_password. Then you wouldn't be able to have "notapassword" as your password, but maybe it's OK to make someone mad?
hey, have some problems while compiling.
do your have a solution?
thank you!
error messages:
Arduino: 1.8.5 (Linux), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
sketch/OctoPrintClient.cpp: In member function 'void OctoPrintClient::getPrinterJobResults()':
OctoPrintClient.cpp:125: error: 'DynamicJsonBuffer' was not declared in this scope
DynamicJsonBuffer jsonBuffer(bufferSize);
^
sketch/OctoPrintClient.cpp:125:3: note: suggested alternative:
In file included from /home/sascha/Arduino/libraries/ArduinoJson/src/ArduinoJson/DynamicJsonDocument.hpp:10:0,
from /home/sascha/Arduino/libraries/ArduinoJson/src/ArduinoJson.hpp:9,
from /home/sascha/Arduino/libraries/ArduinoJson/src/ArduinoJson.h:9,
from sketch/OctoPrintClient.h:26,
from sketch/OctoPrintClient.cpp:24:
/home/sascha/Arduino/libraries/ArduinoJson/src/ArduinoJson/Memory/DynamicJsonBuffer.hpp:159:5: note: 'ArduinoJson::Internals::DynamicJsonBuffer'
DynamicJsonBuffer;
^
OctoPrintClient.cpp:125: error: expected ';' before 'jsonBuffer'
DynamicJsonBuffer jsonBuffer(bufferSize);
^
OctoPrintClient.cpp:128: error: 'jsonBuffer' was not declared in this scope
JsonObject& root = jsonBuffer.parseObject(printClient);
^
OctoPrintClient.cpp:161: error: expected ';' before 'jsonBuffer2'
DynamicJsonBuffer jsonBuffer2(bufferSize2);
^
OctoPrintClient.cpp:164: error: 'jsonBuffer2' was not declared in this scope
JsonObject& root2 = jsonBuffer2.parseObject(printClient);
^
exit status 1
'DynamicJsonBuffer' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I like using the hostname for OTA, otherwise in the Arduino IDE port menu it shows up as a ESP8266xxxx....
In the Setup(), I added the line:
ArduinoOTA.setHostname((const char *)hostname.c_str());// added line
ArduinoOTA(begin);// original line
In the Arduino port menu it now shows "Octomon at xxx.xxx.xxx.xxx" or whatever the hostname is set to. Handy in the event you have a workshop full of ESP8266's...:-)
Mel
Hi. How do you update the firmware through the interface? Do I need to compile my own .bin file?
I just updated to v2.1 and I am not getting a connection failed on the web page and the display says the printer is offline. I am able to get to the printer on my PC's web browser. I have a second monitor that is v1.7 and when I change the IP address and API key, connects up fine (both printer uses the same user name/password). Watching the serial monitor, I don't get any addition information to explain what the issue is.
Signal Strength (RSSI): 94%
Signal Strength (RSSI): 96%
Getting Octoprint Data
GET /api/job HTTP/1.1
Connection to OctoPrint failed: 192.168.1.170:80
When I compile latest master against latest libraries, I get:
sketch/OctoPrintClient.cpp: In member function 'void OctoPrintClient::updateOctoPrintClient(String, String, int, String, String)':
OctoPrintClient.cpp:38: error: no matching function for call to 'base64::encode(String&, bool)'
encodedAuth = b64.encode(userpass, true);
^
sketch/OctoPrintClient.cpp:38:44: note: candidates are:
In file included from sketch/OctoPrintClient.h:27:0,
from sketch/OctoPrintClient.cpp:24:
/home/kleinhenz/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/base64.h:30:23: note: static String base64::encode(uint8_t*, size_t)
static String encode(uint8_t * data, size_t length);
^
/home/kleinhenz/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/base64.h:30:23: note: no known conversion for argument 1 from 'String' to 'uint8_t* {aka unsigned char*}'
/home/kleinhenz/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/base64.h:31:23: note: static String base64::encode(String)
static String encode(String text);
^
/home/kleinhenz/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/base64.h:31:23: note: candidate expects 1 argument, 2 provided
exit status 1
[Error] Exit with code=1
Any ideas?
HI, would it be possible that PRINTER_MONITOR, check the same information form two different octorint instances.
IT would require duplication of the OctoPrintClient.h and allow version OctoPrintClient1 and OctoPrintClient2 in configuration.
This way we don't need one monitor per printer...
Thanks!
hey, is it possible to add a authentication for the OTA flashing?
thank you!
Hello!
The screen just doesn't work tried different pins added pull-up resistors 5v or 3.3v
But if i use the adrafruit ssd1306 library it works.
Any tips?
TIA
Would be nice to have an (additional) configuration option to display weather when octoprint server is connected but no print job is running.
I was having a few declaration errors, it seemed each time I would fix one another would pop up.
I found that the libraries used need to be at specific builds and not necessarily the newest build will work.
Arduino IDE
v1.8.10.0
Board Mangaer
esp8266 needs to be at v2.4.1
Library Manger
WifiManager needs to be at v0.12.0
ArduinoJson needs to be at v5.13.1
and the
SSD1306 needs to be at v4
Hope this helps
String WEB_ACTIONS = "<a class='w3-bar-item w3-button' href='/'><i class='fa fa-home'></i> Inicio</a>"
"<a class='w3-bar-item w3-button' href='/configure'><i class='fa fa-cog'></i> Configurar</a>"
"<a class='w3-bar-item w3-button' href='/configureweather'><i class='fa fa-cloud'></i> Tiempo</a>"
"<a class='w3-bar-item w3-button' href='/systemreset' onclick='return confirm(\"¿Estas seguro que quieres reniciar la configuracion?\")'><i class='fa fa-undo'></i> Reset Settings</a>"
"<a class='w3-bar-item w3-button' href='/forgetwifi' onclick='return confirm(\"¿Estas seguro que quieres olvidar la configuracion wifi\")'><i class='fa fa-wifi'></i> Forget WiFi</a>"
"<a class='w3-bar-item w3-button' href='/update'><i class='fa fa-wrench'></i>Actualizar Firmware</a>"
"<a class='w3-bar-item w3-button' href='https://github.com/Qrome' target='_blank'><i class='fa fa-question-circle'></i> Informacion</a>";
When Printer-monitor detects Octoprint is operational, it changes from "clock" to the 3 sliding displays. If you do not do a print job, but power down Octoprint, printer monitor changes back to the "clock" mode.
However, if any print job has been started or ended and then Octoprint is shutdown, Printer Monitor remains in the operational state (sliding displays of the last print job).
In OctoprintClient.ccp, two lines added in the OctoPrintClient::getSubmitRequest will correct it.
The line is:
printerData.isPrinting = false;// so we aren't printing if the connection failed
Add it after nulling out the printerData.state="" lines
WiFiClient OctoPrintClient::getSubmitRequest(String apiGetData) {
WiFiClient printClient;
printClient.setTimeout(5000);
Serial.println("Getting Octoprint Data");
Serial.println(apiGetData);
result = "";
if (printClient.connect(myServer, myPort)) { //starts client connection, checks for connection
printClient.println(apiGetData);
printClient.println("Host: " + String(myServer) + ":" + String(myPort));
printClient.println("X-Api-Key: " + myApiKey);
printClient.println("User-Agent: ArduinoWiFi/1.1");
printClient.println("Connection: close");
if (printClient.println() == 0) {
Serial.println("Connection to " + String(myServer) + ":" + String(myPort) + " failed.");
Serial.println();
printerData.error = "Connection to " + String(myServer) + ":" + String(myPort) + " failed.";
printerData.state = "";
printerData.isPrinting = false;// if the connection failed, switch back to clock (not printing)
return printClient;
}
}
else {
Serial.println("Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println();
printerData.error = "Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort);
printerData.state = "";
printerData.isPrinting = false;// if the connection failed, switch back to clock (not printing)
return printClient;
}
I'm using NodeMCU 1.0's, but I had to add an option to rotate the display into its normal orientation.
Settings.h
boolean INVERT_DISPLAY = true;// flip the display to normal orientation, pins at top when viewing the face
printermonitor
// initialize display
display.init();
if (INVERT_DISPLAY == true) display.flipScreenVertically();// connections at top of OLED display
// Initial UI takes care of initializing the display too.
ui.init();
if (INVERT_DISPLAY == true) display.flipScreenVertically();//connections at top of OLED display
When i trye to acess /configure from the menu, is says login and when i use the default admin/password it wait a littel and then ask for login again, and this dos i over and over again :-)
I get this error message:
Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
sketch\OctoPrintClient.cpp: In member function 'void OctoPrintClient::getPrinterJobResults()':
OctoPrintClient.cpp:125: error: 'DynamicJsonBuffer' was not declared in this scope
DynamicJsonBuffer jsonBuffer(bufferSize);
^
sketch\OctoPrintClient.cpp:125:3: note: suggested alternative:
In file included from C:\Users\kylem\OneDrive\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/DynamicJsonDocument.hpp:10:0,
from C:\Users\kylem\OneDrive\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:9,
from C:\Users\kylem\OneDrive\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from sketch\OctoPrintClient.h:26,
from sketch\OctoPrintClient.cpp:24:
C:\Users\kylem\OneDrive\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Memory/DynamicJsonBuffer.hpp:159:5: note: 'ArduinoJson::Internals::DynamicJsonBuffer'
DynamicJsonBuffer;
^
OctoPrintClient.cpp:125: error: expected ';' before 'jsonBuffer'
DynamicJsonBuffer jsonBuffer(bufferSize);
^
OctoPrintClient.cpp:128: error: 'jsonBuffer' was not declared in this scope
JsonObject& root = jsonBuffer.parseObject(printClient);
^
OctoPrintClient.cpp:161: error: expected ';' before 'jsonBuffer2'
DynamicJsonBuffer jsonBuffer2(bufferSize2);
^
OctoPrintClient.cpp:164: error: 'jsonBuffer2' was not declared in this scope
JsonObject& root2 = jsonBuffer2.parseObject(printClient);
^
exit status 1
'DynamicJsonBuffer' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Why it shows AM/PM even in 24h mode? It is possible to show something else instead? I don't know current time or weather temperature. It's odd seeing 15:30 PM, very appreciated, thanks
Showing while compiling the sketch ('DynamicJsonBuffer' was not declared in this scope) plz suggest
I tried to use my duckdns address to connect to my octoprit so I can use my monitor at work. When I enter the duckdns address and save it, the config page reverts back to the internal ip of octoprit.
Is it possible to use a web URL to connect?
For some reason my 1.3" OLED display from Waveshare did not work out of the box. I managed to make it work by resetting the display before initializing. I added this:
pinMode(D3, OUTPUT);
digitalWrite(D3, HIGH);
delay(1);
digitalWrite(D3, LOW);
delay(10);
digitalWrite(D3, HIGH);
before display.init();
in the setup function.
(D3 is connected to the OLED's reset pin)
It would be great if in addition to Printing Time and Time Remaining the print monitor had an ETA screen with displaying (current time+time remaining).
something like this maybe? https://github.com/pablogventura/Octoprint-ETA/blob/master/octoprint_eta/__init__.py
Hi there,
Would it be possible to show the weather when the print is complete instead of only when it's off-line? I leave octoprint on-line even when I'm not printing so with the current config the weather would never show. It would be awesome if - after the print is finished - it switched to the weather display.
Compiling on Arduino 1.8.5 fails with the following error:
'class OLEDDisplayUi' has no member named 'disableAllIndicators'
I was wondering if any plans to enable this to monitor prints directly from a printer running RepRap Firmware (I.e. on a Duet) without having to have a Pi running Octoprint acting as a middle man?
Thanks!
Hey Ho Guys,
I just got all parts out of my Letterbox, threw everything together and was about to program my wemo but I can'nt figure out whats the Problem with this error status U_u
At least there is no issue about this yet
Cheers
Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, Enabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
sketch\TimeClient.cpp: In member function 'long int TimeClient::getCurrentEpochWithUtcOffset()':
TimeClient.cpp:151: error: invalid operands of types 'double' and 'long int' to binary 'operator%'
return round(getCurrentEpoch() + 3600 * myUtcOffset + 86400L) % 86400L;
^
exit status 1
invalid operands of types 'double' and 'long int' to binary 'operator%'
Hi, I have this fantastic project up and running, one question for this 1.3 display. The entire display is shifted down one pixel or line I guess is more accurate, the bottom row of the word 'offline' is missing.
Any way to edit some line in IDE to raise it up one line, am digging around but this is well above my head currently, am working on it.
Thank you very much
When the Printing Time and/or Time remaining is over 24 hours it only shows the remainder of hours above any 24/48/72 hour full days. On a long print currently running I have Print time of 54:37:15 shown on octoprint web interface with 6:37:45 on the print monitor. The remaining time is now under 24 hours, but a similar effect was happening with the Remaining Time when it was 25:15:10 on the web/telegram plugin it showed 1:15:10 on the printer monitor.
How can the code be updated to accommodate times greater than 24 hours?
It's possible to add Multilingual support for OpenWeatherMap
I have try and it works on French
add &lang=xx on apiGetData
and add xx on setting.h with this choice :
Arabic - ar, Bulgarian - bg, Catalan - ca, Czech - cz, German - de, Greek - el, English - en, Persian (Farsi) - fa, Finnish - fi, French - fr, Galician - gl, Croatian - hr, Hungarian - hu, Italian - it, Japanese - ja, Korean - kr, Latvian - la, Lithuanian - lt, Macedonian - mk, Dutch - nl, Polish - pl, Portuguese - pt, Romanian - ro, Russian - ru, Swedish - se, Slovak - sk, Slovenian - sl, Spanish - es, Turkish - tr, Ukrainian - ua, Vietnamese - vi, Chinese Simplified - zh_cn, Chinese Traditional - zh_tw.
Thanks for your work
Is there perhaps any change you will include the news headlines module from your "marquee-scroller" project into the printer-monitor?
This will make your printer-monitor even more awesome!
Thx for the project anyway
In the input field "OctoPrint Address (do not include http://)" I can't seem to add domains or subdomains instead of IP. This makes me unable to use different monitors for different instances. I also can't choose which printer to monitor, since it defaults to one of them only.
Please update with this functionality.
I would like to add the ability to see the current Z position during a print. I often need this when awaiting a color change or just to see how things are moving along.
I looked at the Octoprint API and it looks like this is only available with a push request from Octoprint, not as something I can query.
Can this be added or can someone advise me on how?
Thanks
When Octoprint installs you always have to give it a name as it appears on the network, so I figured why not use it instead of a hard coded, sometimes prone to change, IP?
Let Printer Monitor do a scan at the startup, find the matching name that was used for the Octoprint install, then set the IP itself. Regardless of the router changes, printer monitor will always find Octoprint's IP.
Settings.h
String OctoPrintServer = "x.x.x.x"; // IP or Address of your OctoPrint Server (DO NOT include http://)
String OctoHostName = "DROOLER";// name of the octoprint install
printermonitor
void setup() {
findMDNS();// insert as very last line in setup(), go find Octoprint
}
void findMDNS() {
// We now query our network for 'web servers' service
// over tcp, and get the number of available devices
int n = MDNS.queryService("http", "tcp");
if (n == 0) {
Serial.println("no services found");
}
else {
for (int i = 0; i < n; ++i) {
// Going through every available service,
// we're searching for the one whose hostname
// matches what we want, and then get its IP
//Serial.println(MDNS.hostname(i));
//Serial.println(MDNS.IP(i));
//Serial.println(MDNS.port(i));
if (MDNS.hostname(i) == OctoHostName) {
OctoPrintServer = String(MDNS.IP(i));// shove in the IP of the octoprint instance
}
}
}
}
Right after uploading, my screen suddenly went static. The static isn't moving, but there's a black bar across the screen that jumps around every once in a while. If anyone knows what's up please help. Thanks!
When the available wifi network isn't available, the default 8266 name is ESP + chip ID, and if you have a shop full of 8266's kind of hard to remember all the chip ID's.
//or use this for auto generated name ESP + ChipID
wifiManager.autoConnect();
Suggest a change to use the user defined Hostname instead:
// wifiManager.autoConnect();// old line
if (!wifiManager.autoConnect(HOSTNAME)) {// new addition
delay(3000);
WiFi.disconnect(true);
ESP.reset();
delay(5000);
}
//
Hostname will then show up as the access point.
Mel
Hello
I compiled code v2.3 and put it into a wemos d1 mini with SSH1106 display (I use D3 & D4) and it is all ok till display the message to use the web server with ip address and port... From the serial I see the sketch running, downloading time and weather forecast, all seems ok. On the display I don't get any update after the first message, logo, and ip and port address!
Please note that on the same hardware with the same arduino IDE and same libraries I run the weather station demo from thingpulse (same libraries used as you) and all is ok... Can't figure out what is going wrong...
Like the #46
I change the settings.h before the first upload to the Wemos.. BTW if i change by the web interface the port is stuck at value 80
If would be nice it it is possible to set the hostname of the device so that it gets registered in DNS correctly and not with a default unique (in my case esp_1d8650) name.
Can be through the UI or in the initial configuration when compiling the firmware.
When compiling I get the following error:
`Arduino: 1.8.5 (Windows 7), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
C:\Users\Isaac\Desktop\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawWeather(OLEDDisplay*, OLEDDisplayUiState*, int16_t, int16_t)':
printermonitor:808: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'const char*' [-fpermissive]
display->setFont((const uint8_t*)Meteocons_Plain_42);
^
In file included from C:\Users\Isaac\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/SH1106Wire.h:31:0,
from sketch\Settings.h:48,
from C:\Users\Isaac\Desktop\printer-monitor-master\printermonitor\printermonitor.ino:28:
C:\Users\Isaac\Documents\Arduino\libraries\esp8266-oled-ssd1306-master/OLEDDisplay.h:187:10: error: initializing argument 1 of 'void OLEDDisplay::setFont(const char*)' [-fpermissive]
void setFont(const char *fontData);
^
exit status 1
invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'const char*' [-fpermissive]
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`
When trying to compile I get this error. Any ideas?
`Arduino: 1.6.8 (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void setup()':
printermonitor:172: error: 'readSettings' was not declared in this scope
readSettings();
^
printermonitor:256: error: 'displayPrinterStatus' was not declared in this scope
server.on("/", displayPrinterStatus);
^
printermonitor:257: error: 'handleSystemReset' was not declared in this scope
server.on("/systemreset", handleSystemReset);
^
printermonitor:258: error: 'handleWifiReset' was not declared in this scope
server.on("/forgetwifi", handleWifiReset);
^
printermonitor:259: error: 'handleUpdateConfig' was not declared in this scope
server.on("/updateconfig", handleUpdateConfig);
^
printermonitor:260: error: 'handleUpdateWeather' was not declared in this scope
server.on("/updateweatherconfig", handleUpdateWeather);
^
printermonitor:261: error: 'handleConfigure' was not declared in this scope
server.on("/configure", handleConfigure);
^
printermonitor:262: error: 'handleWeatherConfigure' was not declared in this scope
server.on("/configureweather", handleWeatherConfigure);
^
printermonitor:263: error: 'redirectHome' was not declared in this scope
server.onNotFound(redirectHome);
^
printermonitor:289: error: 'flashLED' was not declared in this scope
flashLED(5, 500);
^
printermonitor:290: error: 'findMDNS' was not declared in this scope
findMDNS(); //go find Octoprint Server by the hostname
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void findMDNS()':
printermonitor:315: error: 'writeSettings' was not declared in this scope
writeSettings(); // update the settings
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void loop()':
printermonitor:326: error: 'getMinutesFromLastRefresh' was not declared in this scope
if((getMinutesFromLastRefresh() >= minutesBetweenDataRefresh) || lastEpoch == 0) {
^
printermonitor:327: error: 'getUpdateTime' was not declared in this scope
getUpdateTime();
^
printermonitor:346: error: 'checkDisplay' was not declared in this scope
checkDisplay(); // Check to see if the printer is on or offline and change display.
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleSystemReset()':
printermonitor:382: error: 'redirectHome' was not declared in this scope
redirectHome();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleUpdateWeather()':
printermonitor:395: error: 'writeSettings' was not declared in this scope
writeSettings();
^
printermonitor:397: error: 'checkDisplay' was not declared in this scope
checkDisplay();
^
printermonitor:399: error: 'redirectHome' was not declared in this scope
redirectHome();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleUpdateConfig()':
printermonitor:421: error: 'writeSettings' was not declared in this scope
writeSettings();
^
printermonitor:424: error: 'checkDisplay' was not declared in this scope
checkDisplay();
^
printermonitor:426: error: 'redirectHome' was not declared in this scope
redirectHome();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleWifiReset()':
printermonitor:435: error: 'redirectHome' was not declared in this scope
redirectHome();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleWeatherConfigure()':
printermonitor:454: error: 'getHeader' was not declared in this scope
html = getHeader();
^
printermonitor:474: error: 'getFooter' was not declared in this scope
html = getFooter();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void handleConfigure()':
printermonitor:494: error: 'getHeader' was not declared in this scope
html = getHeader();
^
printermonitor:527: error: 'getFooter' was not declared in this scope
html = getFooter();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void displayMessage(String)':
printermonitor:542: error: 'getHeader' was not declared in this scope
String html = getHeader();
^
printermonitor:545: error: 'getFooter' was not declared in this scope
html = getFooter();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'String getHeader()':
printermonitor:564: error: too many arguments to function 'String getHeader()'
return getHeader(false);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino:563:8: note: declared here
String getHeader() {
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void displayPrinterStatus()':
printermonitor:659: error: 'zeroPad' was not declared in this scope
html += "Est. Print Time Left: " + zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds) + "<br>";
^
printermonitor:689: error: 'getSpeedSymbol' was not declared in this scope
html += weatherClient.getWind(0) + " <span class='w3-tiny'>" + getSpeedSymbol() + "</span> Wind<br>";
^
printermonitor:693: error: 'getTempSymbol' was not declared in this scope
html += weatherClient.getTempRounded(0) + getTempSymbol(true) + "<br>";
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void configModeCallback(WiFiManager*)':
printermonitor:727: error: 'flashLED' was not declared in this scope
flashLED(20, 50);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawScreen2(OLEDDisplay*, OLEDDisplayUiState*, int16_t, int16_t)':
printermonitor:765: error: 'zeroPad' was not declared in this scope
String time = zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawScreen3(OLEDDisplay*, OLEDDisplayUiState*, int16_t, int16_t)':
printermonitor:782: error: 'zeroPad' was not declared in this scope
String time = zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawWeather(OLEDDisplay*, OLEDDisplayUiState*, int16_t, int16_t)':
printermonitor:802: error: 'getTempSymbol' was not declared in this scope
display->drawString(0 + x, 0 + y, weatherClient.getTempRounded(0) + getTempSymbol());
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'String getTempSymbol()':
printermonitor:813: error: too many arguments to function 'String getTempSymbol()'
return getTempSymbol(false);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino:812:8: note: declared here
String getTempSymbol() {
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawHeaderOverlay(OLEDDisplay*, OLEDDisplayUiState*)':
printermonitor:874: error: 'drawRssi' was not declared in this scope
drawRssi(display);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void drawClockHeaderOverlay(OLEDDisplay*, OLEDDisplayUiState*)':
printermonitor:891: error: 'drawRssi' was not declared in this scope
drawRssi(display);
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void writeSettings()':
printermonitor:946: error: 'readSettings' was not declared in this scope
readSettings();
^
G:\Documents\Arduino\printer-monitor-master\printer-monitor-master\printermonitor\printermonitor.ino: In function 'void checkDisplay()':
printermonitor:1062: error: 'enableDisplay' was not declared in this scope
enableDisplay(true);
^
printermonitor:1074: error: 'enableDisplay' was not declared in this scope
enableDisplay(false);
^
printermonitor:1080: error: 'enableDisplay' was not declared in this scope
enableDisplay(true);
^
exit status 1
'readSettings' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`
Using current master branch revision results in a crash loop after wifi settings have been configured if ENABLE_OTA is set to false in Settings.h. No other settings have been changed. Everything works as expected during manual wifi configuring but once the configuration has been given then a crash loop follows and the web interface can't be accessed for further configuration. This appears to happen only if ENABLE_OTA = false. With the default "true" value everything works as expected.
Tested with Arduino 1.8.7, WiFiManager 0.14.0, esp8266 2.4.2, so essentially the latest ones. Not sure if this issue is library or implementation related.
Serial console shows the following output repeating:
18:42:06.482 -> load 0x4010f000, len 1384, room 16
18:42:06.482 -> tail 8
18:42:06.482 -> chksum 0x2d
18:42:06.482 -> csum 0x2d
18:42:06.515 -> vbb28d4a3
18:42:06.515 -> ~ld
18:42:06.647 -> UtcOffset=-7.00
18:42:06.647 -> OctoPrintApiKey=
18:42:06.647 -> OctoPrintHostName=octopi
18:42:06.647 -> OctoPrintServer=
18:42:06.647 -> OctoPrintPort=80
18:42:06.647 -> OctoAuthUser=
18:42:06.647 -> OctoAuthPass=
18:42:06.647 -> minutesBetweenDataRefresh=15
18:42:06.647 -> themeColor=light-green
18:42:06.681 -> www_username=admin
18:42:06.681 -> www_password=password
18:42:06.681 -> DISPLAYCLOCK=1
18:42:06.681 -> IS_24HOUR=0
18:42:06.681 -> DISPLAYWEATHER=1
18:42:06.681 -> WeatherApiKey=
18:42:06.681 -> CityID: 5304391
18:42:06.681 -> IS_METRIC=0
*WM:
18:42:06.747 -> *WM: AutoConnect
18:42:06.747 -> *WM: Connecting as wifi client...
18:42:06.747 -> *WM: Using last saved values, should be faster
*WM: Connection result:
18:42:11.649 -> *WM: 3
18:42:11.649 -> *WM: IP Address:
18:42:11.649 -> *WM: 192.168.0.246
Signal Strength (RSSI): 90%
18:42:11.682 -> Server started
18:42:11.682 -> Use this URL : http://192.168.0.246:80/
18:42:19.201 -> Exception (28):
18:42:19.201 -> epc1=0x4021735a epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
18:42:19.234 ->
18:42:19.234 -> ctx: cont
18:42:19.234 -> sp: 3ffffbf0 end: 3fffffd0 offset: 01a0
18:42:19.234 ->
18:42:19.234 -> >>>stack>>>
18:42:19.234 -> 3ffffd90: 3ffffe60 3ffffe50 0000000c 00000002
18:42:19.234 -> 3ffffda0: 3ffeb676 001863be 00000000 33fffe80
18:42:19.234 -> 3ffffdb0: 3ffffe80 3ffffe70 00000018 4021dd1c
18:42:19.234 -> 3ffffdc0: 4021dd08 3fffff5c 3fffff68 40220544
18:42:19.234 -> 3ffffdd0: 3ffffe82 00000010 3ffe866c 3ffffe00
18:42:19.268 -> 3ffffde0: 40217353 3fff1ee0 00000001 401004e8
18:42:19.268 -> 3ffffdf0: 7474685f 3ffe0070 3fff1ee0 402172b0
18:42:19.268 -> 3ffffe00: 00000010 00000010 00000000 f600a8c0
18:42:19.268 -> 3ffffe10: 00ffffff 0100a8c0 61636f6c 745f006c
18:42:19.268 -> 3ffffe20: 3f007063 00000000 00000005 00000004
18:42:19.301 -> 3ffffe30: 00000005 005f0000 3fff1fd9 40201c3d
18:42:19.301 -> 3ffffe40: 3ffffdf0 00000001 00000017 00000074
18:42:19.301 -> 3ffffe50: 40104d40 003c7ba5 3fff2150 4021dd1c
18:42:19.301 -> 3ffffe60: 3fff1e88 3fff1ee0 00000000 4020cdc7
18:42:19.301 -> 3ffffe70: 3ffe8524 00000005 4021cbc8 3fffefb0
18:42:19.334 -> 3ffffe80: 40201d42 000001f4 000001f4 40201d37
18:42:19.334 -> 3ffffe90: 00000075 00000004 000001f4 4020b6b8
18:42:19.334 -> 3ffffea0: 4021dd08 3fffff5c 3fff1e00 4021dd1c
18:42:19.334 -> 3ffffeb0: 4021dd08 3fffff5c 3fff1e00 4020dc14
18:42:19.334 -> 3ffffec0: 00000000 00000000 3ffeb630 00000000
18:42:19.367 -> 3ffffed0: 3fff5c9c 0000000f 00000000 3fff5cb4
18:42:19.367 -> 3ffffee0: 0000000f 00000000 00000000 00000000
18:42:19.367 -> 3ffffef0: 00000000 4021ee90 00000000 4021ee90
18:42:19.367 -> 3fffff00: 00000000 4021ee90 00000000 4021ee90
18:42:19.367 -> 3fffff10: 00000000 4021ee90 00000000 4021ee90
18:42:19.400 -> 3fffff20: 00000000 00000000 ffffffff fe000001
18:42:19.400 -> 3fffff30: 3ffe8a52 00000000 fe01ef35 4020d270
18:42:19.400 -> 3fffff40: 00000000 0000000a 3fff5ccc 00000000
18:42:19.400 -> 3fffff50: 00000000 00000000 4021dd08 00000000
18:42:19.400 -> 3fffff60: 00000000 00000000 00000000 00000000
18:42:19.433 -> 3fffff70: 00000000 00000000 00000000 00000000
18:42:19.433 -> 3fffff80: 3fff5cfc 0000000f 0000000d 4021ee90
18:42:19.433 -> 3fffff90: f600a8c0 feefeffe feefeffe feefeffe
18:42:19.433 -> 3fffffa0: feefeffe feefeffe feefeffe 3fff20f4
18:42:19.433 -> 3fffffb0: 3fffdad0 00000000 3fff20ec 4021cc4c
18:42:19.466 -> 3fffffc0: feefeffe feefeffe 3ffe866c 40100739
18:42:19.466 -> <<<stack<<<
18:42:19.466 ->
18:42:19.466 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)
Probably just my preference but on my LCD printer displays that I've been staring at for the last 3,700 hours (2004 LCD's Marlin) they always read tool temp/bed temp.
I added the orientation as an option:
Settings.h
boolean SHOW_TOOL_BED = true;// left right orientation of temp displays
printermonitor
void drawScreen1(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->setFont(ArialMT_Plain_16);
int bed = printerClient.getTempBedActual().toInt();
int tool = printerClient.getTempToolActual().toInt();
if (SHOW_TOOL_BED == true) {// shows tool temp/bed temp
display->drawString(64 + x, 0 + y, "Tool / Bed Temp");
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(ArialMT_Plain_24);
display->drawString(2 + x, 14 + y, String(tool));
display->drawString(76 + x, 14 + y, String(bed));
display->setFont(ArialMT_Plain_16);
display->drawString(42 + x, 14 + y, "C");
display->drawString(104 + x, 14 + y, "C");
} else {
display->drawString(64 + x, 0 + y, "Bed / Tool Temp");
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(ArialMT_Plain_24);
display->drawString(2 + x, 14 + y, String(bed));
display->drawString(64 + x, 14 + y, String(tool));
display->setFont(ArialMT_Plain_16);
display->drawString(38 + x, 14 + y, "C");
display->drawString(115 + x, 14 + y, "C");
}
}
Mel
I edit the OctoPrintPort value in settings.h but don't work. I have Octoprint listening on port 8000
Hi,
I'm getting this issue -
sketch/OpenWeatherMapClient.cpp: In member function 'void OpenWeatherMapClient::updateWeather()':
OpenWeatherMapClient.cpp:78:3: error: 'DynamicJsonBuffer' was not declared in this scope
DynamicJsonBuffer jsonBuffer(bufferSize);
Apparently it's been seen before but was "fixed" Anyone know how did you fix it please?
Please add the functionality for setting our own NTP server + country/city for the time. This would resolve having to set UTC offsets manually, especially with daylights savings
I noticed that in the home page (web interface) there is the english term and local term between () for weather condition, although on the display, no matter what language you set in the settings file, you always have the english term for weather condition.
Is it correct? Some weather condition in italian are very long words and maybe you evaluated not feasible to put it in the display...
Request to add basic auth support using haproxy. Currently if haproxy is in use with basic auth a HTTP/1.0 401 Unauthorized response is given.
So as the tile says ...
when I try to configure the Wemos through the web page the Wemos simply reset.
I can't even change the source code because it doesn't change anything.
It can be the fault of my Wemos (maybe somewhere broken), I wait a new one but I'm wondering if someone has the same issue.
Thank for you project it's awesome btw !
I have Problems at the moment my printer finished. After that, time remainig displays an old value. Is it possible to fix it or give a message, finished?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.