Link Search Menu Expand Document

OOCSI Tools

We built OOCSI for designers and creatives, because we could, we just built a few more things that help prototyping: our OOCSI tools. These are web pages on an OOCSI server that help you chart communication data, design and fine-tune data, remote control prototypes, or even work with many different clients in a system.

The OOCSI tools can be found on every OOCSI server, follow the top right menu item “Tools” and select the tool you want to use. On this page, we explain where you can find them and how they work. Either check out the video below, or jump over and dive into the tools directly: animOOCSI, OOCSImote, dashboard and the data canvas.

Next to these tools, there are also three different pages for testing purposes. For example, the visual UI client that you can use to subscribe to a channel or send messages over a channel, from within your browser. This is great for testing and debugging your OOCSI communications. For instance, you might be sending data from a prototype to a channel and then to a second client. But the second client cannot receive anything or only wrong data arrives. This is a perfect use-case for the visual UI client; you subscribe in your browser to the same channel and can check what data actually reaches the OOCSI server from the first client. This often helps you make the next step in debugging the communication.

Finally, we have a few services running on every OOCSI server. They help with day-to-day tasks like getting time information, checking connections and generating test data. Also, we have a few special channels that report on OOCSI meta-data.

Video on OOCSI tools

In this video we show you all the tools in action, check the documentation below for more information on the individual tools.

animOOCSI

The animation tool allow to create data generators that repeatedly send generated data to a given channel. The data itself is drawn on a canvas and below you can tweak the output range, the speed of the generation loop and smoothing of the drawn data. There are 6 present slots that you can use to store different generation patterns – and if you need more, open another tab in your browser.

animOOCSI screenshot

OOCSImote

The remote control tool is great for testing the programming of prototypes and even controlling prototypes in the wild (after their deployment). The remote control page allows to add different UI elements, such as triggers, buttons and sliders to the interface and connect them to data items and channels to be controlled. You can generate a QR code for the created interface and open it on a mobile device by scanning the QR code. Now you have a real remote control. ;-)

OOCSImote screenshot

Dashboard

The dashboard or charting tool is really handy to get a real-time insight into data on a channel. Just add a chart by specifying a channel and a numerical data attribute, and the dashboard will start charting it for you. You add more charts, which are nicely aligned and allow for comparisons and monitoring your prototypes. The top chart in the figure below shows data from a data generator which outputs a smooth sine curve, the bottom chart shows data from the animOOCSI tool (see above), which is also periodic, but more complex.

Dashboard screenshot

Services

An OOCSI server runs several internal OOCSI clients that each fulfill a specific purpose. We call them services here because they are always connected and operational.

Test client

This client will send test data to the channel testchannel. The data is structured in two message attributes position and color, and the data follows a sine / cosine pattern. So, next time when you want to test your OOCSI connection, you can just subscribe to the channel testchannel and a steady stream of messages will be delivered to you. This is often the first thing to check for a working OOCSI connection. Like this:

// example for Processing

void setup() {
	// create OOCSI connection
	// ...

	// subscribe to testchannel
	oocsi.subscribe("testchannel");
}

// events will be delivered here
void testchannel(OOCSIEvent event) {
	int color = event.getInt("color", -1);
	int position = event.getInt("position", -1);

	// ... do something with the values
}

The test client is used in some of the OOCSI examples, for instance, on the Processing platform. Check them out.

Time client

The time client sends time data to the channel timechannel every second. Specifically, a client that subscribes to this channel will receive a message that contains not only a timestamp, but also a formatted date-time string and the different components of the date and time as separate attributes. The message looks like this:

{
	"datetime":"2022-01-06T18:14:20", // formatted date-time string, 24 hour time format
	"s":20, // second
	"d":6, // day
	"h":18, // hour
	"y":2022, // year
	"M":0, // month
	"m":14, // minute
	"timestamp":1641489260015 // UNIX epoch timestamp
}

Time data can be useful on clients that do not have a real-time clock (RTC) or that are only connected to the OOCSI server not the Internet. A straight-forward way to trigger behavior at a certain time of the day is to subscribe to timechannel and run the messages through a few if-else conditions. Even simpler, subscribe to timechannel with a filter and only the requested time events reach the client:

// subscribe to time information with a filter
// in this case, receive only one message per hour on minute 26 and second 1
oocsi.subscribe("timechannel[filter(m=26&&s=1)]");

This combination of time data and filtering is particularly suited to embedded clients that don’t havea lot of processing power and network bandwidth. Filtering time data cuts down the time information to the essentials.

Echo client

The echo client receives messages and bounces them right back to the sender. Send a message to echo and you should receive it back in a few milliseconds. Note that the echo’ed message is sent to the client handle directly, not a channel. So, you need to have a handler configured for the client. Apart from testing debugging, you can also use the echo client to measure the connection speed as round-trip time, that is, how long it takes to send and receive a message back from the server. Usually, you should measure a round-trip time of <50 milliseconds, but WIFI connections or a busy network can result in longer round-trip times. Just try it out.

HTTP Web request client

The HTTP web request client can make HTTP requests to websites for any client on the OOCSI network. This is useful for requesting updated information from a website and for communicating with web services via POST requests.

Event, client, and connection channels

Any OOCSI server supports three special channels that provide information about the current data flowing through the OOCSI system. Let’s go through them one by one. The first channel is OOCSI_clients; if a client subscribes to this channel, it will periodic updates on the current list of clients on leave the OOCSI network. If you just want information on connects and disconnects, you can use OOCSI_connections. If a client subscribes to this channel, the client will receive messages when clients connect to the server or disconnect from it. Finally, there is OOCSI_events, a channel that logs all messages inside the system. Note that only the sender and recipient of the message will be shown, message data is not provided in this channel, except for a count of message attributes and the size of the message. The latter properties can be used for message visualisation or analysis.

If you are interested in more “meta” data about OOCSI devices, check out the heyOOCSI functionality.


There are more videos around on OOCSI, check them out!


Copyright © 2013-2024 Mathias Funk. test