How to use JSON Virtual Edge Resources?

Virtual resources are an important piece of Octave applications.

Octave’s documentation shows exemples of JSON virtual resources used to store multiple values like the current state of your device, in order to use it later on the edge or on the cloud. For example:

function(event) {
    var temperature ="/redSensor/imu/temp/value",0).value;
    var pressure ="/redSensor/pressure/value",0).value;
    var lat = 0;
    var lon = 0;
    var pos ="/location/coordinates/value",0);
    if (pos) {
        lat =;
        lon = pos.lon
    var light ="/redSensor/light/value",0).value;
    var bars ="/util/cellular/signal/value",0).value.bars;
    var technology ="/util/cellular/signal/value",0).value.rat;
    var report = {
        "temperature": temperature,
        "pressure": pressure,
        "location": { "lat": lat, "lon": lon },
        "light": light,
        "signal_bars": bars,
        "cell_technology": technology
    return {
    "vr://report": [report]

Read more on:

1 Like