Fliike works with a Carambola2 embeded card (http://www.8devices.com/carambola-2). It's a card mounted with a Qualcomm/Atheros AR9331 microprocesor and a Wifi module. It's shipped with a OpenWRT Linuw distribution.
A Luci HTTP server (http://luci.subsignal.org/) is installed and listen to the 80 port. A built in application answers to this interface via a bundle of commands forming a JSON API.
The domain of this API is the IP acquired by the Fliike when connected to the network. It can be different according to whether it is connected to wifi or ethernet. The MAC addresses of these interfaces are provided with the Fliike identification code, in case you want to configure static IP on a DHCP.
The API is available at the following path: cgi-bin/luci/fliike/ctrl
To execute a command, we will use the following API call:
http://{IP}/{path}/{command}
Example :
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/stop"
Stop the like crawler.
{ "status": "OK" }
Start the like crawler.
{ "status": "OK" }
Sets all tiles to their original position.
{ "status": "OK" }
Move tile 'm' to position 'c'.
m
: Identifier of the tile to move. From right to left, the tile identifiers are 0, 1, 2, 3 and 4c
: Position a tile relatively to the origin. If we take "0" as the original position, positions are respectively 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (dashed), 11 (empty)
{ "status": "OK" }
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=4&c=11"
Set the origin of the tile 'm' at a distance 'd' of the current position.
m
: Identifier of the tile to move. From right to left, the tile identifiers are 0, 1, 2, 3 and 4d
: Distance from the current position to the desired position. This distance is not precisely defined. It is defined by strange algorithm:
if (d == 0)
diff = 0;
else if (Math.abs(d) >= 3)
diff = parseInt(d * 85 / -3);
else
diff = parseInt(d * 85 / -5);
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/moveorigin?m=4&d=11"
Unknown command.
Unknown command, seams to reset all original positions. Then display 78838 or 7883_.
Unknown command, seams to reset all originam positions. Then display 78838.
To display the word "-1337" we would execute the following commands:
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=4&c=11";
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=3&c=1";
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=2&c=3";
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=1&c=3";
wget "http://42.42.42.42/cgi-bin/luci/fliike/ctrl/goto?m=0&c=7";