{"action":"closed","issue":{"url":"https://api.github.com/repos/athombv/homey/issues/1098","repository_url":"https://api.github.com/repos/athombv/homey","labels_url":"https://api.github.com/repos/athombv/homey/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/athombv/homey/issues/1098/comments","events_url":"https://api.github.com/repos/athombv/homey/issues/1098/events","html_url":"https://github.com/athombv/homey/issues/1098","id":191309388,"number":1098,"title":"capabilitiesOptions not working","user":{"login":"ajterpstra","id":22410740,"avatar_url":"https://avatars.githubusercontent.com/u/22410740?v=3","gravatar_id":"","url":"https://api.github.com/users/ajterpstra","html_url":"https://github.com/ajterpstra","followers_url":"https://api.github.com/users/ajterpstra/followers","following_url":"https://api.github.com/users/ajterpstra/following{/other_user}","gists_url":"https://api.github.com/users/ajterpstra/gists{/gist_id}","starred_url":"https://api.github.com/users/ajterpstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajterpstra/subscriptions","organizations_url":"https://api.github.com/users/ajterpstra/orgs","repos_url":"https://api.github.com/users/ajterpstra/repos","events_url":"https://api.github.com/users/ajterpstra/events{/privacy}","received_events_url":"https://api.github.com/users/ajterpstra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-23T15:47:48Z","updated_at":"2016-11-24T16:36:39Z","closed_at":"2016-11-24T16:36:39Z","body":"**What is your Homey version (Settings → System)?**\r\n\r\n1.0.1\r\n\r\n**What did you try to achieve?**\r\n\r\nTry with capabilitiesOptions to create a title\r\n\r\n*Please include detailed steps how we can reproduce the issue*\r\n\r\nApp.json\r\n\r\n> {\r\n>    \"id\": \"com.benext\",\r\n>   \"name\": {\r\n>     \"en\": \"BeNext\",\r\n>     \"nl\": \"BeNext\"\r\n>   },\r\n>     \"description\": {\r\n> \t    \"en\": \"Drivers for BeNext devices\",\r\n> \t\t\"nl\": \"Drivers for BeNext devices\"\r\n>     },\r\n>     \"category\": [ \"appliances\", \"security\" ],\r\n>     \"images\": {\r\n> \t    \"large\": \"/assets/images/large.png\",\r\n> \t    \"small\": \"/assets/images/small.png\"\r\n>     },\t    \r\n>     \"version\": \"0.0.1\",\r\n>     \"compatibility\": \">=0.9.3\",\r\n>     \"author\": {\r\n>     },\r\n>     \"drivers\": [\r\n> \t    {\r\n> \t\t    \"id\": \"p1-dongle\",\r\n> \t\t    \"name\": {\r\n> \t\t\t    \"en\": \"BeNext P1 Dongle\",\r\n> \t\t\t\t\"nl\": \"BeNext P1 Dongle\"\r\n> \t\t    },\r\n> \t\t    \"zwave\": {\r\n>         \t\"manufacturerId\": 138,\r\n>          \t \"productTypeId\": 47,\r\n>           \t\t\"productId\": 256,\r\n> \t\t\t    \"learnmode\": {\r\n> \t\t\t\t    \"image\": \"/drivers/p1-dongle/assets/wakeup.svg\",\r\n> \t\t\t\t    \"instruction\": {\r\n>                         \"en\": \"Press and hold the button on your BeNext P1 Dongle for three seconds\",\r\n> \t\t\t\t\t\t\"nl\": \"Druk en hou de knop op de BeNext P1 Dongle vast voor drie seconden\"\r\n> \t\t\t\t    }\r\n> \t\t\t\t},\r\n> \t\t\t    \"associationGroups\": [ 1 ]\r\n> \t\t    },\r\n> \t\t    \"class\": \"sensor\",\r\n> \t\t    \"capabilities\": [ \r\n> \t\t    \t\"measure_power\",\r\n>         \t\t\"meter_power.normal\",\r\n> \t\t\t\t\"meter_power.low\",\r\n>         \t\t\"meter_gas\"\r\n>         \t],\r\n> \t\t\t\"capabilitiesOptions\": {\r\n> \t\t\t\t\"meter_power.normal\": {\r\n> \t\t\t\t\t\"title\":{\r\n> \t\t\t\t\t\t\"en\":\"Power Meter Normal\",\r\n> \t\t\t\t\t\t\"nl\":\"Stroommeter normaal\"\r\n> \t\t\t\t\t}\r\n> \t\t\t\t},\r\n> \t\t\t\t\"meter_power.low\": {\r\n> \t\t\t\t\t\"title\":{\r\n> \t\t\t\t\t\t\"en\":\"Power Meter low\",\r\n> \t\t\t\t\t\t\"nl\":\"Stroommeter laag\"\r\n> \t\t\t\t\t}\r\n> \t\t\t\t},\r\n> \t\t\t},\r\n> \t\t    \"images\": {\r\n> \t\t\t    \"large\": \"/drivers/psm02/assets/images/large.jpg\",\r\n> \t\t\t    \"small\": \"/drivers/psm02/assets/images/small.jpg\"\r\n> \t\t    },\r\n> \t\t    \"settings\": [{\r\n> \t\t\t\t\t\"id\": \"baud_rate\",\r\n> \t\t\t\t\t\"type\": \"dropdown\",\r\n> \t\t\t\t\t\"label\": {\r\n> \t\t\t\t\t\t\"en\": \"Default Baud rate\",\r\n> \t\t\t\t\t\t\"nl\": \"Standaard Baud rate\"\r\n> \t\t\t\t\t},\r\n> \t\t\t\t\t\"hint\": {\r\n> \t\t\t\t\t\t\"en\": \"Kamstrup and Iskra = BAUD rate 9600   Kaifa, Landis, Gyr = BAUD rate 115200\",\r\n> \t\t\t\t\t\t\"nl\": \"Kamstrup en Iskra = BAUD rate 9600   Kaifa, Landis, Gyr = BAUD rate 115200\"\r\n> \t\t\t\t\t},\r\n> \t\t\t\t\t\"value\": \"1152\",\r\n> \t\t\t\t\t\"values\": [\r\n> \t\t\t\t\t\t{\r\n> \t\t\t\t\t\t\t\"id\": \"1152\",\r\n> \t\t\t\t\t\t\t\"label\": {\r\n> \t\t\t\t\t\t\t\t\"en\": \"115200 (DSMR 4.0)\"\r\n> \t\t\t\t\t\t\t}\r\n> \t\t\t\t\t\t},\r\n> \t\t\t\t\t\t{\r\n> \t\t\t\t\t\t\t\"id\": \"96\",\r\n> \t\t\t\t\t\t\t\"label\": {\r\n> \t\t\t\t\t\t\t\t\"en\": \"9600 (DMSR 2.2)\"\t\t\t\t\t\t\t}\r\n> \t\t\t\t\t\t}\r\n> \t\t\t\t\t]\r\n> \t\t\t\t}\r\n>               ]\r\n> \t    }\r\n>     ]\r\n> }\r\n\r\nDriver.js\r\n```\r\n\r\n'use strict';\r\n\r\nconst path = require('path');\r\nconst ZwaveDriver = require('homey-zwavedriver');\r\n\r\n// http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/340\r\n\r\nmodule.exports = new ZwaveDriver(path.basename(__dirname), {\r\ndebug: true,\r\n    capabilities: {\r\n        measure_power: {\r\n                command_class: 'COMMAND_CLASS_METER',\r\n                command_get: 'METER_GET',\r\n                command_get_parser: function () {\r\n                    return {\r\n                        Properties1: {\r\n                            'Rate Type': 'Import',\r\n                            'Scale': 2\r\n                        },\r\n                        'Scale 2': 0\r\n                    };\r\n                },\r\n                command_report: 'METER_REPORT',\r\n                command_report_parser: report => {\r\n                    if (report.hasOwnProperty('Properties2')\r\n                    && report.Properties2.hasOwnProperty('Scale bits 10')\r\n                    && report.Properties2['Scale bits 10'] === 2) {\r\n                        return report['Meter Value (Parsed)'];\r\n                    } return null;\r\n                },\r\n        },\r\n\t\tmeter_power.normal: {\r\n\t\t\tmultiChannelNodeId: 1,\r\n            command_class: 'COMMAND_CLASS_METER',\r\n            command_get: 'METER_GET',\r\n            command_get_parser: function () {\r\n                return {\r\n                    Properties1: {\r\n                        'Rate Type': 'Import',\r\n                        'Scale': 0\r\n                    },\r\n                'Scale 2': 0,\r\n                };\r\n            },\r\n            command_report: 'METER_REPORT',\r\n            command_report_parser: report => {\r\n                if (report.hasOwnProperty('Properties2')\r\n                && report.Properties2.hasOwnProperty('Scale bits 10')\r\n                && report.Properties2['Scale bits 10'] === 0) {\r\n                    return report['Meter Value (Parsed)'];\r\n                } return null;\r\n            },\r\n        },\r\n        meter_power.low: {\r\n\t\t\tmultiChannelNodeId: 2,\r\n            command_class: 'COMMAND_CLASS_METER',\r\n            command_get: 'METER_GET',\r\n            command_get_parser: function () {\r\n                return {\r\n                    Properties1: {\r\n                        'Rate Type': 'Import',\r\n                        'Scale': 0\r\n                    },\r\n                'Scale 2': 0,\r\n                };\r\n            },\r\n            command_report: 'METER_REPORT',\r\n            command_report_parser: report => {\r\n                if (report.hasOwnProperty('Properties2')\r\n                && report.Properties2.hasOwnProperty('Scale bits 10')\r\n                && report.Properties2['Scale bits 10'] === 0) {\r\n                    return report['Meter Value (Parsed)'];\r\n                } return null;\r\n            },\r\n        },\r\n\r\n        meter_gas: {\r\n            multiChannelNodeId: 3,\r\n            command_class: 'COMMAND_CLASS_METER',\r\n            command_get: 'METER_GET',\r\n            command_get_parser: function () {\r\n                return {\r\n                    Properties1: {\r\n                        'Rate Type': 'Import',\r\n                        'Scale': 0,\r\n                    },\r\n                'Scale 2': 0\r\n                };\r\n            },\r\n            command_report: 'METER_REPORT',\r\n            command_report_parser: report => {\r\n                if (report.hasOwnProperty('Properties2')\r\n                && report.Properties2.hasOwnProperty('Scale bits 10')\r\n                && report.Properties2['Scale bits 10'] === 0) {\r\n                    return report['Meter Value (Parsed)'];\r\n                } return null;\r\n            },\r\n        },\r\n    },\r\n\r\n    settings: {\r\n        \"baud_rate\": {\r\n            \"index\": 2,\r\n            \"size\": 2,\r\n        },\r\n    }\r\n});\r\n```\r\n\r\n**What was the result?**\r\n\r\nInvalid JSON in app.json [SyntaxError: Unexpected token }]\r\n"}}
{"actor":{"display_login":"ajterpstra"}}