Skip to content
Snippets Groups Projects
mqtt_broker_plugin.json 3.48 KiB
Newer Older
{
  "json_plugin_version": 2,
  "Device.MQTT.": {
    "type": "object",
    "protocols": [
      "cwmp",
      "usp"
    ],
    "access": false,
    "array": false,
    "BrokerNumberOfEntries": {
      "type": "unsignedInt",
      "protocols": [
        "cwmp",
        "usp"
      ],
      "read": true,
      "write": false,
      "mapping": [
        {
          "type": "uci",
          "uci": {
            "file": "mosquitto",
            "section": {
              "type": "listener"
            },
            "option": {
              "name": "@Count"
            }
          }
        }
      ]
    },
    "Device.MQTT.Broker.{i}.": {
      "type": "object",
      "protocols": [
        "cwmp",
        "usp"
      ],
      "access": true,
      "array": true,
      "mapping": [
        {
          "type": "uci",
          "uci": {
            "file": "mosquitto",
            "section": {
              "type": "listener"
            },
            "dmmapfile": "dmmap_mosquitto"
          }
        }
      ],
      "Alias": {
        "type": "string",
        "protocols": [
          "cwmp",
          "usp"
        ],
        "read": true,
        "write": true,
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "alias"
          }
        ]
      },
      "Enable": {
        "type": "boolean",
        "read": true,
        "write": true,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "default": "1",
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "enabled"
          }
        ]
      },
      "Name": {
        "type": "string",
        "read": true,
        "write": false,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "mapping": [
          {
            "type": "uci",
            "uci": {
              "file": "mosquitto",
              "section": {
                "type": "listener"
              },
              "option": {
                "name": "@Name"
              }
            }
          }
        ]
      },
      "Port": {
        "type": "unsignedInt",
        "read": true,
        "write": true,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "port"
          }
        ]
      },
      "Interface": {
        "type": "string",
        "read": true,
        "write": true,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "flags": [
          "Reference"
        ],
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "interface",
            "linker_obj": "Device.IP.Interface.*.Name"
          }
        ]
      },
      "Username": {
        "type": "string",
        "read": true,
        "write": true,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "username"
          }
        ]
      },
      "Password": {
        "type": "string",
        "read": true,
        "write": true,
        "protocols": [
          "cwmp",
          "usp"
        ],
        "flags": [
          "Secure"
        ],
        "mapping": [
          {
            "data": "@Parent",
            "type": "uci_sec",
            "key": "password"
          }
        ]
      }
    }
  }
}