Arduino Library 2.21.0

Date: 27/09/2021
Component: Arduino Library
Release Note: Add ThingerConsole feature :desktop_computer:

Additional Information

Hi! This is a first release for Thinger.io console! it is a first attempt to bring a web/ssh interactive terminal for microcontrollers.

What will you build with it!?

1 Like

Very nice job!
That is really the ultimate feature, leaving all MQTT based concepts largely behind thinger.io.

1 Like

Thanks for your comments @rin67630, glad to know you find it useful!
We will add a plugin for private instances where devices can be reach directly over SSH terminal :smiley:

Hi @alvarolb

I’m still having TLS/SSL problem when using Arduino Library Thinger version 2.21.1 (As reported in this post). I tested it with “iot.thinger.io” and on my private Thinger Cloud instance. If #define _DISABLE_TLS_ , the device connects successfully.
ClientListener + ThingerWebConfig + framework-arduinoespressif8266 3.30002.0 (3.0.2 ) + <thinger.io> 2.21.1 + WifiManager 2.0.3-alpha+sha.9af7253 :

Ping Public Thinger:
ping thinger

Ping Private Thinger (Location: Virginia, USA):
thinger privado_

Everything works fine with Arduino Library Thinger 2.16.0:
The error does not occur if you use ClientListener + ThingerWebConfig + espressif8266@2.6.2(Arduino-Framework 2.7.4 ) + thinge
r.io
@2.16.0 + WifiManager 2.0.3-alpha+sha.9af7253

Test code:

#define _DEBUG_
#define THINGER_SERVER "iot.thinger.io"

#define USERNAME "xxxxxxxxxx"
#define DEVICE_ID "yyyyyyyyyy"
#define DEVICE_CREDENTIAL "wwwwwwwww"


#include <Arduino.h>

#include <WiFiManager.h>

#include <ThingerWebConfig.h>
#include <ThingerESP8266.h>
#include <ThingerESP8266OTA.h> //Only in version 2.21.1
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <DNSServer.h>
#include "FS.h"


class ClientListener : public ThingerWebConfig{

public:

    ClientListener(const char* user, const char* device, const char* device_credential) : 

      ThingerWebConfig(user, device, device_credential){}

protected:

  virtual void thinger_state_listener(THINGER_STATE state){
    ThingerWebConfig::thinger_state_listener(state);
    switch(state){
         case NETWORK_CONNECTING:
                break;

         case THINGER_AUTHENTICATED:  
                break;

         default:                     

                 break;         

    }
  }
};

ClientListener thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
ThingerESP8266OTA ota(thing); //Only in version 2.21.1

void setup() {

  Serial.begin(115200);

  pinMode(LED_BUILTIN, OUTPUT);

  thing["led"] << digitalPin(LED_BUILTIN);

  thing["millis"] >> outputValue(millis());

}

void loop() {

  thing.handle();

}

Hello,

A question: Was there an evolution in the IOTMP protocol between versions 2.17 to 2.21.1? I read about it in some posts (link) and saw some commits on github (link1, link2).

Has the way of declaring ClientListener changed too?

Hi Alvarolb,
I think it is a very useful feature especially for remote diagnostics.
I have set it up on an ESP32 and connected to it using the Terminal, but as soon as the ESP32 prints anything to the console the processor disconnects. Had to disable the line of code that contained console.println and processor was then able to stay connected.

I also have OTA installed on the same ESP32 and that works perfectly, but obviously not when the processor is disconnected.

Thanks, Len

Hi, the IOTMP Protocol has not been released yet. It is being tested internally with some of our clients. We expect to fully release it before the year ending.

But yes, we have included a new method for getting updates from Thinger.io client in the Arduino libraries, so, it is not required to create a subclass anymore. For example:

  thing.set_state_listener([&](ThingerClient::THINGER_STATE state){
    switch(state){
            case ThingerClient::NETWORK_CONNECTING:
                break;
            case ThingerClient::NETWORK_CONNECTED:
                break;
            case ThingerClient::NETWORK_CONNECT_ERROR:
                break;
            case ThingerClient::SOCKET_CONNECTING:
                break;
            case ThingerClient::SOCKET_CONNECTED:
                break;
            case ThingerClient::SOCKET_CONNECTION_ERROR:
                break;
            case ThingerClient::SOCKET_DISCONNECTED:
                break;
            case ThingerClient::SOCKET_ERROR:
                break;
            case ThingerClient::SOCKET_TIMEOUT:
                break;
            case ThingerClient::THINGER_AUTHENTICATING:
                break;
            case ThingerClient::THINGER_AUTHENTICATED:
                break;
            case ThingerClient::THINGER_AUTH_FAILED:
                break;
            case ThingerClient::THINGER_STOP_REQUEST:
                break;
        }
  });

I have added it on the docs: https://docs.thinger.io/coding-guide#listen-for-connection-state

1 Like

Hi! how is your code? Can you provide a minimal reproducible example with the problems?

Amazing!

I will run tests and send feedbacks. Thank you very much for constantly updating the Thinger ecosystem. And thanks for your attention here in the community.

Hello @alvarolb
I keep having problems with TLS encryption in version 2.21.1 of the library… Updated code for thing.set_state_listener([&]ThingerClient::THINGER_STATE state)
The device can only connect if #define _DISABLE_TLS_
I tested it on Thinger Public and at my private instance.

Hi, @alvarolb

The problem with TSL (ThingerWebConfig + ClientListener + framework-arduinoespressif8266 3.30002.0 (3.0.2 ) + <thinger.io> 2.21.1 + WifiManager 2.0.3-alpha+sha.9af7253 ) can be solved with some code change , or is it a bug in Arduino Library 2.21.1 or Thinger.io Server version 3.3.3?

We are about to release some products and we are unsure whether to use it with Arduino Library 2.16.0 or wait for the next version of Arduino Library.

Is there any news about this issue?

HI @George_Santiago, did the problem happens with the stock thinger.io example for ESP8266, or it only happens when including WifiManager?