openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 91 forks source link

dynamic created channels not showing #120

Closed marcelrv closed 8 years ago

marcelrv commented 8 years ago

Hi Chris,

Another very new feature... dynamic created channels. When I create them, I don't see them in the UI. Will habmin support these in the future?

Likewise do you plan to support channel config options in habmin?

cdjackson commented 8 years ago

Yes to both :)

I was looking at the new channel interfaces yesterday, and I also want to look at channel config as I want to add temperature scale…

I added binding config yesterday, but only for reading at the moment - not setting...

On 31 Jan 2016, at 22:49, Marcel notifications@github.com wrote:

Hi Chris,

Another very new feature dynamic created channels When I create them, I don't see them in the UI Will habmin support these in the future?

Likewise do you plan to support channel config options in habmin?

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/120.

marcelrv commented 8 years ago

Cool, I use it rather heavily in my mqtt binding, but no UI can display it for now. Hence my hope was that habmin would do.

Anyway, once you commit the channel stuff would be great to make another binary build for testing.

cdjackson commented 8 years ago

Can you provide the json for one of your things with dynamic channels, and also the dump for this thing if you get it from /rest/channel-types/{channelid}

marcelrv commented 8 years ago

Hi Chris,

See here my setup note that /rest/channel-types/{channelid} for a dynamic channel does not seem to give anything. So maybe there is nothing yet that you can build upon

e,g, http://localhost:8080/rest/channel-types/mqtt%3Atopic%3A64f508e8%3AVcValves0Mode though mqtt:topic:64f508e8:VcValves0Mode is a valid (dynamic) channel

I pasted here the whole json

http://localhost:8080/rest/things

