Writing /var/www/timeinventorskabinet/public/wiki/data/meta/windclocks/tak.meta failed
Writing /var/www/timeinventorskabinet/public/wiki/data/meta/windclocks/tak.meta failed
WARNING: TAK SERVER is being altered. All the Java stuff is out. Contact Balt for more info.
An install guide to TAK Server dependencies is available here:
documentation (for Debian GNU/Linux).
The TAK Server configurations is defined by two Java properties files. Java properties store configuration values with a simple set of key/value pairs.
Two default files are embedded in the TAKServer configuration:
log.file=log/takserver.log
tak.port=30223
tik.host=localhost
tik.port=5222
tik.pubsub=pubsub
tak.dao.host=localhost
tak.dao.user=root
tak.dao.passwd=green
tak.dao.schema=tak
These properties can be overridden by writing values to two user-defined files that should be located in the same directory as your takserver JAR:
takserver.properties: general configuration (general & XMPP server configuration) (overrides takserver-defaults.properties)
takdao.properties:persistence layer configuration (database) (overrides takdao-defaults.properties)
You can choose to overwrite only a subset of the default properties by setting only the desired key(s) in the desired file(s).
log.file=/var/log/takserver/takserver.log
Make sure your XMPP server and MySQL databases are running and configured correctly.
You'll have to lauch a terminal and change your current directory to the one containing the TAK Server jar, for instance, on walls.okno.be running Debian/GNU Linux:
$> cd /srv/takserver
$> java -classpath .:takserver.jar be.okno.tik.tak.server.Launcher
$> nohup java -classpath .:takserver.jar be.okno.tik.tak.server.Launcher > /dev/null &
How the WindClock should connect to the server:
1. Login as a clock
SO, you built you brand new windclock and connected it to an arduino. you can now log on the TAK server ! The story from the clock point of view :
“As a clock, I want to logon to the TAK server and start sending tiks”
The server will understand that, unless the connection comes to an end in any way, the clock will be sending only tiks after registering the Clock object you have sent.
Example Clock object in JSON :
{"name":"esplanade","longitude":"2.17541","latitude":"48.809984","altitude":"0.0", "test":false}
make sure you take a unique name!
That means the new values you provide will override the existing ones in our database (to be discussed)
name (Java type:String, C type : char * terminated by \0)
longitude (Java type:Double, C type : double)
latitude (Java type:Double, C type : double
elevation (Java type:Double, C type : double)
NOTICE: for consistency stakes, avoid renaming your clock and setting it up somewhere else far away… It's gonna mix up the statistical computations and we/you don't wanna do that - unintentionally :)
If you want to use metadata, you have to add metaDataDefinitions. Your clock object will looksomething like this:
{"name":"esplanade","longitude":0.0,"latitude":0.0,"altitude":0.0,"metaDataDefinitions":[{"name":"orientation","type":"float"},{"name":"windspeed","type":"int"}],"test":false}
metadata-names should be lowercase, orthodox spelling, without punctuation, for convention's sake. So windspeed, not wind_speed or windSpeed.
accepted types are float, int and string, respectively decimal numbers, whole numbers and text.
2. Sending tiks
SO, you've registered our clock and your connection to the server is still open : Congrats ! (otherwise, be sure you have performed all the neccessary steps listed above). You can now start sending Tiks ! The story from the Clock point of view :
“As a Clock logged on the TAK server, I want to start sending tiks”
the types have to match the ones in the metaDataDefinition in the clock object!
if you don't have metaData, just send empty JSONS, like so:
{}
3. Logging out :