This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-core/plugins/deviceplugins/philipshue/devicepluginphilipshue.json
Michael Zanetti 45caf66851 initial work on interfaces
have some interfaces defined and in use by DeviceManager and the API.
this can be used to build first prototypes in apps using the interfaces
stuff. Currently the lights interfaces are mostly defined and fully
implemented by the Hue plugin.

TODO: more interfaces to be defined, make more plugins follow
interfaces.
TODO: tests for the interface code
TODO: docs for the interface code
2019-04-02 01:02:45 +02:00

646 lines
28 KiB
JSON

{
"name": "Philips Hue",
"idName": "PhilipsHue",
"id": "5f2e634b-b7f3-48ee-976a-b5ae22aa5c55",
"vendors": [
{
"id": "0ae1e001-2aa6-47ed-b8c0-334c3728a68f",
"name": "Philips",
"idName": "philips",
"deviceClasses": [
{
"id": "642aa4c7-19aa-45ed-ba06-aa1ae6c9edf7",
"idName": "hueBridge",
"name": "Hue gateway",
"deviceIcon": "Gateway",
"basicTags": [
"Device",
"Gateway",
"Lighting"
],
"createMethods": ["discovery"],
"criticalStateTypeId": "15794d26-fde8-4a61-8f83-d7830534975f",
"setupMethod": "pushButton",
"pairingInfo": "Please press the button on the Hue Bridge within 30 seconds before you continue",
"paramTypes": [
{
"id": "275b76f2-0174-4f26-b3ec-5f108baf8bdd",
"idName": "bridgeName",
"name": "name",
"type" : "QString",
"index": 0,
"inputType": "TextLine"
},
{
"id": "8bf5776a-d5a6-4600-8b27-481f0d803a8f",
"idName": "bridgeApi",
"name": "api key",
"type" : "QString",
"index": 1,
"inputType": "TextLine",
"readOnly": true
},
{
"id": "1845975b-1184-4440-bc0d-73d53a9f683c",
"idName": "bridgeHost",
"name": "host address",
"type" : "QString",
"index": 2,
"inputType": "IPv4Address",
"readOnly": true
},
{
"id": "2c67203d-a308-45ec-9a08-fc4183c06ff8",
"idName": "bridgeMac",
"name": "mac address",
"type" : "QString",
"index": 3,
"inputType": "MacAddress",
"readOnly": true
},
{
"id": "a496feb0-3b7b-46cb-a63a-e063447d6b1d",
"idName": "bridgeId",
"name": "id",
"type" : "QString",
"index": 4,
"readOnly": true
},
{
"id": "ea228c4d-975c-4b43-9445-7c9a907c29d6",
"idName": "bridgeSoftware",
"name": "software version",
"type" : "QString",
"index": 5,
"readOnly": true
},
{
"id": "53170394-956c-4511-b3a8-2c8a502ef1ed",
"idName": "bridgeZigbeeChannel",
"name": "zigbee channel",
"type" : "int",
"index": 6,
"readOnly": true
}
],
"stateTypes": [
{
"id": "15794d26-fde8-4a61-8f83-d7830534975f",
"idName": "bridgeReachable",
"name": "reachable",
"eventTypeName": "reachable changed",
"index": 0,
"defaultValue": false,
"type": "bool"
},
{
"id": "7a230e89-c4ce-4276-90e0-6a9ddb890603",
"idName": "apiVersion",
"name": "api version",
"eventTypeName": "api version changed",
"index": 1,
"ruleRelevant": false,
"eventRuleRelevant": false,
"defaultValue": "-",
"type": "QString"
},
{
"id": "4c707b18-6604-4e6d-b6bc-4e27769c2adc",
"idName": "softwareVersion",
"name": "software version",
"eventTypeName": "software version changed",
"ruleRelevant": false,
"eventRuleRelevant": false,
"index": 2,
"defaultValue": "-",
"type": "QString"
},
{
"id": "16a126f3-0cef-4931-bb2b-9e1b49bec7fc",
"idName": "updateStatus",
"name": "update status",
"eventTypeName": "update status changed",
"index": 3,
"ruleRelevant": false,
"type": "QString",
"defaultValue": "Up to date",
"possibleValues": [
"Up to date",
"Downloading updates",
"Updates ready to install",
"Installing updates"
]
}
],
"actionTypes": [
{
"id": "cca3f171-6318-44e7-a2ac-d841857c1c24",
"idName": "searchNewDevices",
"index": 0,
"name": "search devices"
},
{
"id": "07a85e91-d064-4bce-b017-13fd0c320c0b",
"idName": "checkForUpdates",
"index": 1,
"name": "check updates"
},
{
"id": "6dfbc7c0-7372-42f6-82ba-e777cb32dc4c",
"idName": "upgrade",
"index": 2,
"name": "Upgrade bridge"
}
]
},
{
"id": "0edba26c-96ab-44fb-a6a2-c0574d19630e",
"idName": "hueLight",
"name": "Hue Light",
"deviceIcon": "LightBulb",
"interfaces": ["colorlight"],
"basicTags": [
"Device",
"Lighting",
"Actuator"
],
"criticalStateTypeId": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"primaryActionTypeId": "90aaffe5-6a76-47d2-a14a-550f60390245",
"createMethods": ["auto"],
"paramTypes": [
{
"id": "0d71522c-08c0-4a66-bb5e-e31eb2dd41e5",
"idName": "name",
"name": "name",
"type" : "QString",
"index": 0,
"inputType": "TextLine"
},
{
"id": "33b01ab8-3811-4a06-ab3c-0a0ef2faa3ef",
"idName": "bridge",
"name": "bridge",
"type" : "QString",
"index": 1,
"readOnly": true
},
{
"id": "095a463b-f59e-46b1-989a-a71f9cbe3e30",
"idName": "modelId",
"name": "model id",
"type" : "QString",
"index": 2,
"readOnly": true
},
{
"id": "3f3467ef-4483-4eb9-bcae-84e628322f84",
"idName": "type",
"name": "type",
"type" : "QString",
"index": 3,
"readOnly": true
},
{
"id": "1a5129ca-006c-446c-9f2e-79b065de715f",
"idName": "uuid",
"name": "uuid",
"type" : "QString",
"index": 4,
"readOnly": true
},
{
"id": "99458d90-d171-4600-ba08-4818a4aaed68",
"idName": "apiKey",
"name": "api key",
"type" : "QString",
"inputType": "TextLine",
"index": 5,
"readOnly": true
},
{
"id": "56d14f2f-1b20-4004-a333-87ac09fa54d2",
"idName": "host",
"name": "host address",
"type" : "QString",
"inputType": "IPv4Address",
"index": 6,
"readOnly": true
},
{
"id": "491dc012-ccf2-4d3a-9f18-add98f7374af",
"idName": "lightId",
"name": "light id",
"type" : "int",
"index": 7,
"readOnly": true
}
],
"stateTypes": [
{
"id": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"idName": "hueReachable",
"name": "reachable",
"eventTypeName": "reachable changed",
"index": 0,
"defaultValue": false,
"type": "bool"
},
{
"id": "90aaffe5-6a76-47d2-a14a-550f60390245",
"idName": "huePower",
"name": "power",
"eventTypeName": "power changed",
"actionTypeName": "Set power",
"index": 1,
"type": "bool",
"defaultValue": false,
"writable": true
},
{
"id": "c0f4206f-f219-4f06-93c4-4ca515a56f79",
"idName": "hueTemperature",
"name": "color temperature",
"eventTypeName": "color temperature changed",
"actionTypeName": "Set color temperature",
"type": "int",
"index": 2,
"unit": "Mired",
"defaultValue": 170,
"ruleRelevant": false,
"eventRuleRelevant": false,
"minValue": 153,
"maxValue": 500,
"writable": true
},
{
"id": "d25423e7-b924-4b20-80b6-77eecc65d089",
"idName": "hueColor",
"name": "color",
"eventTypeName": "color changed",
"actionTypeName": "Set color",
"index": 3,
"type": "QColor",
"ruleRelevant": false,
"eventRuleRelevant": false,
"defaultValue": "#000000",
"writable": true
},
{
"id": "90e91f64-a208-468c-a5a2-7f47e08859e2",
"idName": "hueBrightness",
"name": "brightness",
"eventTypeName": "brightness changed",
"actionTypeName": "Set brigtness",
"type": "int",
"index": 4,
"ruleRelevant": false,
"eventRuleRelevant": false,
"unit": "Percentage",
"defaultValue": 0,
"minValue": 0,
"maxValue": 100,
"writable": true
},
{
"id": "0b7cdd8d-4db8-4183-abe2-f3c01d1c9afc",
"idName": "hueEffect",
"name": "effect",
"eventTypeName": "effect changed",
"actionTypeName": "Set effect",
"index": 5,
"ruleRelevant": false,
"eventRuleRelevant": false,
"type": "QString",
"defaultValue": "none",
"possibleValues": [
"none",
"color loop"
],
"writable": true
}
],
"actionTypes": [
{
"id": "d25dcfbc-d28c-4905-80e3-300ffb1248f5",
"idName": "hueAlert",
"name": "flash",
"index": 0,
"paramTypes": [
{
"id": "8ace6f8c-b2c7-4d0d-a407-52a54ad0ab05",
"idName": "alert",
"name": "alert",
"type": "QString",
"index": 0,
"allowedValues": [
"flash",
"flash 15 [s]"
]
}
]
}
]
},
{
"id": "4fa568ef-7a3a-422b-b0c0-206d37cb4eed",
"idName": "hueWhiteLight",
"name": "Hue White Light",
"deviceIcon": "LightBulb",
"basicTags": [
"Device",
"Actuator",
"Lighting"
],
"criticalStateTypeId": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"primaryActionTypeId": "90aaffe5-6a76-47d2-a14a-550f60390245",
"createMethods": ["auto"],
"paramTypes": [
{
"id": "0d71522c-08c0-4a66-bb5e-e31eb2dd41e5",
"idName": "name",
"name": "name",
"type" : "QString",
"index": 0,
"inputType": "TextLine"
},
{
"id": "33b01ab8-3811-4a06-ab3c-0a0ef2faa3ef",
"idName": "bridge",
"name": "bridge",
"type" : "QString",
"index": 1,
"readOnly": true
},
{
"id": "095a463b-f59e-46b1-989a-a71f9cbe3e30",
"idName": "modelId",
"name": "model id",
"type" : "QString",
"index": 2,
"readOnly": true
},
{
"id": "3f3467ef-4483-4eb9-bcae-84e628322f84",
"idName": "type",
"name": "type",
"type" : "QString",
"index": 3,
"readOnly": true
},
{
"id": "1a5129ca-006c-446c-9f2e-79b065de715f",
"idName": "uuid",
"name": "uuid",
"type" : "QString",
"index": 4,
"readOnly": true
},
{
"id": "99458d90-d171-4600-ba08-4818a4aaed68",
"idName": "apiKey",
"name": "api key",
"type" : "QString",
"inputType": "TextLine",
"index": 5,
"readOnly": true
},
{
"id": "56d14f2f-1b20-4004-a333-87ac09fa54d2",
"idName": "host",
"name": "host address",
"type" : "QString",
"inputType": "IPv4Address",
"index": 6,
"readOnly": true
},
{
"id": "491dc012-ccf2-4d3a-9f18-add98f7374af",
"idName": "lightId",
"name": "light id",
"type" : "int",
"index": 7,
"readOnly": true
}
],
"stateTypes": [
{
"id": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"idName": "hueReachable",
"name": "reachable",
"eventTypeName": "reachable changed",
"index": 0,
"defaultValue": false,
"type": "bool"
},
{
"id": "90aaffe5-6a76-47d2-a14a-550f60390245",
"idName": "huePower",
"name": "power",
"eventTypeName": "power changed",
"actionTypeName": "Set power",
"index": 1,
"type": "bool",
"defaultValue": false,
"writable": true
},
{
"id": "90e91f64-a208-468c-a5a2-7f47e08859e2",
"idName": "hueBrightness",
"name": "brightness",
"eventTypeName": "brightness changed",
"actionTypeName": "Set brightness",
"index": 2,
"type": "int",
"ruleRelevant": false,
"eventRuleRelevant": false,
"unit": "Percentage",
"defaultValue": 0,
"minValue": 0,
"maxValue": 100,
"writable": true
}
],
"actionTypes": [
{
"id": "d25dcfbc-d28c-4905-80e3-300ffb1248f5",
"idName": "hueAlert",
"name": "flash",
"index": 0,
"paramTypes": [
{
"id": "8ace6f8c-b2c7-4d0d-a407-52a54ad0ab05",
"idName": "alert",
"name": "alert",
"type": "QString",
"index": 0,
"allowedValues": [
"flash",
"flash 15 [s]"
]
}
]
}
]
},
{
"id": "bb482d39-67ef-46dc-88e9-7b181d642b28",
"idName": "hueRemote",
"name": "Hue Remote",
"deviceIcon": "Switch",
"basicTags": [
"Device",
"Sensor"
],
"criticalStateTypeId": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"createMethods": ["auto"],
"paramTypes": [
{
"id": "0d71522c-08c0-4a66-bb5e-e31eb2dd41e5",
"idName": "name",
"name": "name",
"type" : "QString",
"index": 0,
"inputType": "TextLine"
},
{
"id": "33b01ab8-3811-4a06-ab3c-0a0ef2faa3ef",
"idName": "bridge",
"name": "bridge",
"type" : "QString",
"index": 1,
"readOnly": true
},
{
"id": "095a463b-f59e-46b1-989a-a71f9cbe3e30",
"idName": "modelId",
"name": "model id",
"type" : "QString",
"index": 2,
"readOnly": true
},
{
"id": "3f3467ef-4483-4eb9-bcae-84e628322f84",
"idName": "type",
"name": "type",
"type" : "QString",
"index": 3,
"readOnly": true
},
{
"id": "1a5129ca-006c-446c-9f2e-79b065de715f",
"idName": "uuid",
"name": "uuid",
"type" : "QString",
"index": 4,
"readOnly": true
},
{
"id": "99458d90-d171-4600-ba08-4818a4aaed68",
"idName": "apiKey",
"name": "api key",
"type" : "QString",
"inputType": "TextLine",
"index": 5,
"readOnly": true
},
{
"id": "56d14f2f-1b20-4004-a333-87ac09fa54d2",
"idName": "host",
"name": "host address",
"type" : "QString",
"inputType": "IPv4Address",
"index": 6,
"readOnly": true
},
{
"id": "2ddb571b-149f-4f08-a76a-78b7d3aa27e0",
"idName": "sensorId",
"name": "sensor id",
"type" : "int",
"index": 7,
"readOnly": true
}
],
"stateTypes": [
{
"id": "19bb8d10-1b28-4ba3-99b7-a634138dcfde",
"idName": "hueReachable",
"name": "reachable",
"eventTypeName": "reachable changed",
"index": 0,
"defaultValue": false,
"type": "bool"
},
{
"id": "683e493a-9796-4d5e-b0e3-61cb178d5819",
"idName": "battery",
"name": "battery",
"eventTypeName": "battery changed",
"actionTypeName": "Set battery",
"type": "int",
"index": 1,
"unit": "Percentage",
"defaultValue": 0,
"minValue": 0,
"maxValue": 100
}
],
"eventTypes": [
{
"id": "de769db0-4c31-46cf-9760-dbc6f9209c26",
"idName": "onPressed",
"index": 0,
"name": "on pressed"
},
{
"id": "6c5e596b-7c15-40bb-af9d-c778a6b0f30e",
"idName": "onLongPressed",
"index": 1,
"name": "on long pressed"
},
{
"id": "8e3d6a62-6a19-4e9a-a25b-e1da2e56ede9",
"idName": "dimUpPressed",
"index": 2,
"name": "dim up pressed"
},
{
"id": "53d3c9af-3e25-4116-b22b-38d897bc20aa",
"idName": "dimUpLongPressed",
"index": 3,
"name": "dim up long pressed"
},
{
"id": "efd8b972-9a37-43f2-b9bc-f9dfe144a96d",
"idName": "dimDownPressed",
"index": 4,
"name": "dim down pressed"
},
{
"id": "1986d4c6-4c9f-4e43-ba70-0ff06c6f177b",
"idName": "dimDownLongPressed",
"index": 5,
"name": "dim down long pressed"
},
{
"id": "7c2a58f1-137c-4bf3-8f9e-453dff020487",
"idName": "offPressed",
"index": 6,
"name": "off pressed"
},
{
"id": "d69306eb-ea52-4841-9e26-89c69e9cf6fc",
"idName": "offLongPressed",
"index": 7,
"name": "off long pressed"
}
]
}
]
}
]
}