[
  {
    "statusInfo": {
      "status": "ONLINE",
      "statusDetail": "NONE"
    },
    "item": {
      "members": [],
      "link": "http://localhost:8080/rest/items/mqtt_bridge_003d4253",
      "state": "NULL",
      "type": "GroupItem",
      "name": "mqtt_bridge_003d4253",
      "label": "MQTT Bridge",
      "tags": [
        "thing"
      ],
      "groupNames": []
    },
    "link": "http://localhost:8080/rest/things/mqtt:bridge:003d4253",
    "configuration": {
      "async": true,
      "discoveryTopic": "#",
      "clientId": "",
      "discoveryMode": "MULTIPLE",
      "qos": "0",
      "retain": true,
      "pwd": "",
      "user": "",
      "url": "tcp://localhost:1883"
    },
    "properties": {},
    "UID": "mqtt:bridge:003d4253",
    "channels": []
  },
  {
    "statusInfo": {
      "status": "ONLINE",
      "statusDetail": "NONE"
    },
    "item": {
      "members": [
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcInfoMemory",
          "state": "5028",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcInfoMemory",
          "label": "/vc/info/memory",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcInfoStatus",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcInfoStatus",
          "label": "/vc/info/status",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcInfoTimestamp",
          "state": "02-02-2016 01:00:45",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcInfoTimestamp",
          "label": "/vc/info/timestamp",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcSensor0Value",
          "state": "45.56",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcSensor0Value",
          "label": "/vc/sensor/0/value",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcSensor1Value",
          "state": "26.19",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcSensor1Value",
          "label": "/vc/sensor/1/value",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcValves0Mode",
          "state": "0",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcValves0Mode",
          "label": "/vc/valves/0/mode",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_VcValves0Pos",
          "state": "2",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_VcValves0Pos",
          "label": "/vc/valves/0/pos",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_color",
          "state": "0,0,0",
          "type": "ColorItem",
          "name": "mqtt_topic_64f508e8_color",
          "label": "Color type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_contact",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "ContactItem",
          "name": "mqtt_topic_64f508e8_contact",
          "label": "Contact type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_datetime",
          "state": "NULL",
          "type": "DateTimeItem",
          "name": "mqtt_topic_64f508e8_datetime",
          "label": "DateTime type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_dimmer",
          "state": "0",
          "type": "DimmerItem",
          "name": "mqtt_topic_64f508e8_dimmer",
          "label": "Dimmer type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_number",
          "state": "0",
          "stateDescription": {
            "pattern": "%.1f",
            "readOnly": false,
            "options": []
          },
          "type": "NumberItem",
          "name": "mqtt_topic_64f508e8_number",
          "label": "Number type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_rollershutter",
          "state": "0",
          "type": "RollershutterItem",
          "name": "mqtt_topic_64f508e8_rollershutter",
          "label": "Rollershutter type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_string",
          "state": "0",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_64f508e8_string",
          "label": "string type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8_switch",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "SwitchItem",
          "name": "mqtt_topic_64f508e8_switch",
          "label": "Switch type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_64f508e8"
          ]
        }
      ],
      "link": "http://localhost:8080/rest/items/mqtt_topic_64f508e8",
      "state": "UNDEF",
      "type": "GroupItem",
      "name": "mqtt_topic_64f508e8",
      "label": "MQTT Topic",
      "tags": [
        "thing"
      ],
      "groupNames": [
        "home_group_4310a0cb"
      ]
    },
    "link": "http://localhost:8080/rest/things/mqtt:topic:64f508e8",
    "bridgeUID": "mqtt:bridge:003d4253",
    "configuration": {
      "topicId": "/vc/#",
      "transform": "default",
      "type": "state",
      "createChannels": true,
      "direction": "in"
    },
    "properties": {},
    "UID": "mqtt:topic:64f508e8",
    "channels": [
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_number"
        ],
        "id": "number",
        "channelTypeUID": "mqtt:number-channel",
        "itemType": "Number",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_switch"
        ],
        "id": "switch",
        "channelTypeUID": "mqtt:switch-channel",
        "itemType": "Switch",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_color"
        ],
        "id": "color",
        "channelTypeUID": "mqtt:color-channel",
        "itemType": "Color",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_contact"
        ],
        "id": "contact",
        "channelTypeUID": "mqtt:contact-channel",
        "itemType": "Contact",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_datetime"
        ],
        "id": "datetime",
        "channelTypeUID": "mqtt:datetime-channel",
        "itemType": "DateTime",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_rollershutter"
        ],
        "id": "rollershutter",
        "channelTypeUID": "mqtt:rollershutter-channel",
        "itemType": "Rollershutter",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_dimmer"
        ],
        "id": "dimmer",
        "channelTypeUID": "mqtt:dimmer-channel",
        "itemType": "Dimmer",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_string"
        ],
        "id": "string",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcSensor0Value"
        ],
        "id": "VcSensor0Value",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcSensor1Value"
        ],
        "id": "VcSensor1Value",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcInfoTimestamp"
        ],
        "id": "VcInfoTimestamp",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcInfoMemory"
        ],
        "id": "VcInfoMemory",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcValves0Pos"
        ],
        "id": "VcValves0Pos",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcValves0Mode"
        ],
        "id": "VcValves0Mode",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      },
      {
        "linkedItems": [
          "mqtt_topic_64f508e8_VcInfoStatus"
        ],
        "id": "VcInfoStatus",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {}
      }
    ]
  }
]

http://localhost:8080/rest/channel-types

[
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Number types to MQTT messages",
    "label": "Number type MQTT payload",
    "stateDescription": {
      "pattern": "%.1f",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:number-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping string types to MQTT messages",
    "label": "string type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:string-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Low Battery",
    "category": "Battery",
    "tags": [],
    "UID": "system:low-battery"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Contact types (OPEN/CLOSED) to MQTT messages",
    "label": "Contact type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:contact-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Rollershutter types to MQTT messages",
    "label": "Rollershutter type MQTT payload",
    "tags": [],
    "UID": "mqtt:rollershutter-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Signal Strength",
    "category": "QualityOfService",
    "tags": [],
    "UID": "system:signal-strength"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Color types to MQTT messages",
    "label": "Color type MQTT payload",
    "tags": [],
    "UID": "mqtt:color-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Switch types to MQTT messages",
    "label": "Switch type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:switch-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Dimmer types to MQTT messages",
    "label": "Dimmer type MQTT payload",
    "tags": [],
    "UID": "mqtt:dimmer-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Battery Level",
    "category": "Battery",
    "tags": [],
    "UID": "system:battery-level"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Datetime types to MQTT messages",
    "label": "DateTime type MQTT payload",
    "tags": [],
    "UID": "mqtt:datetime-channel"
  }
]

