In the previous post, the main focus was to give some context. Context to what caused the birth of an application suite to power our house. In this second installment, we will be turning our attention to one of those applications: Xible.

Xible is the only one of the pieces of software written for our home automation, that has actually made it into the public domain. There is a website, documentation, a registry for sharing, the source, an NPM package, and a bunch of expansions in the form of nodepacks.

Beyond me

This may seem logical now, but the ability to move a connector was not part of the user experience in version 0.1. More on editor interactions in the documentation.

The UI of Xible interested me from the start, since it was a place for me to grow beyond my skills at that time. Never have I tried creating a user interface (UI) and user experience (UX) so complete, flexible, interactive and satisfying (can I say that?). Moreover, as I realized the possible opportunities and implications of Xible, I started thinking about communities, documentation, sharing, spreading. Open source communities much like NPM allow the collective Node.JS space to share their thoughts, ideas and solutions through a platform available for everyone. Xible needed something similar.

Taking up the task of not only building a sufficient rule engine but also ensuring a shared space for similarly minded programmers to build upon the Xible platform was not easy. With the capabilities of Xible however it was hard not too see the added advantage of such a community driven development platform. Soon I started seeing this as a requirement for the success of Xible, and possibly also for the success of Glow. Moreover it was not about success, it was about easy of use. A user experience I much came to care about.

For those unbeknownst on the subject matter at hand; Node.JS is a programming platform based on the Javascript programming language. NPM brings an online repository to share packages which can be used in other Node.JS programs. As such, NPM was a great place to start of a similar sharing opportunity, and community, for an application based of Node.JS. After all, Xible is a Node.JS application, just like Glow.

By now you may have found me to be a Javascript aficionado. This post is certainly not the place to discuss the pro’s and cons of any programming language. JavaScript is by no means perfect, but than again, which language is? At least NPM provides for a great amount of usable integrations. In addition, front end development work involves a great deal of JavaScript if it’s too be browser compatible. Having a single language available both at front- and back-end certainly made my life easier. Obviously this is ignoring HTML and CSS being there primarily for markup and styling.

As a result, Xible now consists of Xible itself, a long list of nodepacks which i hope is ever growing, a front-end website, a back-end, and a registry. The amount of work to pull this off was not what i expected it to be from the get-go. Than again, i never expected to build a flow based programming language with a hopefully thriving online community in the future. And all of this was originally just a side project to an idea of replacing lighting switches. …Lighting switches!

Albeit my own creation, Xible proved to me everything i could have never dreamed of at the time. And yet hopefully, i have yet to finish dreaming. That dream being fulfilled would be up to a community, perhaps kickstarted by this set of stories describing the way of a singular developer to a self-prescribed life-work, waiting to expand beyond what the originator could even think of.

How it works

So what is Xible exactly? Well, as i’ve mentioned before, Xible basically is a flow based, graphical, visual, programming language. Each node you can drag in there comes as part of a nodepack which combines functionality related to the same context. For example, there are nodepacks for interacting with mongodb databases, sending out emails, setting up telegram bots, and more.

Those nodes can be linked up to share data, or to simply start a specific function after another had completed. Unlike JavaScript, Xible is (sort of) strictly typed. This allows for nodes to specify the data they wouldd expect and for users to intuitively only connect data from the right source to a proper drain (or destination).

Xible aims to have as much, if not all, information regarding a node (a function, or data source) available in the UI. This can be anything from status information on the nodes’ configuration, ‘till the help information related to the various parts making up the node. This is important, as the need for many help pages can hopefully be alleviated with the use of this setup. A 100% solution this is not, but it should make the end-users’ life a fair bit easier.

All the details surrounding the ssh2.client.exec node. Press ‘h’ or ‘?’ after selecting a node in the Xible editor to view the help page.

Xible communicates with glow by means of a nodepack for Glow, incorporating the glow-wrapper NPM package. And glow interacts with Xible using the xible-wrapper NPM package, which wraps the API of Xible.

Other nodepacks may be used to further expand the abilities of your flows, for example a weather integration nodepack could check upon the chances of rain, which can be used to determine whether the lawnmower should set out to cut some grass or not. A timing node can be used to decide whether the lights should come on at a specific time in the absence of home owners, as a mitigating action towards burglars. The possibilities are endless, much like with regular programming languages, but with less of a learning curve that comes with most of them. That’s the idea anyway.

A Xible flow for toggling the light in the restroom based on a sensor value.

Does this make Xible the best or easiest way of programming whatever you may need from a computer to serve you? No. The inherent requirements of flexibility make it perhaps more difficult to configure than scratch, and the visual nature make it incapable of building full-fledged applications. At least, that’s until someone may come up with a nodepack containing features which I have not thought of yet. Either way, there is currently a very large gap between functionality and usability which is yet to be covered. Xible tries to fill this gap to a certain extent.

So what is Xible good at? What have i used it for so far? Here’s an incomplete list;

glow, home automation, controlling devices, integration, scenes

automated continuous deployment pipelines, continuous integration, testing pipelines

For example; using SSH nodes or database integration.

For example; using SSH nodes or database integration. real time data analysis and action upon those analytics

For example; reading in tweets and running sentiment analysis on top of those tweets.

Many more implementations can be thought of, but that’s where my experimentation has brought me so far. Since home automation was the primary goal, here is a video demonstrating how to control a light using Glow and Xible. Note that since Glow is not available to the public domain yet, you cannot build this flow in Xible yourself. But that will change soon.

In the next blogpost within this series, I will finally being going in-depth on Glow itself, including those nifty lighting switches I have been talking about.