Skip to content

Commit bdac023

Browse files
authored
Merge pull request #242 from Qrome/3.0
3.0
2 parents c0d3261 + f3abaee commit bdac023

14 files changed

+64
-296
lines changed

Diff for: README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Marquee Scroller (Clock, Weather, News, and More)
22

3+
## NOTICE
4+
The latest version of Marquee Scroller 3.0 works with **ESP8266 Core 3.0.2** -- if you are upgrading from Marquee Scroller 2.X version this may require you to enter in all your API Keys and settings. Always meake sure you have coppied all your API keys somewhere before updating. The ESP8266 Core 3.0.2 uses the newer FS (file system) that may require a fresh start on the configuration.
5+
Make sure you update to the latest version of WifiManager library (link below).
6+
* Removed Bitcoin features in 3.0
7+
38
## Features include:
49
* Accurate Clock refresh off Internet Time Servers
510
* Local Weather and conditions (refreshed every 10 - 30 minutes)
611
* News Headlines from all the major sources
712
* Configured through Web Interface
813
* Display 3D print progress from your OctoPrint Server
9-
* Option to display Bitcoin current value
1014
* Option to display Pi-hole status and graph (each pixel accross is 10 minutes)
1115
* Basic Authorization around Configuration web interface
1216
* Support for OTA (loading firmware over WiFi)
@@ -19,7 +23,7 @@
1923
* Build Video by Chris Riley: https://youtu.be/KqBiqJT9_lE
2024

2125
## Required Parts:
22-
* Wemos D1 Mini: https://amzn.to/2qLyKJd
26+
* Wemos D1 Mini: https://amzn.to/3tMl81U
2327
* Dot Matrix Module: https://amzn.to/2HtnQlD
2428

2529
Note: Using the links provided here help to support these types of projects. Thank you for the support.
@@ -38,27 +42,23 @@ Original Single Panel version: https://www.thingiverse.com/thing:2867294
3842
Double Wide LED version: https://www.thingiverse.com/thing:2989552
3943

4044
## Upgrading from version 2.5 or Higher
41-
Version 2.5 introduced the ability to upgrade pre-compiled firmware from a binary file. In version 2.6 and on you should find binary files that can be uploaded to your marque scrolling clock via the web interface. From the main menu in the web interface select "Firmware Update" and follow the prompts.
42-
* **marquee.ino.d1_mini_2.18.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
43-
* **marquee.ino.d1_mini_wide_2.18.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display
45+
In version 2.6 and higher, the binary files that can be uploaded to your marque scrolling clock via the web interface. From the main menu in the web interface select "Firmware Update" and follow the prompts.
46+
* **marquee.ino.d1_mini_3.0.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
47+
* **marquee.ino.d1_mini_wide_3.0.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display
4448

4549
## Compiling and Loading to Wemos D1
4650
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and installed the required USB drivers etc.
4751
* USB CH340G drivers: https://sparks.gogo.co.nz/ch340.html
4852
* Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. This will add support for the Wemos D1 Mini to Arduino IDE.
49-
* Open Boards Manager from Tools > Board menu and install esp8266 Core platform version **2.5.2**
50-
* Select Board: "LOLIN(WEMOS) D1 R2 & mini"
51-
* Set Flash Size to 1M SPIFFS -- **this project requires SPIFFS for saving and reading configuration settings.**
53+
* Open Boards Manager from Tools > Board menu and install esp8266 Core platform version Latest **3.0.2**
54+
* Select Board: "ESP8266 Boards (3.0.2)" --> "LOLIN(WEMOS) D1 R2 & mini"
55+
* Set Flash Size: 4MB (FS:1MB OTA:~1019KB) -- **this project requires FS for saving and reading configuration settings.**
5256
* Select the **Port** from the tools menu.
5357