channel config does exist in http://localhost:8080/rest/config-descriptions/channel-type%3Amqtt%3Astring-channel

{
  "uri": "channel-type:mqtt:string-channel",
  "parameters": [
    {
      "defaultValue": "null",
      "description": "MQTT topic for this channel",
      "label": "MQTT Topic",
      "name": "topicId",
      "required": true,
      "type": "TEXT",
      "readOnly": false,
      "multiple": false,
      "advanced": false,
      "limitToOptions": true,
      "options": [],
      "filterCriteria": []
    },
    {
      "defaultValue": "StringItem",
      "description": "Controls to what item types the data is mapped.",
      "label": "Item Type",
      "name": "itemtype",
      "required": true,
      "type": "TEXT",
      "readOnly": false,
      "multiple": false,
      "advanced": false,
      "limitToOptions": true,
      "options": [
        {
          "label": "ContactItem",
          "value": "ContactItem"
        },
        {
          "label": "DateTimeItem",
          "value": "DateTimeItem"
        },
        {
          "label": "DimmerItem",
          "value": "DimmerItem"
        },
        {
          "label": "NumberItem",
          "value": "NumberItem"
        },
        {
          "label": "RollershutterItem",
          "value": "RollershutterItem"
        },
        {
          "label": "StringItem",
          "value": "StringItem"
        },
        {
          "label": "SwitchItem",
          "value": "SwitchItem"
        },
        {
          "label": "ColorItem",
          "value": "ColorItem"
        },
        {
          "label": "LocationItem",
          "value": "LocationItem"
        },
        {
          "label": "PlayerItem",
          "value": "PlayerItem"
        },
        {
          "label": "ImageItem",
          "value": "ImageItem"
        }
      ],
      "filterCriteria": []
    }
  ],
  "parameterGroups": []
}
cdjackson commented 8 years ago

That's a bit strange. I've not looked too closely at the dynamic channels yet, but I assume there's a channel-type registry that you're registering your channels with, so I would have thought that they would have shown up. I think the rest interface should show all the channel types registered, and I understood that the XML reader also registered its channels in the same way.

@kaikreuzer just wondering if you can confirm the status of the channel-type interface with respect to dynamic channels?

kaikreuzer commented 8 years ago

there's a channel-type registry that you're registering your channels with

Hm, you are obviously only registering channel types in the ChannelTypeRegistry. I am therefore not sure if I understand your problem: Dynamic channels should be shown on /rest/things/{id} - aren't they available there?

marcelrv commented 8 years ago

Ok, indeed i can confirm the dynamic channels are visible in the /rest/thing

What I don't find anywhere is the actual configuration of this channel. Maybe I need to check my code and it will end up in the properties area, but in that case I would expect the defaults to be seen there

E.g from above sample this would be a dynamic channel '''{ "linkedItems": [ "mqtt_topic_64f508e8_VcSensor0Value" ], "id": "VcSensor0Value", "channelTypeUID": "mqtt:string-channel", "itemType": "String", "properties": {} },'''

kaikreuzer commented 8 years ago

Looking at the ChannelDTO, which is used to for JSON serialization, I see that the configuration is completely missing there - so it is no wonder that you cannot see it. I have created https://github.com/eclipse/smarthome/issues/981 for this - if this is anything urgent for you, feel free to create a PR yourself.

cdjackson commented 8 years ago

@marcelrv I've updated the JAR to add channel configuration - it doesn't actually allow configuration due to the issue Kai has mentioned, but it should provide the configuration options at least.

marcelrv commented 8 years ago

Cool, I made yesterday a patch for it. Still need to test it though. Op 5 feb. 2016 00:36 schreef "Chris Jackson" notifications@github.com:

