Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.6.0 #89

Merged
merged 31 commits into from
May 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
970fcb8
intial work on schema based config ui
oznu Apr 17, 2018
8aa6843
3.6.0-1
oznu Apr 17, 2018
5dfa096
fix aot build
oznu Apr 17, 2018
658fa47
remove CUSTOM_ELEMENTS_SCHEMA now that json forms are building correctly
oznu Apr 17, 2018
747d03b
added support for custom content on plugin settings page
oznu Apr 18, 2018
a32cc02
updade change log
oznu Apr 18, 2018
7c1a31d
improve plugin settings page load time
oznu Apr 19, 2018
c10473f
refresh page if client and server version differ
oznu Apr 19, 2018
65b2bd8
prevent refresh loop on update, link to settings for docker users
oznu Apr 19, 2018
7e1a190
Merge changes from master
oznu Apr 19, 2018
fc6a92c
Merge changes from master
oznu Apr 19, 2018
202b224
added https server option
oznu Apr 19, 2018
e2aea92
more reliable way of saving plugin config
oznu Apr 20, 2018
10075ad
added csp headers
oznu Apr 20, 2018
fa4b191
updated log config
oznu Apr 20, 2018
189e6cd
updated npm deps
oznu Apr 20, 2018
90b05ae
merge in updated to master
oznu Apr 21, 2018
a1c0690
don't change log config key
oznu Apr 21, 2018
0dc961d
typo in change log
oznu Apr 21, 2018
acad39e
fix error in readme
oznu Apr 21, 2018
4284fa9
add remaining config options to schema
oznu Apr 25, 2018
1a12845
added let's encrypt support
oznu Apr 26, 2018
fcff0c8
swaped to use greenlock directly, log output via plugin log handlers
oznu Apr 26, 2018
c2dc424
docker user config can be stored in config.json
oznu Apr 26, 2018
7e21e3f
adjust schema defaults
oznu Apr 26, 2018
19ab59a
change standalone detection rules
oznu Apr 26, 2018
df4c49c
dropped le, fixed standalone, add support for @homebridge
oznu May 8, 2018
7275287
resolves #88 - add apple web app support
oznu May 8, 2018
218dbc3
updated server deps
oznu May 8, 2018
c51e55a
backup restore / cleanup - resolve #77
oznu May 8, 2018
bcfa9de
3.6.0
oznu May 8, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## 3.6.0

### Notable Changes

* **Beta Feature**: Initial implementation of GUI/form based setup for supported plugins
* Added support for optional native HTTPS / SSL ([#68](https://github.com/oznu/homebridge-config-ui-x/issues/68), [#35](https://github.com/oznu/homebridge-config-ui-x/issues/35))
* The Log Viewer config options have changed, existing options have been have depreciated, see [README](https://github.com/oznu/homebridge-config-ui-x#log-viewer-configuration) for details
* Docker users may now configure this plugin using the `config.json` or the new plugin GUI/form config method
* Added metadata tag allow using plugin as a full screen web app on iOS ([#88](https://github.com/oznu/homebridge-config-ui-x/issues/88))
* Added ability to restore and cleanup `config.json` backups ([#77](https://github.com/oznu/homebridge-config-ui-x/issues/77))

### Other Changes

* Added [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers
* Links to external sites now have `rel="noopener noreferrer"`
* Links in plugin-author generated markdown (eg. change logs, plugin config) are now opened in a new tab
* When on the status page, the browser will refresh automatically if the client version does not match the server version
* Updated npm dependencies

### Bug Fixes

* Fixed bug that caused homebridge to crash when using Log Viewer on Windows 10

## 3.5.5 (2018-04-21)

### Bug Fixes
Expand Down
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Add this to your homebridge `config.json` file
* `temp` - The path to the file that can display your current CPU temperature. eg. `/sys/class/thermal/thermal_zone0/temp`
* `theme` - The colour scheme to use. Possible values: `red`, `pink`, `purple`, `indigo`, `blue`, `blue-grey`, `green`, `orange`. Defaults to `red`.
* `loginWallpaper` - The full path to background image you want to use for the form login page.
* `ssl` - [See below for details](#enabling-ssl)

## Accessory Control

Expand Down Expand Up @@ -71,7 +72,10 @@ Example loading logs from a file, change `/var/log/homebridge.log` to the actual
"platform": "config",
"name": "Config",
"port": 8080,
"log": "/var/log/homebridge.log"
"log": {
"method": "file",
"path": "/var/log/homebridge.log"
}
}
]
```
Expand All @@ -80,7 +84,7 @@ Example loading logs from a file, change `/var/log/homebridge.log` to the actual

### Logs From Systemd

If you are using `systemd` to manage the Homebridge process then you can just set `log` to `systemd`:
If you're using `systemd` to manage the Homebridge process then you can just set the `method` to `systemd`:

```json
"platforms": [
Expand All @@ -89,12 +93,15 @@ If you are using `systemd` to manage the Homebridge process then you can just se
"name": "Config",
"port": 8080,
"restart": "sudo -n systemctl restart homebridge",
"log": "systemd"
"log": {
"method": "systemd",
"service": "homebridge"
}
}
]
```

*This will only work if your `systemd` service has the name `homebridge`. You may need to enable the [sudo option](#sudo-mode) to avoid permission errors if you are not running Homebridge as root.*
*You may need to enable the [sudo option](#sudo-mode) to avoid permission errors if you are not running Homebridge as root.*

### Logs From Custom Command

Expand All @@ -107,7 +114,8 @@ The `log` option can alternatively specify a command to spawn that will stream t
"name": "Config",
"port": 8080,
"log": {
"tail": "sudo -n tail -n 100 -f /var/log/homebridge.log"
"method": "custom",
"command": "sudo -n tail -n 100 -f /var/log/homebridge.log"
}
}
]
Expand Down Expand Up @@ -140,6 +148,40 @@ homebridge ALL=(ALL) NOPASSWD: ALL

*Replace `homebridge` with the actual user you are running Homebridge as.*

## Enabling SSL

You can run this plugin over an encrypted HTTPS connection by configuring the `ssl` options.

```json
"platforms": [
{
"platform": "config",
"name": "Config",
"port": 8080,
"ssl": {
"key": "/path/to/privkey.pem",
"cert": "/path/to/fullchain.pem"
}
}
]
```

Or if using a **PKCS#12** certificate you can setup SSL like this:

```json
"platforms": [
{
"platform": "config",
"name": "Config",
"port": 8080,
"ssl": {
"pfx": "/path/to/cert.pfx",
"passphrase": "sample"
}
}
]
```

# Usage

### Status Screen
Expand Down
230 changes: 230 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
{
"pluginAlias": "config",
"pluginType": "platform",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "Config",
"minLength": 1,
"required": true
},
"port": {
"title": "Port",
"type": "integer",
"default": 8080,
"maximum": 65535,
"required": true
},
"auth": {
"title": "Auth Mode",
"type": "string",
"default": "form",
"oneOf": [
{ "title": "Form", "enum": ["form"] },
{ "title": "Basic Auth", "enum": ["basic"] },
{ "title": "None", "enum": ["none"] }
],
"required": true
},
"theme": {
"title": "UI Theme",
"type": [
"string"
],
"default": "red",
"oneOf": [
{ "title": "Red", "enum": ["red"] },
{ "title": "Pink", "enum": ["pink"] },
{ "title": "Purple", "enum": ["purple"] },
{ "title": "Indigo", "enum": ["indigo"] },
{ "title": "Blue", "enum": ["blue"] },
{ "title": "Blue-grey", "enum": ["blue-grey"] },
{ "title": "Green", "enum": ["green"] },
{ "title": "Orange", "enum": ["orange"] }
],
"required": true
},
"restart": {
"title": "Restart Command",
"type": "string"
},
"temp": {
"title": "Path to OS Temp File",
"type": "string"
},
"loginWallpaper": {
"title": "Path to Login Wallpaper Image File",
"type": "string"
},
"sudo": {
"title": "Use Sudo",
"type": "boolean"
},
"disableNsp": {
"title": "Disable vulnerability scans when installing and upgrading plugins",
"type": "boolean"
},
"noFork": {
"title": "Do not run the Config UI web server in a seperate process/thread",
"type": "boolean"
},
"log": {
"type": "object",
"properties": {
"method": {
"title": "Log Method",
"type": "string",
"oneOf": [
{ "title": "From File", "enum": ["file"] },
{ "title": "Systemd", "enum": ["systemd"] },
{ "title": "Custom Command", "enum": ["custom"] }
]
},
"path": {
"title": "Log File Path",
"type": "string"
},
"service": {
"title": "Systemd Service",
"type": "string"
},
"command": {
"title": "Custom Command",
"type": "string"
},
"tail": {
"type": "string",
"description": "Depreciated"
},
"systemd": {
"type": "string",
"description": "Depreciated"
}
}
},
"ssl": {
"title": "SSL Setup",
"type": "object",
"properties": {
"key": {
"title": "Path To Private Key",
"type": "string"
},
"cert": {
"title": "Path To Certificate",
"type": "string"
},
"pfx": {
"title": "Path To PKCS#12 Certificate",
"type": "string"
},
"passphrase": {
"title": "PKCS#12 Certificate Passphrase",
"type": "string"
}
}
},
"linux": {
"title": "Linux Server Commands",
"type": "object",
"properties": {
"shutdown": {
"title": "Shutdown Command",
"type": "string"
},
"restart": {
"title": "Restart Command",
"type": "string"
}
}
},
"homebridgeNpmPkg": {
"title": "Custom NPM package for Homebridge updates",
"type": "string"
},
"fork": {
"title": "Custom fork in <github username>/<repo> format for Homebridge updates",
"type": "string"
}
}
},
"form": [
"name",
"port",
"auth",
"theme",
"sudo",
{
"type": "fieldset",
"expandable": true,
"title": "Log Viewer Setup",
"items": [
"log.method",
{
"key": "log.path",
"description": "Enter the full file path to your log file.",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='file')"
}
},
{
"key": "log.service",
"description": "Enter the systemd service name. Defaults to 'homebridge'.",
"placeholder": "homebridge",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='systemd')"
}
},
{
"key": "log.command",
"description": "This command should stream the logs to stdout.",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='custom')"
}
}
]
},
{
"type": "fieldset",
"expandable": true,
"title": "Advanced",
"items": [
{
"key": "restart",
"description": "If no restart command is set the process will terminate with a non-zero exit code."
},
{
"key": "loginWallpaper",
"description": "Leave blank to use default wallpaper."
},
{
"key": "temp",
"placeholder": "eg. /sys/class/thermal/thermal_zone0/temp"
},
"disableNsp",
"noFork"
]
},
{
"type": "fieldset",
"expandable": true,
"title": "SSL Setup",
"items": [
{
"type": "help",
"helpvalue": "<em class='primary-text'>Leave these fields blank to disable SSL.</em><br><em class='text-danger'>After enabling SSL you will only be able to access the Config UI using https://</div>"
},
"ssl.key",
"ssl.cert",
"ssl.pfx",
"ssl.passphrase"
]
}
]
}
Loading