5458
## Loading Supporting Library Files in Arduino
5559
Use the Arduino guide for details on how to installing and manage libraries https://www.arduino.cc/en/Guide/Libraries
5660
**Packages** -- the following packages and libraries are used (download and install):
57-
<ESP8266WiFi.h>
58-
<ESP8266WebServer.h>
59-
<WiFiManager.h> --> https://github.com/tzapu/WiFiManager
60-
"FS.h"
61-
<SPI.h>
61+
<WiFiManager.h> --> https://github.com/tzapu/WiFiManager (latest)
6262
<TimeLib.h> --> https://github.com/PaulStoffregen/Time
6363
<Adafruit_GFX.h> --> https://github.com/adafruit/Adafruit-GFX-Library
6464
<Max72xxPanel.h> --> https://github.com/markruys/arduino-Max72xxPanel
@@ -67,12 +67,12 @@ Use the Arduino guide for details on how to installing and manage libraries http
6767
Note ArduinoJson (version 5.13.1) is now included as a library file in version 2.7 and later.
6868

6969
## Initial Configuration
70-
Starting with version 2.0 editing the **Settings.h** file is optional. All API Keys are now managed in the Web Interface except for the GeoNames Key. It is not required to edit the Settings.h file before loading and running the code.
70+
Editing the **Settings.h** file is totally optional and not required. All API Keys are now managed in the Web Interface. It is not required to edit the Settings.h file before loading and running the code.
7171
* Open Weather Map free API key: http://openweathermap.org/ -- this is used to get weather data and the latitude and longitude for the current time zone. Weather API key is required for correct time.
7272
* TimeZoneDB free registration for API key: https://timezonedb.com/register -- this is used for setting the time and getting the correct time zone as well as managing time changes due to Day Light Savings time by regions. This key is set and managed only through the web interface and added in version 2.10 of Marquee Scroller. TimeZoneDB key is required for correct time display.
7373
* News API key (free): https://newsapi.org/ -- Optional if you want to get current news headlines.
7474
* Your OctoPrint API Key -- optional if you use the OctoPrint status.
75-
* Version 2.0 supports Chained 4x1 LED displays -- configure in the Settings.h file.
75+
* Version 2.0 supports Chained 4x1 LED displays -- configure up to 16x1 in the Settings.h file.
7676

7777
NOTE: The settings in the Settings.h are the default settings for the first loading. After loading you will manage changes to the settings via the Web Interface. If you want to change settings again in the settings.h, you will need to erase the file system on the Wemos or use the “Reset Settings” option in the Web Interface.
7878

Diff for: marquee.ino.d1_mini_2.19.bin

-452 KB
Binary file not shown.

Diff for: marquee.ino.d1_mini_3.0.bin

487 KB
Binary file not shown.

Diff for: marquee.ino.d1_mini_wide_2.19.bin

-453 KB
Binary file not shown.

Diff for: marquee.ino.d1_mini_wide_3.0.bin

488 KB
Binary file not shown.

Diff for: marquee/BitcoinApiClient.cpp

-130
This file was deleted.

Diff for: marquee/BitcoinApiClient.h

-54
This file was deleted.

