Skip to content
wintermute3141 edited this page Oct 7, 2012 · 8 revisions

Welcome to the libklio wiki!

Set up libklio

Please, check out Compiling and installing hexaswitch to get to know how to install libklio.

Combination with hexalog

hexalog is a tool which logs Hexabus events to an SQLite database. For instance, you can use it to record the power consumption of a particular appliance connected to a Hexabus Plug+, or to log when a button was pressed.

To set up hexalog you need to install libklio first.

Klio-store: Store readings to a database

After you installed libklio you can set up a SQLite database for storing the logged readings. To do this, type klio-store create data.db where data.db is the name your database will have. Now you have a database where hexalog can write to. Start hexalog by running ./hexalog data.db

Klio-sensor: Retrieve readings from the database

To retrieve your data from the database, you can use klio-sensor. klio-sensor list data.db will list all sensors available in the database. Note the sensor ID which comprises of -. For example: fe80::50:c4ff:fe04:8009%usb0-3. Via the command klio-sensor dump test.db fe80::50:c4ff:fe04:8009%usb0-3 you get the readings along with the according time stamps. If you'd like to name your sensors according to their function, say, you're measuring the power consumption of your fridge with a HexaBus Plug+, use klio-sensor change-description -i fe80::50:c4ff:fe04:8009%usb0-2 -d fridge data.db.

Clone this wiki locally