Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

61 lines (53 sloc) 1.61 KB
* 01. Device connection
* Periodically checks in to the IoT Guru cloud (where you can set device offline alert).
* You need:
* - the user's short identifier (you can find it on the Account page)
* - the device's short identifier (you can find it on the Device page)
* - the device's key (you can find it on the Device page)
* Tutorial:
* If your device is online and operating, the 'check()' function periodically sends
* check in messages to our cloud service where you can see the last check in timestamp
* on the list of your devices page 'Last firmware check' column.
* Also, you can set device alerts and we will send an emails and Android push
* messages whether your device goes to down, still down or goes to up state.
#include <IoTGuru.h>
#ifdef ESP8266
#include <ESP8266WiFi.h>
#ifdef ESP32
#include <WiFi.h>
const char* ssid = "ssid";
const char* password = "password";
String userShortId = "xxxxxxxxxxxxxxxxxxxxxx";
String deviceShortId = "yyyyyyyyyyyyyyyyyyyyyy";
String deviceKey = "zzzzzzzzzzzzzzzzzzzzzz";
IoTGuru iotGuru = IoTGuru(userShortId, deviceShortId, deviceKey);
void setup() {
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
* Set check in duration, the default is 60000 milliseconds.
* Set the debug printer.
void loop() {
You can’t perform that action at this time.