I am using NodeMCU 1.0 with Arduino IDE 1.8.5.
NodeMCU dont show up in Thinger Console.
Username, Device_id and Credential are correct in sketch
Sketch is very basic:
define _DEBUG
#include <ESP8266WiFi.h>
#include <ThingerWifi.h>
#define USERNAME “jjl”
#define DEVICE_ID “Miniput”
#define DEVICE_CREDENTIAL “******”
#define SSID “HomeBox-1A7E”
#define SSID_PASSWORD “**********”
ThingerWifi thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
void setup() {
Serial.begin(115200);
pinMode(BUILTIN_LED, OUTPUT);
thing.add_wifi(SSID, SSID_PASSWORD);
// digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
thing[“led”] << digitalPin(BUILTIN_LED);
// resource output example (i.e. reading a sensor value)
thing[“millis”] >> outputValue(millis());
// more details at http://docs.thinger.io/arduino/
}
void loop() {
thing.handle();
}
When running the sketch I got these debug messages:
[_SOCKET] Connecting to iot.thinger.io:25202…
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Connected!
[THINGER] Authenticating. User: jjl Device: Miniput
[THINGER] Writing bytes: 29 [OK]
[_SOCKET] Cannot read from socket!
[THINGER] Auth Failed! Check username, device id, or device credentials.
[_SOCKET] Is now closed!
What does “Cannot read from socket!” mean and how do I make it work ?
Thanks in advance.
Jens