@marcelrv https://github.com/marcelrv I've updated the JAR to add channel configuration - it doesn't actually allow configuration due to the issue Kai has mentioned, but it should provide the configuration options at least.

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/120#issuecomment-180103169.

marcelrv commented 8 years ago

So with the fix applied this is an example of the thing with channel config

{
  "statusInfo": {
    "status": "ONLINE",
    "statusDetail": "NONE"
  },
  "item": {
    "members": [
      {
        "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_string",
        "state": "NULL",
        "stateDescription": {
          "pattern": "%s",
          "readOnly": false,
          "options": []
        },
        "type": "StringItem",
        "name": "mqtt_topic_VcSensor1_string",
        "label": "string type MQTT payload",
        "tags": [],
        "groupNames": [
          "mqtt_topic_VcSensor1"
        ]
      }
    ],
    "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1",
    "state": "NULL",
    "type": "GroupItem",
    "name": "mqtt_topic_VcSensor1",
    "label": "topic: /vc/",
    "tags": [
      "thing"
    ],
    "groupNames": [
      "home_group_4310a0cb"
    ]
  },
  "link": "http://localhost:8080/rest/things/mqtt:topic:VcSensor1",
  "bridgeUID": "mqtt:bridge:003d4253",
  "configuration": {
    "topicId": "/vc/#",
    "transform": "default",
    "type": "state",
    "createChannels": true,
    "direction": "in"
  },
  "properties": {},
  "UID": "mqtt:topic:VcSensor1",
  "channels": [
    {
      "linkedItems": [
        "mqtt_topic_VcSensor1_string"
      ],
      "id": "string",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcSensor1Value",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/sensor/1/value",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcSensor0Value",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/sensor/0/value",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcInfoTimestamp",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/info/timestamp",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcInfoMemory",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/info/memory",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcValves0Pos",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/valves/0/pos",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcValves0Mode",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/valves/0/mode",
        "itemtype": "StringItem"
      }
    },
    {
      "linkedItems": [],
      "id": "VcInfoStatus",
      "channelTypeUID": "mqtt:string-channel",
      "itemType": "String",
      "properties": {},
      "configuration": {
        "topicId": "/vc/info/status",
        "itemtype": "StringItem"
      }
    }
  ]
}
cdjackson commented 8 years ago

I need to refactor a little bit of HABmin to allow changes to the channel config - I started this last night and should do it today (it’s not much work I think - I’m just doing some zwave stuff now). One issue I’ve not worked out yet is how to actually update the channel configuration. The only way I can think of is to update the whole thing which I’ll try once I’ve got this refactored (I really hate to update the thing too much, but I guess channel configuration doesn’t change too often - at least for my use cases).

cdjackson commented 8 years ago

@marcelrv please try the latest JAR...

@kaikreuzer can you advise how to change channel configuration parameters? I tried saving the complete thing since I couldn't see any other way to do it, but this didn't obviously work (although I checked in the IDE that the changed channel config was present). Is that a bug or is there another way to do this?

marcelrv commented 8 years ago

Great I'll give it a try indeed Op 6 feb. 2016 18:28 schreef "Chris Jackson" notifications@github.com:

@marcelrv https://github.com/marcelrv please try the latest JAR...

@kaikreuzer https://github.com/kaikreuzer can you advise how to change channel configuration parameters? I tried saving the complete thing since I couldn't see any other way to do it, but this didn't obviously work (although I checked in the IDE that the changed channel config was present). Is that a bug or is there another way to do this?

— Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/120#issuecomment-180815620.

kaikreuzer commented 8 years ago

@kaikreuzer can you advise how to change channel configuration parameters?

For the moment, you would indeed have to update the complete thing. If this does not work, I would consider it a bug (possibly also a problem with unmarshalling the channel JSON to the ChannelDTO?).

For the future, we should have a @Path("/{thingUID}/channels/{channelId}/config") similar to @Path("/{thingUID}/config") for retrieving and updating the configuration of a channel - again, feel free to create a PR yourself, if this is something that is useful for you.

