-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
36 lines (24 loc) · 1.36 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
tedcosm is a simple Erlang application for obtaining current power consumption from a TED5000
device and uploading it to cosm.com.
To use tedcosm you will obviously need a TED5000 and an account on cosm.com. After that create a
file, tedcosm.hrl, with the following information:
-define(COSM_API_KEY, _YOUR_COSM_API_KEY_).
-define(COSM_URL, "http://api.cosm.com/v2/feeds/_YOUR_FEED_ID_/datastreams/_DATASTREAM_/datapoints.json").
-define(TED_URL, "http://_YOUR_TED_IP_/api/LiveData.xml").
-define(DEBUG, 0).
-define(UPLOAD_RATE, 3000).
Place tedcosm.hrl in the include/ directory and compile:
./rebar compile
Use rebar to generate an Erlang daemon application:
./rebar generate
To run TEDCOSM:
$ ./rel/tedcosm/bin/tedcosm start
NB: You must first compile the source and then generate the application. Future versions may include a Makefile to automate.
NB: You _must_ create an include/tedcosm.hrl file with the noted constants
defined.
COSM_API_KEY - Your COSM API key, given to you at cosm.com
COSM_URL - The URL to your feed's datastream datapoints
TED_URL - The URL to your TED's LiveData XML stream
DEBUG - Debugging logs on (1) or off (0)
UPLOAD_RATE - The rate, in milliseconds, to acquire and upload power data
Feel free to e-mail questions, joeaintexas@gmail.com. You can see my COSM feed using this software at https://cosm.com/feeds/64467.