Object

API Object & Resource Calls

The object calls are used to read, add, remove and manipulate MobiusFlow objects and resources.

Get live object

GET/api/v1/mobius/object/{hid}/{sid}/{pid}/{ins}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001/020/000D/0001"
data*object

Mobius live object information

Request
const response = await fetch('/api/v1/mobius/object/{hid}/{sid}/{pid}/{ins}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001/020/000D/0001",
  "data": {
    "pid": "000D",
    "ins": "0001",
    "profileName": "enocean_A5-08-01",
    "description": "<p>EnOcean light, temperature and occupancy sensor</p>",
    "resources": [
      {
        "rid": "00",
        "type": "string",
        "name": "parentObject",
        "pv": "",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "",
          ""
        ],
        "settings": {
          "access": "rw",
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "01",
        "type": "string",
        "name": "name",
        "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor",
          ""
        ],
        "settings": {
          "access": "r",
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "02",
        "type": "datetime",
        "name": "objectLastUpdated",
        "pv": "1970-01-01T00:00:00.000Z",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "1970-01-01T00:00:00.000Z",
          "1970-01-01T00:00:00.000Z"
        ],
        "settings": {
          "access": "r"
        }
      },
      {
        "rid": "03",
        "type": "string",
        "name": "description",
        "pv": "",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "",
          ""
        ],
        "settings": {
          "access": "r",
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "04",
        "type": "string",
        "name": "location",
        "pv": "",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "",
          ""
        ],
        "settings": {
          "access": "r",
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "0A",
        "type": "string",
        "name": "eep",
        "pv": "A5-08-01",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "A5-08-01",
          ""
        ],
        "settings": {
          "access": "r",
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "0B",
        "type": "string",
        "name": "uid",
        "pv": "12345678",
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          "12345678",
          ""
        ],
        "settings": {
          "access": "r",
          "maxlen": 8,
          "tags": {
            "attribute": "true"
          }
        }
      },
      {
        "rid": "0C",
        "type": "number",
        "name": "status",
        "pv": 0,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          0,
          0
        ],
        "settings": {
          "access": "r"
        }
      },
      {
        "rid": "0D",
        "type": "number",
        "name": "dBm",
        "pv": 0,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          0,
          0
        ],
        "settings": {
          "access": "r",
          "units": "dBm"
        }
      },
      {
        "rid": "0E",
        "type": "bool",
        "name": "lrn",
        "pv": false,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          false,
          false
        ],
        "settings": {
          "access": "r"
        }
      },
      {
        "rid": "40",
        "type": "number",
        "name": "tmp",
        "pv": 0,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          0,
          0
        ],
        "settings": {
          "access": "r",
          "min": 0,
          "max": 51,
          "precision": 1,
          "units": "C"
        }
      },
      {
        "rid": "41",
        "type": "number",
        "name": "lux",
        "pv": 0,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          0,
          0
        ],
        "settings": {
          "access": "r",
          "min": 0,
          "max": 510,
          "precision": 1,
          "units": "lx"
        }
      },
      {
        "rid": "42",
        "type": "bool",
        "name": "pirs",
        "pv": false,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          false,
          false
        ],
        "settings": {
          "access": "r"
        }
      },
      {
        "rid": "43",
        "type": "bool",
        "name": "occupany",
        "pv": false,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          false,
          false
        ],
        "settings": {
          "access": "r"
        }
      },
      {
        "rid": "44",
        "type": "number",
        "name": "supplyVoltage",
        "pv": 0,
        "prar": [
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          null,
          0,
          0
        ],
        "settings": {
          "access": "r",
          "min": 0,
          "max": 5.1,
          "precision": 1,
          "units": "V"
        }
      }
    ],
    "families": [
      "EnOcean",
      "TemperatureSensor",
      "OccupancySensor",
      "LightSensor"
    ],
    "isFromConfig": 1,
    "__$markdownParsed": true
  }
}

Get live resource

GET/api/v1/mobius/object/resource/{hid}/{sid}/{pid}/{ins}/{rid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
rid*string

MobiusFlow Resource ID

Example: "40"
Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001/020/000D/0001/40"
data*object

Mobius live resource information

Request
const response = await fetch('/api/v1/mobius/object/resource/{hid}/{sid}/{pid}/{ins}/{rid}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001/020/000D/0001/40",
  "data": {
    "rid": "40",
    "type": "number",
    "name": "tmp",
    "pv": 0,
    "prar": [
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      0,
      0
    ],
    "settings": {
      "access": "r",
      "min": 0,
      "max": 51,
      "precision": 1,
      "units": "C"
    }
  }
}

Get object configuration

GET/api/v1/mobius/object/config/{hid}/{sid}/{pid}/{ins}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001"
data*object
Request
const response = await fetch('/api/v1/mobius/object/config/{hid}/{sid}/{pid}/{ins}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "pid": "000D",
    "ins": "0001",
    "rids": [
      {
        "rid": "01",
        "settings": {
          "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
        }
      },
      {
        "rid": "0B",
        "settings": {
          "pv": "12345678"
        }
      }
    ]
  }
}

