Frank's Blog

Thingbench - A Virtual Device Workbench 

Tired of hooking up an Arduino to test another IoT framework? Or working inside a VM without actual access to hardware? Don't worry anymore, Thingbench helps you get through it.

ThingBench is an interactive, visual device workbench, where you can have multiple boards with different virtual devices attached. As of now, we ship with one virtual device---a lamp! You can switch it on and off, change the color and size or position multiple lamps on the board. (If you really ever need something else, this is all open source---feel free to fork and send a pull request!)



Here's how to browse your things:

GET http://localhost:9099/things

This gives you the list of current boards (shown as tabs in the workbench) and virtual devices attached to it:

<things>
<board name="Demo" id="1692623602">
<thing name="Lamp 1" id="1253071236" link="http://127.0.0.1:9099/things/1692623602/1253071236"/>
<thing name="Second Lamp" id="1142253466" link="http://127.0.0.1:9099/things/1692623602/1142253466"/>
</board>
</things>

To browse the properties of a thing go to one of the shown URLs (here Lamp1):

GET http://127.0.0.1:9099/things/1692623602/1253071236

This gives you the current state of the devices:

<thing>
<property name="shadow" value="0"/>
<property name="color_background" value="-3355648"/>
<property name="x" value="347"/>
<property name="width" value="100"/>
<property name="y" value="135"/>
<property name="text" value="Lamp 1"/>
<property name="stereotype" value=""/>
<property name="power" value="OFF"/>
<property name="#id" value="1253071236"/>
<property name="#type" value="thingbench.ThingsModel.Lamp"/>
<property name="height" value="140"/>
</thing>

You can easily PUT one or all properties to set new values (like switching the lamp on):

PUT http://127.0.0.1:9099/things/1692623602/1253071236

with the body

<thing>
<property name="power" value="ON"/>
</thing>

You can easily integrate the corresponding HTTP calls in any IoT framework you like. If you need anything else than a simple lamp, please feel free to browse the code and add your own virtual devices. The Thingbench is based on Processeditor (http://frapu.de/code/processeditor/index.htm), which makes it easy to create your own devices with a visual representation.

If you feel that this is the real thing---or just see the code example in color (sorry for my plain old blogging tool)---go straight to the Github project page: http://github.com/frapu78/thingbench.

If you're really interested, either fork or just drop me a mail!
[ view entry ] ( 2205 views ) permalink $star_image$star_image$star_image$star_image$star_image ( 3 / 1314 )

<Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>