marcelrv commented 8 years ago

@cdjackson Hi Chris,

With the latest jar, I can indeed see the config options. the dynamic channels are not yet showing up, only the pre-defined channels are there. I can see them in the rest though incl their config

cdjackson commented 8 years ago

Ok - thanks. Can you attach an example JSON (both thing, and channel-type) for dynamic channels?

marcelrv commented 8 years ago

These

http://localhost:8080/rest/channel-types

[
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Rollershutter types to MQTT messages",
    "label": "Rollershutter type MQTT payload",
    "tags": [],
    "UID": "mqtt:rollershutter-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "NumberItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Number types to MQTT messages",
    "label": "Number type MQTT payload",
    "stateDescription": {
      "pattern": "%.1f",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:number-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "ColorItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Color types to MQTT messages",
    "label": "Color type MQTT payload",
    "tags": [],
    "UID": "mqtt:color-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Dimmer types to MQTT messages",
    "label": "Dimmer type MQTT payload",
    "tags": [],
    "UID": "mqtt:dimmer-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Low Battery",
    "category": "Battery",
    "tags": [],
    "UID": "system:low-battery"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Contact types (OPEN/CLOSED) to MQTT messages",
    "label": "Contact type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:contact-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Battery Level",
    "category": "Battery",
    "tags": [],
    "UID": "system:battery-level"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Datetime types to MQTT messages",
    "label": "DateTime type MQTT payload",
    "tags": [],
    "UID": "mqtt:datetime-channel"
  },
  {
    "parameters": [],
    "parameterGroups": [],
    "label": "Signal Strength",
    "category": "QualityOfService",
    "tags": [],
    "UID": "system:signal-strength"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "StringItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping string types to MQTT messages",
    "label": "string type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:string-channel"
  },
  {
    "parameters": [
      {
        "defaultValue": "null",
        "description": "MQTT topic for this channel",
        "label": "MQTT Topic",
        "name": "topicId",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [],
        "filterCriteria": []
      },
      {
        "defaultValue": "SwitchItem",
        "description": "Controls to what item types the data is mapped.",
        "label": "Item Type",
        "name": "itemtype",
        "required": true,
        "type": "TEXT",
        "readOnly": false,
        "multiple": false,
        "advanced": false,
        "limitToOptions": true,
        "options": [
          {
            "label": "ContactItem",
            "value": "ContactItem"
          },
          {
            "label": "DateTimeItem",
            "value": "DateTimeItem"
          },
          {
            "label": "DimmerItem",
            "value": "DimmerItem"
          },
          {
            "label": "NumberItem",
            "value": "NumberItem"
          },
          {
            "label": "RollershutterItem",
            "value": "RollershutterItem"
          },
          {
            "label": "StringItem",
            "value": "StringItem"
          },
          {
            "label": "SwitchItem",
            "value": "SwitchItem"
          },
          {
            "label": "ColorItem",
            "value": "ColorItem"
          },
          {
            "label": "LocationItem",
            "value": "LocationItem"
          },
          {
            "label": "PlayerItem",
            "value": "PlayerItem"
          },
          {
            "label": "ImageItem",
            "value": "ImageItem"
          }
        ],
        "filterCriteria": []
      }
    ],
    "parameterGroups": [],
    "description": "Channel for mapping Switch types to MQTT messages",
    "label": "Switch type MQTT payload",
    "stateDescription": {
      "pattern": "%s",
      "readOnly": false,
      "options": []
    },
    "tags": [],
    "UID": "mqtt:switch-channel"
  }
]
marcelrv commented 8 years ago

and here the thing

http://localhost:8080/rest/things

