Our temp test


## markdescriptions
//============================================
// Macro for data evaluation on PhotosynQ.org
// created: 14/11/2016
//============================================

//Define the output object here
var output = {};

var tempInitial = MathROUND(json.temperature[0],2);
var tempFinal = MathROUND(json.temperature[json.temperature.length-1],2);

output["intial temperature"] = tempInitial;
output["final temperature"] = tempFinal;
output["temperature difference"] = tempFinal - tempInitial;

if (tempFinal - tempInitial > 0) {
  danger("you're value of " + (tempFinal - tempInitial) + " is above zero",output)
}

//Return data
return output;
{
  "time_offset": 300,
  "time": 1479145945727,
  "device_version": "1",
  "device_id": "d4:f5:00:00:00:0c",
  "device_battery": 67,
  "device_firmware": "1.13",
  "firmware_version": "1.13",
  "device_time": 1478774091,
  "sample": [
    [
      {
        "time": 1479145945744,
        "protocol_id": 1,
        "temperature": [
          "27.260000",
          "27.270000",
          "28.480000",
          "29.790001",
          "30.530001",
          "31.090000",
          "31.430000",
          "31.730000",
          "31.959999",
          "32.139999",
          "32.299999",
          "32.430000",
          "32.060001",
          "30.930000",
          "30.230000",
          "29.760000",
          "29.400000",
          "29.090000",
          "28.799999",
          "28.510000"
        ],
        "humidity": [
          "97.411133",
          "97.965820",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000",
          "100.000000"
        ],
        "pressure": [
          "981.475342",
          "981.454712",
          "981.149231",
          "981.168152",
          "981.203186",
          "981.238647",
          "981.157471",
          "981.231323",
          "981.332031",
          "981.258118",
          "981.275940",
          "981.284790",
          "981.436157",
          "981.399536",
          "981.397400",
          "981.364685",
          "981.354004",
          "981.361877",
          "981.359375",
          "981.349854"
        ],
        "data_raw": [
          17,
          15,
          18,
          19,
          17,
          15,
          18,
          17,
          17,
          16,
          18,
          18,
          15,
          15,
          16,
          18,
          18,
          18,
          15,
          15
        ]
      }
    ]
  ],
  "app_os": "linux",
  "app_name": "PhotosynQ",
  "app_version": "0.3.5",
  "app_device": "x86-64",
  "location": [
    "42.7369792",
    "-84.4838654"
  ]
}
012409 pbi 160 low low res headshot
Created by

Greg Austic


Protocol connections:
1
Latest Update:
Nov 2016