Node

API Node Calls

The node calls are for reading a MobiusFlow hub as well as resetting the pre-shared keys on a given hub

Get node configuration

GET/api/v1/mobius/node/config/{hid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
Pattern: ^[0-9A-Fa-f]{6}$
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*array of object

Mobius Node Configuration (array of services information)

Request
const response = await fetch('/api/v1/mobius/node/config/{hid}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "id": "0004/002",
      "name": "mobius-engine-api",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0012/012",
      "name": "mobius-ui-restapi",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "0021/020",
      "name": "enocean devices",
      "enabled": true,
      "runAtStart": true
    },
    {
      "id": "000E/021",
      "name": "node-red connector",
      "enabled": true,
      "runAtStart": true
    }
  ]
}

Get node configuration tree

GET/api/v1/mobius/node/configtree/{hid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
Pattern: ^[0-9A-Fa-f]{6}$
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*array of object

Response data

Request
const response = await fetch('/api/v1/mobius/node/configtree/{hid}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "sid": "002",
      "spid": "0004",
      "name": "mobius-engine-api",
      "enabled": true,
      "runAtStart": true,
      "settings": {
        "mqtt": {
          "host": "mqtt://localhost",
          "port": 2016
        },
        "timeouts": {
          "local": 10000,
          "remote": 5000
        }
      },
      "custom": {},
      "objects": []
    },
    {
      "sid": "012",
      "spid": "0012",
      "name": "mobius-ui-restapi",
      "enabled": true,
      "runAtStart": true,
      "settings": {
        "mqtt": {
          "host": "mqtt://localhost",
          "port": 2016
        },
        "timeouts": {
          "local": 10000,
          "remote": 5000
        }
      },
      "custom": {
        "resin-vpn": false
      },
      "objects": [
        {
          "pid": "0002",
          "objects": [
            {
              "pid": "0002",
              "ins": "0001",
              "rids": []
            }
          ]
        }
      ]
    },
    {
      "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": "0001",
              "rids": [
                {
                  "rid": "01",
                  "settings": {
                    "pv": "EnOcean EEP A5-08-01 Light, Temperature and Occupancy Sensor"
                  }
                },
                {
                  "rid": "0B",
                  "settings": {
                    "pv": "12345678"
                  }
                }
              ]
            },
            {
              "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": "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"
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "sid": "021",
      "spid": "000E",
      "name": "node-red connector",
      "enabled": true,
      "runAtStart": true,
      "settings": {
        "mqtt": {
          "host": "mqtt://localhost",
          "port": 2016
        },
        "timeouts": {
          "local": 500,
          "remote": 5000
        }
      },
      "custom": {
        "host": "localhost",
        "port": 1890,
        "psk": "node-red"
      },
      "objects": []
    }
  ]
}

Reset node pre-shared keys

POST/api/v1/mobius/node/resetpsks/{hid}
Path parameters
hid*string

MobiusFlow Hub ID

Example: "000001"
Pattern: ^[0-9A-Fa-f]{6}$
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

Response data

Request
const response = await fetch('/api/v1/mobius/node/resetpsks/{hid}', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "result": "OK"
  }
}

Last updated

© 2023 MobiusFlow® - All Rights Reserved - MobiusFlow® is a registered trademark of Infrastructure Software Solutions Limited trading as MobiusFlow® - All other brand names, product names, or trademarks belong to their respective owners