Diff for: marquee/NewsApiClient.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,19 @@ void NewsApiClient::updateNewsClient(String ApiKey, String NewsSource) {
4040
void NewsApiClient::updateNews() {
4141
JsonStreamingParser parser;
4242
parser.setListener(this);
43+
WiFiClient wifiClient;
4344
HTTPClient http;
4445

46+
if (myApiKey == "") {
47+
Serial.println("Please provide an API key for the News.");
48+
return;
49+
}
50+
4551
String apiGetData = "http://" + String(servername) + "/v2/top-headlines?sources=" + mySource + "&apiKey=" + myApiKey;
4652

4753
Serial.println("Getting News Data");
4854
Serial.println(apiGetData);
49-
http.begin(apiGetData);
55+
http.begin(wifiClient, apiGetData);
5056
int httpCode = http.GET();
5157

5258
if (httpCode > 0) { // checks for connection

Diff for: marquee/NewsApiClient.h

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SOFTWARE.
2424
#pragma once
2525
#include <ESP8266WiFi.h>
2626
#include <ESP8266HTTPClient.h>
27+
#include <WiFiClient.h>
2728
#include <JsonListener.h>
2829
#include <JsonStreamingParser.h> // --> https://github.com/squix78/json-streaming-parser
2930

Diff for: marquee/OpenWeatherMapClient.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ void OpenWeatherMapClient::updateWeatherApiKey(String ApiKey) {
3636

3737
void OpenWeatherMapClient::updateWeather() {
3838
WiFiClient weatherClient;
39+
if (myApiKey == "") {
40+
weathers[0].error = "Please provide an API key for weather.";
41+
Serial.println(weathers[0].error);
42+
return;
43+
}
3944
String apiGetData = "GET /data/2.5/group?id=" + myCityIDs + "&units=" + units + "&cnt=1&APPID=" + myApiKey + " HTTP/1.1";
4045

4146
Serial.println("Getting Weather Data");

Diff for: marquee/PiHoleClient.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ PiHoleClient::PiHoleClient() {
2929

3030
void PiHoleClient::getPiHoleData(String server, int port) {
3131

32+
WiFiClient wifiClient;
3233
errorMessage = "";
3334
String response = "";
3435

3536
String apiGetData = "http://" + server + ":" + String(port) + "/admin/api.php?summary";
3637
Serial.println("Sending: " + apiGetData);
3738
HTTPClient http; //Object of class HTTPClient
38-
http.begin(apiGetData);// get the result
39+
http.begin(wifiClient, apiGetData);// get the result
3940
int httpCode = http.GET();
4041
//Check the returning code
4142
if (httpCode > 0) {
@@ -89,6 +90,7 @@ void PiHoleClient::getPiHoleData(String server, int port) {
8990
}
9091

9192
void PiHoleClient::getTopClientsBlocked(String server, int port, String apiKey) {
93+
WiFiClient wifiClient;
9294
errorMessage = "";
9395
resetClientsBlocked();
9496

@@ -102,7 +104,7 @@ void PiHoleClient::getTopClientsBlocked(String server, int port, String apiKey)
102104
String apiGetData = "http://" + server + ":" + String(port) + "/admin/api.php?topClientsBlocked=3&auth=" + apiKey;
103105
Serial.println("Sending: " + apiGetData);
104106
HTTPClient http; //Object of class HTTPClient
105-
http.begin(apiGetData);// get the result
107+
http.begin(wifiClient, apiGetData);// get the result
106108
int httpCode = http.GET();
107109
//Check the returning code
108110
if (httpCode > 0) {
@@ -145,14 +147,14 @@ void PiHoleClient::getTopClientsBlocked(String server, int port, String apiKey)
145147
}
146148

147149
void PiHoleClient::getGraphData(String server, int port) {
148-
150+
WiFiClient wifiClient;
149151
HTTPClient http;
150152

151153
String apiGetData = "http://" + server + ":" + String(port) + "/admin/api.php?overTimeData10mins";
152154
resetBlockedGraphData();
153155
Serial.println("Getting Pi-Hole Graph Data");
154156
Serial.println(apiGetData);
155-
http.begin(apiGetData);
157+
http.begin(wifiClient, apiGetData);
156158
int httpCode = http.GET();
157159

158160
String result = "";

Diff for: marquee/PiHoleClient.h

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SOFTWARE.
2424
#pragma once
2525
#include <ESP8266WiFi.h>
2626
#include <ESP8266HTTPClient.h>
27+
#include <WiFiClient.h>
2728
#include "libs/ArduinoJson/ArduinoJson.h"
2829

2930
class PiHoleClient {

Diff for: marquee/Settings.h

-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ SOFTWARE.
5050
#include "TimeDB.h"
5151
#include "NewsApiClient.h"
5252
#include "OctoPrintClient.h"
53-
#include "BitcoinApiClient.h"
5453
#include "PiHoleClient.h"
5554

5655
//******************************
@@ -107,9 +106,6 @@ int OctoPrintPort = 80; // the port you are running your OctoPrint server
107106
String OctoAuthUser = ""; // only used if you have haproxy or basic athentintication turned on (not default)
108107
String OctoAuthPass = ""; // only used with haproxy or basic auth (only needed if you must authenticate)
109108

110-
// Bitcoin Client - NONE or empty is off
111-
String BitcoinCurrencyCode = "NONE"; // Change to USD, GBD, EUR, or NONE -- this can be managed in the Web Interface
112-
113109
// Pi-hole Client -- monitor basic stats from your Pi-hole server (see http://pi-hole.net)
114110
boolean USE_PIHOLE = false; // Set true to display your Pi-hole details
115111
String PiHoleServer = ""; // IP or Address only (DO NOT include http://)

0 commit comments

Comments
 (0)