Actively use Thinger console

I would like to use the absolutely genial cloud console Thinger feature interactively.

Halas my code to read an input byte on an ESP32:

if (console.available()) inbyte = console.read(); //Serial input available

will not compile:
exit status 1
‘class ThingerConsole’ has no member named ‘available’

Which possibility do we have to sense the arrival of a serial command?

Thank you very much for your assistance!

It is completely feasible. I have not deepen on ThingerConsole too much in the Arduino side, as not sure it is an appreciated/used feature. Can you explain how do you use it? why would you like to have an input instead of an API call or similar? I suppose it is to make some CLI, or apply configurations by terminal?

ThingerConsole were initially intended for Remote Shells. In fact, we have it working for Linux devices, currently on production for some customers, where the access to the device is not possible.

But indeed, it could be an useful feature just to have some kind of remote commands. Will look to improve the integration with Arduino, maybe with IOTMP release, as for now it also prints some weird data like “{“out”…”

Mainly for me it is a way to circumvent the lack of control widgets on the dashboard.

I can change operation modes, start statistical reports, start a charge cycle, reset counters…
All that would require quite a lot of code and variables if one would want to do it from the dashboard wifget by widget…
My device software can be controlled over serial with simple one byte commands, that works well with a physical connection, but not remotely.

P.S:
I have also tried to use the terminal passively permanently printing a line every second.
The connection looks successful, but the terminal issues:

image

Which resource is supposed to be defined?
I have
#include <ThingerESP32.h> #include <ThingerConsole.h>

Then
ThingerESP32 thing(THINGER_USERNAME, THINGER_DEVICE, THINGER_DEVICE_CREDENTIALS); ThingerConsole console(thing);

and finally in Loop() every second:

console.printf("Vset:%06.3f Vout:%06.3f Iset:%06.3f Iout:%06.3f Wout:%+07.3f\n", dashboard.Vset, dashboard.Vout, dashboard.Iset, dashboard.Iout, dashboard.Wout);

Where am I supposed to define a resource?

Thank you for your support, it is much appreciated.