Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
522 B

  1. /*
  2. THINGSPEAK MODULE
  3. Copyright (C) 2019 by Xose Pérez <xose dot perez at gmail dot com>
  4. */
  5. #pragma once
  6. #include "espurna.h"
  7. #if THINGSPEAK_SUPPORT
  8. #if THINGSPEAK_USE_ASYNC
  9. #include <ESPAsyncTCP.h>
  10. #else
  11. #include <ESP8266HTTPClient.h>
  12. #endif
  13. constexpr const size_t tspkDataBufferSize = 256;
  14. bool tspkEnqueueRelay(unsigned char index, bool status);
  15. bool tspkEnqueueMeasurement(unsigned char index, const char * payload);
  16. void tspkFlush();
  17. bool tspkEnabled();
  18. void tspkSetup();
  19. #endif // THINGSPEAK_SUPPORT == 1