Client Libraries for different languages

Hi everyone! In our approach to start opening Thinger.io more and more over time, we are trying to consolidate some of the platform core features. One of the key aspects of Thinger.io is the protocol between the devices and the cloud. At this moment, such protocol is not documented at all, it does not have a name, or provide client libraries in different languages (only C++). It just works, it is part of the Thinger.io magic, but lacks a better support.

This is changing right now :slight_smile: During the past few months we have been working on redesigning some key aspects of the initial protocol, making it more efficient over the wire, extensible, easier to build clients for it, and supporting different encoding techniques beyond the well-known PSON. Such new protocol is called now IOTMP, which stands for IOT Message Protocol (not quite original :thinking:).

We have started to test this new protocol with different languages, and here is a simple example of creating a Thinger.io client in Javascript, just working over a browser!! A static webpage can just connect as a regular Thinger.io device! Does it sound interesting? Here is the code:

<script src="iotmp.js"></script>
<script>
    let background = "#ff0000";

    let client = iotmp.connect({
        host: 'xxxx',
        user: 'alvarolb',
        device: 'javascript',
        credentials: 'xyztva',
        reconnectTimeout: 6000
    });

    // input example
    client.on('background', (input)=>{
        input.setDefault(background);
        background=input.get();
        document.body.style.background = input.get();
    });

    // output example
    client.on('sample_data', ()=>{
        return Math.floor(Math.random()*1000);
    });
    
</script>

This dummy example does really nothing beyond allowing to change the page background remotelly, or returning a random number when required, but there are endless possibilities with such approach, starting with the possibility to easily create Thinger.io clients, i.e., for mobile devices acquiring device locations, sensors, etc.

So, at this moment we have an initial development both in C++, and Node.js (quite beta), but we would like to know your opinion about whats next! So, we are opening a poll for this:

  • Java
  • JavaScript (Web/Node.js)
  • Python
  • Go
  • Swift
  • C#
  • Other

0 voters

For anyone interested in the IOTMP protocol, it is barely described here:https://alvaroluisbustamante.gitbook.io/iotmp
There is quite a lot of work to do before the final spec or release, so, if you have any feedback, it will be really appreciated! :slight_smile:

3 Likes

@alvarolb , I find it very interesting!!, it will be more and more difficult not to be connected to thinger.io.

What really hurts me and is sorely lacking, is the possibility of updating the firmware of the devices automatically… Things that are on the edge are not always connected and it is not scalable to have a person waiting to update.

I’m thinking of creating a client in Python that can update devices automatically, so that it is this client that is aware of the connection of the devices and downloads the firmware… I have seen the repository of the VSCode extension Github Extension VSCode. . Am I re-inventing the wheel? I would like you to tell me if you are working on this utility within what you call “Products”?

I appreciate you answer me as soon as you can.

HI @JoseSalamancaCoy , just answared in the other post :wink: