Closed TimofeyK closed 4 years ago
Hi @TimofeyK,
I just published release v2.0.2
with the JSON schema.
I don't use Homebridge UI myself, so please let me know if it works :-)
This didn’t work - the UI does not show Settings button for the plugin
I can’t find the file config.schema.json in plugin’s folder
Huh my bad, I was excluding every file that is not part of the source in my package.json
file 😞
I unpublished release v2.0.2
and published a new v2.0.3
that does include the file.
OK, the file is there now and the UI can read it. I fixed the plugin ID and added two other parameters:
{
"pluginAlias": "DaikinAirbase",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Homebridge plugin for the Daikin Airbase WiFi module",
"footerDisplay": "",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Plugin Name",
"description": "Plugin name as displayed in the homebridge log.",
"type": "string",
"required": true,
"default": "Daikin Airbase"
},
"hostname": {
"title": "Host Name",
"description": "The hostname of the controller.",
"type": "string",
"required": false,
"default": ""
},
"pollingInterval": {
"title": "Polling Interval",
"description": "The polling interval for refreshing the platform's accessories state for automations, in minutes. By detault set to 5 minutes, it can be set to 0 to disable polling.",
"type": "integer",
"required": false,
"default": ""
}
}
}
}
I didn't put these two options in the UI on purpose because they're supposed to be for advanced users only. Maybe I should add them but hidden into an advanced settings panel?
Good idea. I didn’t thought about that
I just published version 2.0.4
of the plugin with the advanced settings section in the configuration schema.
Let me know how that works :-)
You need to remove dash in the PluginAlias
With the dash removed (as in my example above) so the platform name is matching the plugin:
Fixed in release 2.0.5
Oh, no! This was the last issue. What are we going to do now?! 😁
Haha, I know!
Oh well, probably time for me to do some refactoring on my homebridge somfy connexoon plugin, I learned a few things about homekit writting this one that I didn't know at the time!
Thanks a lot for your help working with me on this plugin @TimofeyK, hope many people will be able to enjoy our work :-)
Your plugin is truly plug and play but users still need adding platform block in the config.json
homebridge-config-ui-x plugin supports automatic generation of config blocks based on config schema
https://github.com/oznu/homebridge-config-ui-x/wiki/Developers%3A-Plugin-Settings-GUI