Patent, Again

5 minute read

IoT, Cloud and Privacy

So far, all commercial IoT platforms are cloud-based.

The main reason is that, in the future, only data from individuals are worth harvesting and exploiting, data about everything you do, every word you say.

So it is essential to start making every user “getting used to it”, and pay for it by themselves right now.

Although IoT can work even better completely without cloud activity, especially for Smarthome IoT.

IoT End-User Programming - The Challenge

IoT is just a system of interconnected devices. Devices communicate with one another. Devices interact with one another.

It has been a challenge to make the system both friendly and flexible for end-users.

IFTTT, and AWS Lambda

Both IFTTT and Lambda are used to implement event handlers. The basic idea is that one event will trigger several actions of IoT devices.

Although they appear to be pretty powerful, they have serious problems.

Both are based on “ephemeral functions”, which must only run briefly and terminate immediately. Both are stateless. Even though the state can be maintained, it costs resources and increases complexity.

So far, both are cloud based.

The Problem - Not Turing Complete

Based on theoretical computer science, there is a problem with those ephemeral functions, that the IFTT and AWS Lambda are based on.

Not Turing Complete!

It means that there are some jobs that those functions can’t do!

Try to blink a couple of lights on those platforms you will understand. See it you can do it!

What about blinking lights with any user-defined pattern? Those platforms definitely can’t do it!

Of course, most users will never know Turing Completeness. What they do know is, those systems “are not flexible enough”!

A Turing Complete Solution

A Turing Complete solution shall not be an “ephemeral function”. It has to be an “infinite loop”.

Essentially it is just a process, a process running on an Operating System, which is capable of performing “Input and Output” on a set of IoT devices with any possible algorithm.

So forget about fancy concepts. Let’s go back to basic. Let’s build an Operating System for IoT.

A Turing Machine for End Users

The ultimate solution is to offer a Turing Machine to end-users. Such a solution is the most powerful because any possible algorithm can be achieved.

Visual Data Editor

However, probably over 99.9% of users don’t know what Turing Machine is, let alone building such a machine.

Thus, the requirements are,

  1. We need to give the end-user a Turing Machine
  2. We can’t expect user do any programming

But to make our product as user-friendly as possible, users have to be able to change the behavior of the machine.

In theory, there is no distinction between code and data in a Turing Machine. But we have to draw a distinction. And we don’t expect the user to do any coding.

Thus, here comes our solution,

  1. Unlike other systems, on which they want users to do coding, although with some visual tool. Our system doesn’t.
  2. Our system only provides a “visual data editor” to end-users. Coding is the job of developers. End users edit the data, which is the input of the code.
  3. We defined two very clear separations.
    1. Separate data from code
      Developer is responsible for defining the structure of the input data
    2. Separate developer from user

Example, Holiday Light Show

Holiday light show is a Libre IoT App. With it, a user can create a “light show” by blinking many lights with any pattern.

  • Lights are divided into “Light Groups”.
  • User can specify each light within a “Light Groups” a “level”.
  • Levels of lights within a group are set all at once.
  • Once a group’s lights are set to individual levels, wait for a period (user-defined) before processing the next light group.
  • When the last group is processed, loop back to the first group.

Blinking One Light

The screenshot below is a task that blinks one light.

  • There are two “Light Groups”
  • Each “Light Group” only has one light (“Outdoor”)
  • Both light groups define a delay of 1 second.

Here is how it works,

  1. Set lights in light group #1
    Levels of lights in the group are set all at once.
    In this example, there is only 1 light (Outdoor) with level 255 (maximum).
  2. After the light levels of the group are set, we wait for a user-defined period (1 second).
  3. Process the next light group (#2). Only 1 light (Outdoor). The level is 0 (turn off).
  4. We wait another 1 second.
  5. Reached the end of the groups. We go back to process the first group (#1). It will run in an infinite loop.

Light Show

End Result

The same light (Outdoor) will turn on and off with a 1-second interval.

Light Show

Structured Input Data - It’s a Tree!

The user input data is a tree structure. Two complex data types have “depth”.

  • An array (List)
  • A struct (Table)

Other data structures are of simple (primitive) types, with only one node.

The Code

The code is very short, only 10 lines.

function MyLightShow(groups)
  while true do
    -- 'groups' is a list of control groups
    for _, group in ipairs(groups) do
      for _, lightState in ipairs(group.lightStates) do
        Libre_DeviceLevelSet(lightState.light, lightState.onLevel)
      Libre_Wait(group.wait * 1000)

Definition of Data Structure

The input data structure can be defined by another tree. We call it a “signature”.

It has to be defined by the programmer.

Light Show

Smartphone UI

With the signature (Definition of Data Structure). The User Interface on the user’s smartphone can be generated automatically.

The animation below demonstrates how to create the “Light Show” example on a user’s smartphone.

Light Show Demo

UI Translation

Anybody can contribute a translation of any App.

Below is a contribution of the Chinese translation of the “Light Show” App.



Another Example - Thermostat Schedule




Some people seem to be pretty upset about this patent. Some people expressed very harsh words.

I always believed that IoT is a supply chain problem. Sadly end-users can never have any control over the supply chain.

No matter how one spins it, it has nothing to do with things like “freely exchange ideas”.

Those so-called “Open Source” IoT platforms will still have to connect to cloud platforms accessing local devices that send megabytes of data to the cloud every day. Users still have absolutely no control over the supply chain.

My opinion is if users can’t control the supply chain, they should choose one that can help them to do so.

Speaking of openness, all our IoT apps are open sources with full source code. And we only encourage and promote open source apps in our online app store. This is the most open platform with full documentation online.

Let’s openly discuss all potential conflicts of interest in this industry. Let’s openly analyze the role of each party involved! Let’s put everything on the table. That is what “openness” is about.


Regardless of the privacy concern or Turing Completeness, our system seems to be the only system that is “useable” by end-users, for user-programming. Take a closer look at any other system in the market you will realize it.

Those Don’t Make Sense Will Never Make Sense

Not after 10,000 years.

Leave a comment