Hi thinger community! I’m new here and this is my firt post.
At this moment I’m trying to debug the ethernet connection with thinger using UIPethernet library. The device connects but I can´t see API resources in plattform.
heres is my sketch:
#include <UIPEthernet.h>
#define MACADDRESS 0x00,0x01,0x02,0x03,0x04,0x05
#define MYIPADDR 192,168,0,247
#define MYIPMASK 255,255,255,0
#define MYDNS 8,8,4,4 //google dns servers
#define MYGW 192,168,0,3
uint8_t mac[6] = {MACADDRESS};
uint8_t myIP[4] = {MYIPADDR};
uint8_t myMASK[4] = {MYIPMASK};
uint8_t myDNS[4] = {MYDNS};
uint8_t myGW[4] = {MYGW};
//#define DISABLE_TLS
#define DEBUG
#include <ThingerENC28J60.h>
#include <ThingerClient.h>
#define username “HerGonEne”
#define device_id “MEG_PM10_02”
#define device_credentials “*****”
ThingerENC28J60 thing(username, device_id, device_credentials);
void setup() {
Serial.begin(115200);
UIPEthernet.begin(mac,myIP,myDNS,myGW,myMASK);
pinMode(4, OUTPUT);
// pin control example (i.e. turning on/off a light, a relay, etc)
thing[“led”] << digitalPin(4);
// resource output example (i.e. reading a sensor value)
thing[“millis”] >> outputValue(millis());
}
void loop() {
thing.handle();
}
Debug output:
09:59:07.348 -> [_SOCKET] Connecting to iot.thinger.io:25200…
09:59:07.348 -> [_SOCKET] Using secure TLS/SSL connection: no
09:59:10.156 -> [_SOCKET] Connected!
09:59:10.156 -> [THINGER] Authenticating. User: HerGonEne Device: MEG_PM10_02
09:59:10.219 -> [THINGER] Writing bytes: 42 [OK]
09:59:10.453 -> [THINGER] Authenticated
09:59:10.453 -> [THINGER] Writing bytes: 2 [OK]
09:59:10.780 -> [THINGER] Available bytes: 2
10:00:10.484 -> [THINGER] Writing bytes: 2 [OK]
10:00:50.453 -> [THINGER] Available bytes: 2
10:01:10.501 -> [THINGER] Writing bytes: 2 [OK]
10:01:50.517 -> [THINGER] Available bytes: 2
10:02:10.548 -> [THINGER] Writing bytes: 2 [OK]
10:02:13.731 -> [THINGER] Available bytes: 2
10:03:10.533 -> [THINGER] Writing bytes: 2 [OK]
10:04:10.565 -> [_SOCKET] Timeout!
10:04:10.565 -> [_SOCKET] Is now closed!
10:04:10.565 -> [_SOCKET] Connecting to iot.thinger.io:25200…
10:04:10.565 -> [_SOCKET] Using secure TLS/SSL connection: no
10:04:12.578 -> [_SOCKET] Connected!
10:04:12.578 -> [THINGER] Authenticating. User: HerGonEne Device: MEG_PM10_02
10:04:12.578 -> [THINGER] Writing bytes: 42 [OK]
10:04:12.858 -> [THINGER] Authenticated
10:04:12.858 -> [THINGER] Writing bytes: 2 [OK]
10:04:13.186 -> [THINGER] Available bytes: 2
10:05:12.877 -> [THINGER] Writing bytes: 2 [OK]
10:06:12.909 -> [_SOCKET] Timeout!
10:06:12.909 -> [_SOCKET] Is now closed!
10:06:12.909 -> [_SOCKET] Connecting to iot.thinger.io:25200…
10:06:12.909 -> [_SOCKET] Using secure TLS/SSL connection: no
10:06:38.165 -> [_SOCKET] Error while connecting!
10:06:43.173 -> [_SOCKET] Connecting to iot.thinger.io:25200…
10:06:43.173 -> [_SOCKET] Using secure TLS/SSL connection: no
10:07:08.713 -> [_SOCKET] Error while connecting!
10:07:13.674 -> [_SOCKET] Connecting to iot.thinger.io:25200…
10:07:13.721 -> [_SOCKET] Using secure TLS/SSL connection: no
10:07:17.511 -> [_SOCKET] Connected!
10:07:17.511 -> [THINGER] Authenticating. User: HerGonEne Device: MEG_PM10_02
10:07:17.511 -> [THINGER] Writing bytes: 42 [OK]
10:07:17.792 -> [THINGER] Authenticated
10:07:17.792 -> [THINGER] Writing bytes: 2 [OK]
10:07:18.120 -> [THINGER] Available bytes: 2
10:08:17.825 -> [THINGER] Writing bytes: 2 [OK]