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
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Responses
200
Ok response
application/json
get
GET /api/v1/mobius/node/config/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "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
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Responses
200
Ok response
application/json
get
GET /api/v1/mobius/node/configtree/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "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
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Responses
200
Ok response
application/json
post
POST /api/v1/mobius/node/resetpsks/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": {
    "result": "OK"
  }
}

Get node health check

get
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Query parameters
deadTimestringOptional

Time, in seconds, since last update to consider object as dead. Assumed 24 hours if not specified

Responses
200
Ok response
application/json
get
GET /api/v1/mobius/node/healthcheck/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": [
    {
      "sid": "002",
      "status": "OK",
      "name": "mobius-engine-api",
      "objectsInFaultCount": 0,
      "objectsInFault": []
    },
    {
      "sid": "012",
      "status": "OK",
      "name": "mobius-ui-restapi",
      "objectsInFaultCount": 0,
      "objectsInFault": []
    },
    {
      "sid": "020",
      "status": "OK",
      "name": "enocean devices",
      "objectsInFaultCount": 1,
      "objectsInFault": [
        {
          "uri": "000001/020/000B/0001",
          "lastUpdated": "1970-01-01T00:00:00.000Z",
          "lastUpdatedEpoch": 0,
          "name": "EnOcean EEP A5-08-01 Light Sensor - Hall",
          "profileName": "EnOcean EEP A5-08-01 Light Sensor"
        }
      ]
    }
  ]
}

Get status of all services on a node

get
Path parameters
hidstringRequired

MobiusFlow Hub ID

Example: {"value":"000001"}Pattern: ^[0-9A-Fa-f]{6}$
Responses
200
Ok response
application/json
get
GET /api/v1/mobius/node/servicestatus/{hid} HTTP/1.1
Host: 
Accept: */*
{
  "ts": "2022-12-21T10:25:54.585Z",
  "uri": "000001",
  "data": null
}

Backup

get
Responses
200
Default Response
get
GET /api/v1/mobius/node/backup HTTP/1.1
Host: 
Accept: */*
200

Default Response

No content

Last updated