-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php
42 lines (37 loc) · 1.58 KB
/
settings.php
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
37
38
39
40
41
42
<?php
/* Copyright 2017 by Thundersun, Inc.
* You may use it according to the terms of the accompanying license.
*
* This file holds default settings, should you want to run emoncsv.php
* without specifying everything on the commandline.
*/
$host_em = new Host([
'url'=>'http://localhost/emoncms/',
'api'=>'YOUR_LOCAL_KEY_HERE',
'uspw'=>'username:password' ]); // In case you have http authentication on your server
$host_emoncmsorg = new Host([
'url'=>'http://emoncms.org/emoncms/',
'api'=>'YOUR_KEY_HERE' ]);
G::$host = $host_em;
G::$settings = new Settings([
// Actions
//'flooper' =>6, // Send random consumption, 6 seconds between sends.
//'dumpRows' => TRUE, // dump minimally parsed input data.
//'sendBulk' => TRUE, // Send bulk to G::$host
'printBulk' => TRUE, // Dry run.
//'printHelp' => '',
//'createInput' => '' // Create an input node so you can make some feeds.
// Flags
'verbose' => TRUE, // Extra console output
'format' => FALSE, // add newlines to output
'dumpSettings' => FALSE, // dump all settings and exit
// Settings
'InputFile' => "example.csv",
'Serial' => "123456789", // uniquely identify the source of this data (later use)
'SubDevice' => "mb250", // in case you need to further specify the data source.
'TimeCol' =>0, // Which column of the source data has the datestamp
'DataCol' =>4, // Which column has the upload data
'NodeNum' =>2, // Which EMONCMS node to upload to.
'chunkSize' => 4, // How many rows to upload to Emon at one time
'maxRows' =>0 // Stop after this many input rows (0 == MAX_INT)
]);