[
  {
    "statusInfo": {
      "status": "ONLINE",
      "statusDetail": "NONE"
    },
    "item": {
      "members": [],
      "link": "http://localhost:8080/rest/items/mqtt_bridge_003d4253",
      "state": "NULL",
      "type": "GroupItem",
      "name": "mqtt_bridge_003d4253",
      "label": "MQTT Bridge",
      "tags": [
        "thing"
      ],
      "groupNames": []
    },
    "link": "http://localhost:8080/rest/things/mqtt:bridge:003d4253",
    "configuration": {
      "async": true,
      "discoveryTopic": "#",
      "clientId": "",
      "discoveryMode": "MULTIPLE",
      "qos": "0",
      "retain": true,
      "pwd": "",
      "user": "",
      "url": "tcp://localhost:1883"
    },
    "properties": {},
    "UID": "mqtt:bridge:003d4253",
    "channels": []
  },
  {
    "statusInfo": {
      "status": "OFFLINE",
      "statusDetail": "NONE"
    },
    "item": {
      "members": [
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcInfoMemory",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcInfoMemory",
          "label": "/vc/info/memory",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcInfoStatus",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcInfoStatus",
          "label": "/vc/info/status",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcInfoTimestamp",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcInfoTimestamp",
          "label": "/vc/info/timestamp",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcSensor0Value",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcSensor0Value",
          "label": "/vc/sensor/0/value",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcSensor1Value",
          "state": "25.38",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcSensor1Value",
          "label": "/vc/sensor/1/value",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcValves0Mode",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcValves0Mode",
          "label": "/vc/valves/0/mode",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_VcValves0Pos",
          "state": "NULL",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_VcValves0Pos",
          "label": "/vc/valves/0/pos",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1_string",
          "state": "25.38",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcSensor1_string",
          "label": "string type MQTT payload",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcSensor1"
          ]
        }
      ],
      "link": "http://localhost:8080/rest/items/mqtt_topic_VcSensor1",
      "state": "UNDEF",
      "type": "GroupItem",
      "name": "mqtt_topic_VcSensor1",
      "label": "topic: /vc/",
      "tags": [
        "thing"
      ],
      "groupNames": [
        "home_group_4310a0cb"
      ]
    },
    "link": "http://localhost:8080/rest/things/mqtt:topic:VcSensor1",
    "bridgeUID": "mqtt:bridge:003d4253",
    "configuration": {
      "topicId": "/vc/sensor/1/#",
      "transform": "default",
      "type": "state",
      "createChannels": true,
      "direction": "in"
    },
    "properties": {},
    "UID": "mqtt:topic:VcSensor1",
    "channels": [
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_string"
        ],
        "id": "string",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcSensor1Value"
        ],
        "id": "VcSensor1Value",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/sensor/1/value",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcSensor0Value"
        ],
        "id": "VcSensor0Value",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/sensor/0/value",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcInfoTimestamp"
        ],
        "id": "VcInfoTimestamp",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/timestamp",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcInfoMemory"
        ],
        "id": "VcInfoMemory",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/memory",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcValves0Pos"
        ],
        "id": "VcValves0Pos",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/valves/0/pos",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcValves0Mode"
        ],
        "id": "VcValves0Mode",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/valves/0/mode",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcSensor1_VcInfoStatus"
        ],
        "id": "VcInfoStatus",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/status",
          "itemtype": "StringItem"
        }
      }
    ]
  },
  {
    "statusInfo": {
      "status": "OFFLINE",
      "statusDetail": "NONE"
    },
    "item": {
      "members": [
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcInfo_VcInfoTimestamp",
          "state": "07-02-2016 16:08:19",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcInfo_VcInfoTimestamp",
          "label": "/vc/info/timestamp",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcInfo"
          ]
        },
        {
          "link": "http://localhost:8080/rest/items/mqtt_topic_VcInfo_VcInfoMemory",
          "state": "5028",
          "stateDescription": {
            "pattern": "%s",
            "readOnly": false,
            "options": []
          },
          "type": "StringItem",
          "name": "mqtt_topic_VcInfo_VcInfoMemory",
          "label": "/vc/info/memory",
          "tags": [],
          "groupNames": [
            "mqtt_topic_VcInfo"
          ]
        }
      ],
      "link": "http://localhost:8080/rest/items/mqtt_topic_VcInfo",
      "state": "UNDEF",
      "type": "GroupItem",
      "name": "mqtt_topic_VcInfo",
      "label": "topic: /vc/info/#",
      "tags": [
        "thing"
      ],
      "groupNames": [
        "home_group_4310a0cb"
      ]
    },
    "link": "http://localhost:8080/rest/things/mqtt:topic:VcInfo",
    "bridgeUID": "mqtt:bridge:003d4253",
    "configuration": {
      "topicId": "/vc/info/#",
      "transform": "default",
      "type": "state",
      "createChannels": true,
      "direction": "in"
    },
    "properties": {},
    "UID": "mqtt:topic:VcInfo",
    "channels": [
      {
        "linkedItems": [],
        "id": "all",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcInfo_VcInfoTimestamp"
        ],
        "id": "VcInfoTimestamp",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/timestamp",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [
          "mqtt_topic_VcInfo_VcInfoMemory"
        ],
        "id": "VcInfoMemory",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/memory",
          "itemtype": "StringItem"
        }
      },
      {
        "linkedItems": [],
        "id": "VcInfoStatus",
        "channelTypeUID": "mqtt:string-channel",
        "itemType": "String",
        "properties": {},
        "configuration": {
          "topicId": "/vc/info/status",
          "itemtype": "StringItem"
        }
      }
    ]
  }
]
cdjackson commented 8 years ago