Add object

POST/api/v1/mobius/object/{hid}/{sid}/{pid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
Body
ridstring
settingsobject
Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001"
data*object

Mobius service configuration

Request
const response = await fetch('/api/v1/mobius/object/{hid}/{sid}/{pid}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify([
      {
        "rid": "40",
        "settings": {
          "min": 30
        }
      }
    ]),
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {},
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "pid": "000D",
            "ins": "0005",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 22
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0002",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0006",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "pid": "0010",
            "ins": "0001",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Add object with specified instance ID

POST/api/v1/mobius/object/{hid}/{sid}/{pid}/{ins}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
Body
ridstring
settingsobject
Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001"
data*object

Mobius service configuration

Request
const response = await fetch('/api/v1/mobius/object/{hid}/{sid}/{pid}/{ins}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify([
      {
        "rid": "40",
        "settings": {
          "min": 30
        }
      }
    ]),
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "custom": {},
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "pid": "000D",
            "ins": "0005",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 22
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0002",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ]
          },
          {
            "pid": "000D",
            "ins": "0006",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "pid": "0010",
            "ins": "0001",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Clone object

POST/api/v1/mobius/object/clone/{hid}/{sid}/{pid}/{ins}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
Body
copies*number

Number of copies to be created

startstring

Starting instance ID of the 1st copy, subsequent copies will be incremented

Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001"
data*object

Mobius service configuration

Request
const response = await fetch('/api/v1/mobius/object/clone/{hid}/{sid}/{pid}/{ins}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "copies": 1,
      "start": "000A"
    }),
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "sid": "020",
    "spid": "0021",
    "name": "enocean devices",
    "enabled": true,
    "runAtStart": true,
    "settings": {
      "mqtt": {
        "host": "mqtt://localhost",
        "port": 2016
      },
      "timeouts": {
        "local": 500,
        "remote": 5000
      }
    },
    "objects": [
      {
        "pid": "000D",
        "objects": [
          {
            "ins": "0002",
            "pid": "000D",
            "uiname": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ],
            "timestamp": 1671618304292
          },
          {
            "ins": "0006",
            "pid": "000D",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "ins": "0001",
            "pid": "000D",
            "rids": [
              {
                "rid": "40",
                "settings": {
                  "min": 30
                }
              }
            ]
          },
          {
            "ins": "000A",
            "pid": "000D",
            "uiname": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "11223344"
                }
              }
            ],
            "timestamp": 1671618304292
          }
        ]
      },
      {
        "pid": "0010",
        "objects": [
          {
            "ins": "0001",
            "pid": "0010",
            "uiname": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)",
            "rids": [
              {
                "rid": "01",
                "settings": {
                  "pv": "EnOcean EEP A5-02-02 Temperature Sensor (-30C to 10C)"
                }
              },
              {
                "rid": "0B",
                "settings": {
                  "pv": "12121212"
                }
              }
            ],
            "timestamp": 1671618299023
          }
        ]
      }
    ],
    "custom": {}
  }
}

Patch live resource

PATCH/api/v1/mobius/object/resource/{hid}/{sid}/{pid}/{ins}/{rid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
sid*string

MobiusFlow Service ID

Example: "020"
pid*string

MobiusFlow Object Profile ID

Example: "014A"
ins*string

MobiusFlow Object Instance ID

Example: "0001"
rid*string

MobiusFlow Resource ID

Example: "40"
Body
prioritynumber

Priority of the resource value

value*any of

Value of the resource

Response

Ok response

Body
ts*string

Timestamp of the response

Example: "2022-12-21T10:25:54.585Z"
uri*string

URI of the response

Example: "000001/020/000D/0001/40"
data*object

Mobius live resource information

Request
const response = await fetch('/api/v1/mobius/object/resource/{hid}/{sid}/{pid}/{ins}/{rid}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "priority": 15,
      "value": 10
    }),
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001/020/000D/0001/40",
  "data": {
    "rid": "40",
    "type": "number",
    "name": "tmp",
    "pv": 10,
    "prar": [
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      null,
      10,
      0