Create a new properties and devices, load measurements from csv on S3 into Hecuba (getembed.com) via the API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
resources
src/kixi/hecuba
test/kixi/hecuba
.gitignore
LICENSE
README.md
project.clj

README.md

kixi.hecuba.minorca

map of minorca

######Image source: http://webs.racocatala.cat/eltalp/cart2.htm

##Description: Minorca gets CSV files from an AWS S3 bucket. Those files contains sensors measurements form houses that need to be uploaded into getembed.com.

Minorca uses AWS Java API via a Clojure library called Amazonica. It also uses Hecuba API to add houses, devices and sensor measurements.

Minorca expects a configuration file containing the following information:

{:s3 {:bucket "my-bucket"
      :cred {:profile "default" :endpoint "eu-west-1"}}
 :mapping-file "resources/default-houses-mapping-file.csv"
 :processed-file "resources/default-files-processed.csv"}

It needs:

  • information for the AWS S3 bucket,
  • a file to store the relationship between the identifiers from the input files and the identifiers in getembed.com (see an example here),
  • a file to store which input files have been processed (see an example here).

####Important note:

As it is the programme is expecting to have a "mapping-file" and a "processed-file".

The first time the programme is run those CSV files will be empty but for the column headers.

The headers expected are as follow:

  • for the "mapping-file":

Timestamp,File name,S3 bucket,Metadata,File content

  • for the "processed-file":

house_id,entity_id,device_id

Usage

Create a jar:

$ lein uberjar

Run your jar:

$ java -jar uberjar/path/kixi.hecuba.minorca-0.1.0-SNAPSHOT-standalone.jar
-i project-id -u https://api-url/1/ -n username -p password

License

Copyright © 2015 MastodonC

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.