• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. MTBHuw
    3. Topics
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 17
    • Groups 0

    Topics

    • M

      Converting Distance to Volume with MyController (water tank)

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      8
      0 Votes
      8 Posts
      1k Views
      jkandasaJ
      @mtbhuw https://forum.mycontroller.org/topic/146/how-to-set-sensor-value-with-javascript
    • M

      Adding NRF24l01 code to existing sketches

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      883 Views
      M
      That's great thanks, I will read through that to try and make sense of it. I have 2 projects at the moment. One is a water level/rain gauge sensor project. I've seen the My Sensors rain gauge sketch but it seems too complex for my needs although I could use it. The other is a home "smart meter" for our electricity usage using a non invasive current sensor.
    • M

      Retrieving values table from sensor graphs

      Watching Ignoring Scheduled Pinned Locked Moved Getting Started
      3
      0 Votes
      3 Posts
      1k Views
      M
      Thanks, I tried running the script: var myImports = new JavaImporter(java.io, java.lang, java.util, java.text); with(myImports) { var sVar = mcApi.uidTag().getByUid("temp-outside").getResource(); // Get sensor variable object with UidTag api var minMaxData = mcApi.metric().getSensorVariableMetricDouble(sVar, 0,1479833863195); //(sensor-variable-object, from-timestamp, to-timestamp) } changing "temp-outside" to my own uidTag for my sensor. It worked but seemed to return a lot more information than needed, although I see that the value (distance) is there, but among a lot of unwanted data. Is there a way of extracting just time/distance from this? Here's a sample of what was returned.... { "sVar": { "id": 7, "sensor": { "id": 8, "sensorId": "1", "type": "S_DISTANCE", "name": "", "lastSeen": 1509978854438, "node": { "id": 10, "eui": "1", "gatewayTable": { "id": 1, "enabled": true, "name": "Serial Gateway", "networkType": "MY_SENSORS", "state": "UP", "statusMessage": "Connected Successfully", "statusSince": 1509967019993, "type": "SERIAL", "properties": { "br": 115200, "rdr": "jSerialComm", "rf": 30, "txDelay": 0, "dr": "Auto", "pn": "/dev/ttyACM0" } }, "name": "Distance Sensor", "version": "1.0", "type": "S_ARDUINO_NODE", "libVersion": "2.1.1", "state": "UP", "lastSeen": 1509978855129, "properties": { "hbTx": 1509978436346 }, "registrationState": "REGISTERED", "smartSleepEnabled": false }, "variableTypes": [ "Distance" ], "idforVariables": 8 }, "variableType": "V_DISTANCE", "metricType": "DOUBLE", "timestamp": 1509978853779, "value": "151", "previousValue": "150", "unitType": "U_DISTANCE", "readOnly": false, "offset": 0, "priority": 100, "properties": { "marginRight": 20, "color": "#ff7f0e", "interpolate": "linear", "subType": "line", "marginBottom": 60, "useGlobal": true, "type": "lineChart", "marginTop": 5, "marginLeft": 65 }, "metricsGraph": { "id": 5, "metricName": "Distance", "type": "lineChart", "interpolate": "linear", "subType": "line", "color": "#ff7f0e" } }, "myImports": {}, "minMaxData": { "variable": { "id": 7, "sensor": { "id": 8, "sensorId": "1", "type": "S_DISTANCE", "name": "", "lastSeen": 1509978854438, "node": { "id": 10, "eui": "1", "gatewayTable": { "id": 1, "enabled": true, "name": "Serial Gateway", "networkType": "MY_SENSORS", "state": "UP", "statusMessage": "Connected Successfully", "statusSince": 1509967019993, "type": "SERIAL", "properties": { "br": 115200, "rdr": "jSerialComm", "rf": 30, "txDelay": 0, "dr": "Auto", "pn": "/dev/ttyACM0" } }, "name": "Distance Sensor", "version": "1.0", "type": "S_ARDUINO_NODE", "libVersion": "2.1.1", "state": "UP", "lastSeen": 1509978855129, "properties": { "hbTx": 1509978436346 }, "registrationState": "REGISTERED", "smartSleepEnabled": false }, "variableTypes": [ "Distance" ], "idforVariables": 8 }, "variableType": "V_DISTANCE", "metricType": "DOUBLE", "timestamp": 1509978853779, "value": "151", "previousValue": "150", "unitType": "U_DISTANCE", "readOnly": false, "offset": 0, "priority": 100, "properties": { "marginRight": 20, "color": "#ff7f0e", "interpolate": "linear", "subType": "line", "marginBottom": 60, "useGlobal": true, "type": "lineChart", "marginTop": 5, "marginLeft": 65 }, "metricsGraph": { "id": 5, "metricName": "Distance", "type": "lineChart", "interpolate": "linear", "subType": "line", "color": "#ff7f0e" } } } }
    • M

      Email notification setup

      Watching Ignoring Scheduled Pinned Locked Moved Getting Started
      20
      0 Votes
      20 Posts
      4k Views
      skywatchS
      @skywatch Emails working fine for me now
    • M

      Installing MyController onto Raspberry Pi

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      12
      0 Votes
      12 Posts
      2k Views
      T
      @mtbhuw great!! thanks for your feedback!!