Thanks - I think I know what's up - I think I'm using the id instead of the UID when getting the channel-type. I'll check this shortly...

cdjackson commented 8 years ago

Give the latest version a try and let me know if it's any better...

marcelrv commented 8 years ago

did you push anything? the last change seems 1 day ago. Anyways, pulled it once more but still the same

cdjackson commented 8 years ago

According to my logs, it was updated around 1530 this afternoon, so not sure why you didn't see it... I've just re-pushed it as I've fixed a few more things this afternoon...

marcelrv commented 8 years ago

@cdjackson indeed now it came through. Very nice, it has all of the channels including the channel config.

some very small things I could see, e.g. the labels are taken from the channelType instead of the channel. I think due to this line: https://github.com/cdjackson/HABmin2/blob/theme/src/app/configuration/thingConfig.js#L385

2nd thing, the # of channels still shows 1 instead of the true # of channels

cdjackson commented 8 years ago

some very small things I could see, e.g. the labels are taken from the channelType instead of the channel. I think due to this line: https://github.com/cdjackson/HABmin2/blob/theme/src/app/configuration/thingConfig.js#L385 https://github.com/cdjackson/HABmin2/blob/theme/src/app/configuration/thingConfig.js#L385 I’m not sure what you mean here. The line you reference is taking the channel type label when creating a new item - is this what you mean by the above? I would have thought that when creating a new item, that we should use the channel type label as the default label for a new thing?

Or do I misunderstand?

2nd thing, the # of channels still shows 1 instead of the true # of channels

This one is simple :) I’ll push an update on this either tonight or tomorrow...

cdjackson commented 8 years ago

I’ve pushed an update that I hope will fix the channel count issue.

marcelrv commented 8 years ago

yes indeed it fixes the counter.

probably I picked the wrong line for the label issue. So currently all of the channels have the same label (coming from the channel type) whereas they should have different labels.

https://github.com/cdjackson/HABmin2/blob/theme/src/app/configuration/thingConfig.tpl.html#L395

however, checking the rest, also the label is missing, so first step is to bring the channel label in the rest interface, than we can display it here

cdjackson commented 8 years ago

I think we can close this? I'm now also using this in Zwave and it seems to be ok there at least...

Sent from my iPhone

On 8 Feb 2016, at 23:37, Marcel notifications@github.com wrote:

yes indeed it fixes the counter.

probably I picked the wrong line for the label issue. So currently all of the channels have the same label (coming from the channel type) whereas they should have different labels.

https://github.com/cdjackson/HABmin2/blob/theme/src/app/configuration/thingConfig.tpl.html#L395

however, checking the rest, also the label is missing, so first step is to bring the channel label in the rest interface, than we can display it here

— Reply to this email directly or view it on GitHub.

marcelrv commented 8 years ago

Hi Chris,

Thanks for adding!