1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
|
*******************************************************************************
* Google Photo Clock
* Il s'agit d'un simple exemple de cadre photo IoT
* https://www.instructables.com/id/Google-Photo-Clock/
*
* Charger => Config.txt avec ESP2 Sketch Data Upload
*
* DOIT ESP32 DEVKIT V1
* Upload Speed = 921600
* Flash Frequency = 80MHz
* Core debug = Rien
******************************************************************************/
/* Google Photo settings */
#define PHOTO_URL_PREFIX "https://lh3.googleusercontent.com/"
#define SEEK_PATTERN "id=\"_ij\""
#define SEARCH_PATTERN "\",[\"" PHOTO_URL_PREFIX
#define PHOTO_LIMIT 200 // lire les 200 premières photos de la liste, ESP32 peut en ajouter d'autres.
#define PHOTO_ID_SIZE 159 //la photo d'identité doit comporter 158 caractères, puis ajouter une queue de zéro.
#define HTTP_TIMEOUT 60000 // en ms, attendre un moment pour le traitement du serveur
#define HTTP_WAIT_COUNT 10 // nombre de fois où l'on attend le prochain tronc du paquet HTTP
#define PHOTO_URL_TEMPLATE PHOTO_URL_PREFIX "%s=w%d-h%d-c" // identifiant de la photo, largeur et hauteur d'affichage
/* NTP settings */
#define NTP_SERVER "pool.ntp.org"
#define DAYLIGHT_OFFSET_SEC 0L // no daylight saving
/* display settings */
#include <Arduino_GFX_Library.h>
//#define TFT_BL 22
Arduino_DataBus *bus = new Arduino_ESP32SPI(27 /* DC */, 5 /* CS */,18 /* SCK */, 23 /* MOSI */, GFX_NOT_DEFINED /* MISO */);
Arduino_GFX *gfx = new Arduino_ILI9488_18bit(bus,33 /* RST */, 1 /* rotation */);
/* WiFi and HTTPS */
#include "esp_jpg_decode.h"
#include <esp_task_wdt.h>
#include <WiFi.h>
#include <WiFiMulti.h>
#include <HTTPClient.h>
#include <WiFiClientSecure.h>
#include "SPIFFS.h"
// HTTPS howto: https://techtutorialsx.com/2017/11/18/esp32-arduino-https-get-request/
const char* rootCACertificate = \
"-----BEGIN CERTIFICATE-----\n" \
"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\n" \
"-----END CERTIFICATE-----\n";
WiFiMulti WiFiMulti;
WiFiClientSecure *client = new WiFiClientSecure;
/* file system */
#include <FFat.h>
#include <LittleFS.h>
/* time library */
#include <time.h>
static time_t now;
/* HTTP */
const char *headerkeys[] = {"Location"};
/* Google photo */
char photoIdList[PHOTO_LIMIT][PHOTO_ID_SIZE];
uint8_t *photoBuf;
/* variables */
static int w, h, timeX, timeY, len, offset, photoCount;
static uint8_t textSize;
static unsigned long next_show_millis = 0;
static bool shownPhoto = false;
signed char TIMEZONE = 0;
String photo = String("");
String lat = String("");
String lon = String("");
String user = String("");
String pass = String("");
String appid = String("");
//*************************************************************
void ntpGetTime()
{
// Initialize NTP settings
configTime(TIMEZONE*3600L, DAYLIGHT_OFFSET_SEC, NTP_SERVER); // <== TIMEZONE de Config.txt
gfx->setTextColor(GREEN);
gfx->print(F("Waiting for NTP time sync: "));
Serial.print(F("Waiting for NTP time sync: "));
time_t nowSecs = time(nullptr);
while (nowSecs < 8 * 3600 * 2)
{
delay(500);
Serial.print('.');
gfx->print('.');
yield();
nowSecs = time(nullptr);
}
gfx->println(F(" done."));
Serial.println(F(" done."));
gfx->setTextColor(BLUE);
gfx->println(asctime(localtime(&nowSecs)));
Serial.println(asctime(localtime(&nowSecs)));
}
//****************************************************************
void printTime()
{
now = time(nullptr);
const tm *tm = localtime(&now);
int hour = tm->tm_hour;
int min = tm->tm_min;
// set text size with pixel margin
gfx->setTextSize(textSize, textSize, 3); // <==
if (!shownPhoto)
{
// imprimer l'heure sur fond noir
gfx->setCursor(timeX, timeY);
gfx->setTextColor(WHITE, BLACK);
if (hour<10){ // suppression du 0
gfx->setCursor(timeX+60, timeY);
gfx->printf("%01d:%02d", hour, min);
} else {
gfx->printf("%02d:%02d", hour, min);
}
} else {
if (hour<10){
gfx->setCursor(timeX+60 - 1, timeY - 1);
gfx->setTextColor(DARKGREY);
gfx->printf("%01d:%02d", hour, min);
gfx->setCursor(timeX+60 + 2, timeY + 2);
gfx->setTextColor(BLACK);
gfx->printf("%01d:%02d", hour, min);
gfx->setCursor(timeX+60, timeY);
gfx->setTextColor(WHITE);
gfx->printf("%01d:%02d", hour, min);
} else {
// imprimer l'heure avec une bordure
gfx->setCursor(timeX - 1, timeY - 1);
gfx->setTextColor(DARKGREY);
gfx->printf("%02d:%02d", hour, min);
gfx->setCursor(timeX + 2, timeY + 2);
gfx->setTextColor(BLACK);
gfx->printf("%02d:%02d", hour, min);
gfx->setCursor(timeX, timeY);
gfx->setTextColor(WHITE);
gfx->printf("%02d:%02d", hour, min);
}
}
}
//*****************************************************
// SETUP
//*****************************************************
void setup()
{
Serial.begin(115200);
SPIFFS.begin();
// init display
gfx->begin();
gfx->fillScreen(BLACK);
#ifdef TFT_BL
// turn on display backlight
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif
w = gfx->width();
h = gfx->height();
textSize = w / 6 / 5;
timeX = (w - (textSize * 5 * 6)) / 2;
timeY = h - (textSize * 8) - 10;
gfx->setTextSize(1);
gfx->setCursor(0, 0);
gfx->setTextColor(RED);
gfx->println(F("Google Photo Clock"));
Serial.println(F("Google Photo Clock"));
gfx->setTextColor(ORANGE);
gfx->print(F("Screen: "));
Serial.print(F("Screen: "));
gfx->print(w);
Serial.print(w);
gfx->print('x');
Serial.print('x');
gfx->println(h);
Serial.println(h);
gfx->setTextColor(YELLOW);
gfx->print(F("Clock text size: "));
Serial.print(F("Clock text size: "));
gfx->println(textSize);
Serial.println(textSize);
if (do_read_config_txt()){
gfx->println(F("Config.txt => Ok "));
Serial.println(F("Config.txt => Ok "));
}else {
gfx->setTextColor(RED);
gfx->println(F("Config.txt => Erreur "));
Serial.println(F("Config.txt => Erreur"));
delay(1000);
}
// init WiFi
gfx->setTextColor(GREENYELLOW);
gfx->print(F("Connecting to WiFi: "));
Serial.print(F("Connecting to WiFi: "));
WiFi.mode(WIFI_STA);
//WiFiMulti.addAP(SSID_NAME, SSID_PASSWORD);
WiFiMulti.addAP(user.c_str(),pass.c_str());
while ((WiFiMulti.run() != WL_CONNECTED))
{
delay(500);
gfx->print('.');
Serial.print('.');
}
gfx->println(F(" done."));
Serial.println(F(" done."));
// init time
ntpGetTime();
client->setCACert(rootCACertificate);
// set WDT timeout a little bit longer than HTTP timeout
esp_task_wdt_init((HTTP_TIMEOUT / 1000) + 1, true);
enableLoopWDT();
// allocate photo file buffer
photoBuf = (uint8_t *)malloc(w * h * 3 / 5);
if (!photoBuf)
{
Serial.println(F("L'allocation de photoBuf a échoué!"));
}
// imprimer le temps sur l'écran noir avant le téléchargement de l'image
printTime();
}
//*****************************************************
// LOOP
//*****************************************************
void loop()
{
if (WiFiMulti.run() != WL_CONNECTED)
{
// wait for WiFi connection
delay(500);
}
else if (millis() < next_show_millis)
{
delay(1000);
} else {
HTTPClient https;
if (!photoCount)
{
https.collectHeaders(headerkeys, sizeof(headerkeys) / sizeof(char *));
gfx->setTextSize(1);
gfx->setCursor(0, 64);
gfx->setTextColor(RED);
gfx->println(photo); // <== photo de Config.txt
Serial.println(photo);
gfx->setTextColor(ORANGE);
gfx->println(F("[HTTPS] begin..."));
Serial.println(F("[HTTPS] begin..."));
https.begin(*client,photo.c_str()); // <== photo de Config.txt
https.setTimeout(HTTP_TIMEOUT);
gfx->setTextColor(YELLOW);
gfx->println(F("[HTTPS] GET..."));
Serial.println(F("[HTTPS] GET..."));
int httpCode = https.GET();
gfx->setTextColor(GREENYELLOW);
gfx->print(F("[HTTPS] return code: "));
Serial.print(F("[HTTPS] return code: "));
gfx->println(httpCode);
Serial.println(httpCode);
// redirect
if (httpCode == HTTP_CODE_FOUND)
{
char redirectUrl[256];
strcpy(redirectUrl, https.header((size_t)0).c_str());
https.end();
gfx->setTextColor(GREEN);
gfx->print(F("redirectUrl: "));
Serial.print(F("redirectUrl: "));
gfx->println(redirectUrl);
Serial.println(redirectUrl);
gfx->setTextColor(BLUE);
gfx->println(F("[HTTPS] begin..."));
Serial.println(F("[HTTPS] begin..."));
https.begin(*client, redirectUrl);
https.setTimeout(HTTP_TIMEOUT);
gfx->setTextColor(MAGENTA);
gfx->println(F("[HTTPS] GET..."));
Serial.println(F("[HTTPS] GET..."));
httpCode = https.GET();
gfx->setTextColor(RED);
gfx->print(F("[HTTPS] GET... code: "));
Serial.print(F("[HTTPS] GET... code: "));
gfx->println(httpCode);
Serial.println(httpCode);
}
if (httpCode != HTTP_CODE_OK)
{
gfx->setTextColor(ORANGE);
gfx->print(F("[HTTPS] GET... a echoue, erreur: "));
Serial.print(F("[HTTPS] GET... a echoue, erreur: "));
gfx->println(https.errorToString(httpCode));
Serial.println(https.errorToString(httpCode));
delay(9000); // don't repeat the wrong thing too fast
// return;
}
else
{
// L'en-tête HTTP a été envoyé et l'en-tête de réponse du serveur a été traité.
//find photo ID leading pattern: ",["https://lh3.googleusercontent.com/
photoCount = 0;
int wait_count = 0;
bool foundStartingPoint = false;
WiFiClient *stream = https.getStreamPtr();
stream->setTimeout(10);
while ((photoCount < PHOTO_LIMIT) && (wait_count < HTTP_WAIT_COUNT))
{
if (!stream->available())
{
gfx->print('.');
Serial.println(F("Flux d'attente->available()"));
++wait_count;
delay(200);
}
else
{
if (!foundStartingPoint)
{
gfx->setTextColor(ORANGE);
gfx->println(F("chercher un modele: " SEEK_PATTERN));
Serial.println(F("chercher un modele: " SEEK_PATTERN));
if (stream->find(SEEK_PATTERN))
{
gfx->setTextColor(YELLOW);
gfx->println(F("modele: " SEEK_PATTERN));
Serial.println(F("modele: " SEEK_PATTERN));
foundStartingPoint = true;
}
} else {
if (stream->find(SEARCH_PATTERN))
{
int i = -1;
char c = stream->read();
while (c != '\"')
{
photoIdList[photoCount][++i] = c;
c = stream->read();
}
photoIdList[photoCount][++i] = 0; // zero tail
gfx->setTextColor(GREENYELLOW);
gfx->print('*');
Serial.println(photoIdList[photoCount]);
++photoCount;
}
}
}
// notify WDT still working
feedLoopWDT();
}
gfx->setTextColor(GREEN);
gfx->print(photoCount);
gfx->println(F(" photo ID added."));
Serial.print(photoCount);
Serial.println(F(" photo ID added."));
}
https.end();
} else {// photoCount > 0
//char photoUrl[256];
char photoUrl[512];
// UNCOMMENT FOR DEBUG PHOTO LIST
// for (int i = 0; i < photoCount; i++)
// {
// sprintf(photoUrl, PHOTO_URL_TEMPLATE, photoIdList[i], w, h);
// Serial.printf("%d: %s\n", i, photoUrl);
// }
// configurer la valeur de la requête url avec la dimension LCD
int randomIdx = random(photoCount);
File cachePhoto;
char filename[16];
sprintf(filename, "/%d.jpg", randomIdx);
if (!(cachePhoto = FFat.open(filename, "r"))) // if (!(cachePhoto = LittleFS.open(filename, "r")))
{
sprintf(photoUrl, PHOTO_URL_TEMPLATE, photoIdList[randomIdx], w, h);
Serial.print(F("Random selected photo #"));
Serial.print(randomIdx);
Serial.print(':');
Serial.println(photoUrl);
Serial.println(F("[HTTP] begin..."));
https.begin(*client, photoUrl);
https.setTimeout(HTTP_TIMEOUT);
Serial.println(F("[HTTP] GET..."));
int httpCode = https.GET();
Serial.print(F("[HTTP] GET... code: "));
Serial.println(httpCode);
// HTTP header has been send and Server response header has been handled
if (httpCode != HTTP_CODE_OK)
{
Serial.print(F("[HTTP] GET... failed, error: "));
Serial.println(https.errorToString(httpCode));
delay(9000); // don't repeat the wrong thing too fast
} else {
// obtenir la longueur du document (-1 si le serveur n'envoie pas d'en-tête Content-Length).
len = https.getSize();
Serial.print(F("[HTTP] size: "));
Serial.println(len);
if (len <= 0)
{
Serial.print(F("[HTTP] Unknow content size: "));
Serial.println(len);
}
else
{
// récupérer le flux tcp
WiFiClient *photoHttpsStream = https.getStreamPtr();
if (photoBuf)
{
// Décodage JPG option 1 : buffer_reader, utilise beaucoup plus de mémoire mais est plus rapide.
size_t reads = 0;
while (reads < len)
{
size_t r = photoHttpsStream->readBytes(photoBuf + reads, (len - reads));
reads += r;
Serial.print(F("Photo buffer read: "));
Serial.print(reads);
Serial.print('/');
Serial.println(len);
}
esp_jpg_decode(len, JPG_SCALE_NONE, buffer_reader, tft_writer, NULL /* arg */);
}
else
{
// Option de décodage JPG 2 : téléchargement dans un fichier cache
Serial.print(F("Cache photo: "));
Serial.println(filename);
cachePhoto = FFat.open(filename, "w");
// cachePhoto = LittleFS.open(filename, "w");
if (cachePhoto)
{
uint8_t buf[512];
size_t reads = 0;
while (reads < len)
{
size_t r = photoHttpsStream->readBytes(buf, min(sizeof(buf), len - reads));
reads += r;
cachePhoto.write(buf, r);
// Serial.print(F("Photo file write: "));
// Serial.print(reads);
// Serial.print('/');
// Serial.println(len);
}
cachePhoto.close();
cachePhoto = FFat.open(filename, "r");
// cachePhoto = LittleFS.open(filename, "r");
}
else
{
// Décodage JPG option 3 : stream_reader, décodage à la volée mais plus lent
esp_jpg_decode(len, JPG_SCALE_NONE, stream_reader, tft_writer, &photoHttpsStream /* arg */);
}
}
}
}
https.end();
}
if (cachePhoto)
{
Serial.print(F("Chargement du cache photo: "));
Serial.println(filename);
esp_jpg_decode(cachePhoto.size(), JPG_SCALE_NONE, stream_reader, tft_writer, &cachePhoto /* arg */);
cachePhoto.close();
}
shownPhoto = true;
next_show_millis = ((millis() / 60000L) + 1) * 60000L; // minute +1
}
// superposer l'heure actuelle sur la photo
// printTime();
}
// notify WDT still working
feedLoopWDT();
}
//*************************************************************
static size_t stream_reader(void *arg, size_t index, uint8_t *buf, size_t len)
{
Stream *s = (Stream *)arg;
if (buf)
{
// Serial.printf("[HTTP] read: %d\n", len);
size_t a = s->available();
size_t r = 0;
while (r < len)
{
r += s->readBytes(buf + r, min((len - r), a));
delay(50);
}
return r;
} else {
// Serial.printf("[HTTP] skip: %d\n", len);
int l = len;
while (l--)
{
s->read();
}
return len;
}
}
//*************************************************************
static size_t buffer_reader(void *arg, size_t index, uint8_t *buf, size_t len)
{
if (buf)
{
memcpy(buf, photoBuf + index, len);
}
return len;
}
//*************************************************************
static bool tft_writer(void *arg, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t *data)
{
if (data)
{
// Serial.printf("%d, %d, %d, %d\n", x, y, w, h);
gfx->draw24bitRGBBitmap(x, y, data, w, h);
}
// notify WDT still working
feedLoopWDT();
return true; // Continue to decompression
} |