aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorRobin Schneider <45321827+robinschneider@users.noreply.github.com>2021-10-07 00:15:26 +0200
committerGitHub <noreply@github.com>2021-10-07 00:15:26 +0200
commit270e522e0ee2bb9bef795251796abbfc74efbef3 (patch)
treec8a22126b6393b48b6c3bd0365befd6fd695faaf /docs
parent584f2b4b32e69865d9561f1537142791710f676d (diff)
parent220c60cba04e86e782e9610aa8ef0d77e221072c (diff)
downloadhomer-270e522e0ee2bb9bef795251796abbfc74efbef3.tar.gz
homer-270e522e0ee2bb9bef795251796abbfc74efbef3.tar.zst
homer-270e522e0ee2bb9bef795251796abbfc74efbef3.zip
Merge branch 'bastienwirtz:main' into hotkey
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.md29
-rw-r--r--docs/customservices.md47
-rw-r--r--docs/development.md49
-rw-r--r--docs/tips-and-tricks.md18
-rw-r--r--docs/troubleshooting.md19
5 files changed, 143 insertions, 19 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index 93abadb..807fa68 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,4 +1,4 @@
1## Configuration 1# Configuration
2 2
3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in development mode), using [yaml](http://yaml.org/) format. 3Title, icons, links, colors, and services can be configured in the `config.yml` file (located in `/assets` directory once built, or in the `public/assets` directory in development mode), using [yaml](http://yaml.org/) format.
4 4
@@ -7,7 +7,7 @@ Title, icons, links, colors, and services can be configured in the `config.yml`
7# Homepage configuration 7# Homepage configuration
8# See https://fontawesome.com/icons for icons options 8# See https://fontawesome.com/icons for icons options
9 9
10# Optional: Use external configuration file. 10# Optional: Use external configuration file.
11# Using this will ignore remaining config in this file 11# Using this will ignore remaining config in this file
12# externalConfig: https://example.com/server-luci/config.yaml 12# externalConfig: https://example.com/server-luci/config.yaml
13 13
@@ -138,6 +138,8 @@ services:
138 # background: red # optional color for card to set color directly without custom stylesheet 138 # background: red # optional color for card to set color directly without custom stylesheet
139``` 139```
140 140
141View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them.
142
141If you choose to fetch message information from an endpoint, the output format should be as follows (or you can [custom map fields as shown in tips-and-tricks](./tips-and-tricks.md#mapping-fields)): 143If you choose to fetch message information from an endpoint, the output format should be as follows (or you can [custom map fields as shown in tips-and-tricks](./tips-and-tricks.md#mapping-fields)):
142 144
143```json 145```json
@@ -151,7 +153,7 @@ If you choose to fetch message information from an endpoint, the output format s
151`null` value or missing keys will be ignored and value from the `config.yml` will be used if available. 153`null` value or missing keys will be ignored and value from the `config.yml` will be used if available.
152Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar). 154Empty values (either in `config.yml` or the endpoint data) will hide the element (ex: set `"title": ""` to hide the title bar).
153 155
154### Style Options 156## Style Options
155 157
156Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](https://bulma.io/documentation/modifiers/syntax/). You'll notice in the config there is a `tagstyle` option. It can be set to any of the bulma modifiers. You'll probably want to use one of these 4 main colors: 158Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](https://bulma.io/documentation/modifiers/syntax/). You'll notice in the config there is a `tagstyle` option. It can be set to any of the bulma modifiers. You'll probably want to use one of these 4 main colors:
157 159
@@ -162,10 +164,29 @@ Homer uses [bulma CSS](https://bulma.io/), which provides a [modifiers syntax](h
162 164
163You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state. 165You can read the [bulma modifiers page](https://bulma.io/documentation/modifiers/syntax/) for other options regarding size, style, or state.
164 166
165### PWA Icons 167## PWA Icons
166 168
167In order to easily generate all required icon preset for the PWA to work, a tool like [vue-pwa-asset-generator](https://www.npmjs.com/package/vue-pwa-asset-generator) can be used: 169In order to easily generate all required icon preset for the PWA to work, a tool like [vue-pwa-asset-generator](https://www.npmjs.com/package/vue-pwa-asset-generator) can be used:
168 170
169```bash 171```bash
170npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder} 172npx vue-pwa-asset-generator -a {your_512x512_source_png} -o {your_output_folder}
171``` 173```
174
175## Supported services
176
177Currently the following services are supported for showing quick infos on the card. They can be used by setting the type to one of the following values at the item.
178
179- PiHole
180- AdGuardHome
181- PaperlessNG
182- Mealie
183
184## Additional configuration
185
186### Paperless
187
188For Paperless you need an API-Key which you have to store at the item in the field `apikey`.
189
190### Mealie
191
192First off make sure to remove an existing `subtitle` as it will take precedence if set. Setting `type: "Mealie"` will then show the number of recipes Mealie is keeping organized or the planned meal for today if one is planned. You will have to set an API key in the field `apikey` which can be created in your Mealie installation.
diff --git a/docs/customservices.md b/docs/customservices.md
index 43f45f4..f79428f 100644
--- a/docs/customservices.md
+++ b/docs/customservices.md
@@ -1,16 +1,18 @@
1# Custom Services 1# Custom Services
2 2
3Some service can use a specific a component that provides some extra features by adding a `type` key to the service yaml 3Some service can use a specific a component that provides some extra features by adding a `type` key to the service yaml
4configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available 4configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available
5within Homer. 5within Homer.
6 6
7If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page.
8
7## PiHole 9## PiHole
8 10
9Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard. 11Using the PiHole service you can display info about your local PiHole instance right on your Homer dashboard.
10 12
11The following configuration is available for the PiHole service. 13The following configuration is available for the PiHole service.
12 14
13``` 15```yaml
14 items: 16 items:
15 - name: "Pi-hole" 17 - name: "Pi-hole"
16 logo: "assets/tools/sample.png" 18 logo: "assets/tools/sample.png"
@@ -19,35 +21,64 @@ The following configuration is available for the PiHole service.
19 type: "PiHole" 21 type: "PiHole"
20``` 22```
21 23
24## OpenWeatherMap
25
26Using the OpenWeatherMap service you can display weather information about a given location.
27The following configuration is available for the OpenWeatherMap service:
28
29```yaml
30items:
31 - name: "Weather"
32 location: "Amsterdam" # your location.
33 locationId: "2759794" # Optional: Specify OpenWeatherMap city ID for better accuracy
34 apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
35 units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
36 background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none.
37 type: "OpenWeather"
38```
39
40**Remarks:**
41If for some reason your city can't be found by entering the name in the `location` property, you could also try to configure the OWM city ID in the `locationId` property. To retrieve your specific City ID, go to the [OWM website](https://openweathermap.org), search for your city and retrieve the ID from the URL (for example, the City ID of Amsterdam is 2759794).
42
22## Medusa 43## Medusa
23 44
24This service displays News (grey), Warning (orange) or Error (red) notifications bubbles from the Medusa application. 45This service displays News (grey), Warning (orange) or Error (red) notifications bubbles from the Medusa application.
25Two lines are needed in the config.yml : 46Two lines are needed in the config.yml :
26``` 47
48```yaml
27type: "Medusa" 49type: "Medusa"
28apikey: "01234deb70424befb1f4ef6a23456789" 50apikey: "01234deb70424befb1f4ef6a23456789"
29``` 51```
52
30The url must be the root url of Medusa application. 53The url must be the root url of Medusa application.
31The Medusa API key can be found in General configuration > Interface. It is needed to access Medusa API. 54The Medusa API key can be found in General configuration > Interface. It is needed to access Medusa API.
32 55
33
34## Sonarr/Radarr 56## Sonarr/Radarr
35 57
36This service displays Activity (blue), Warning (orange) or Error (red) notifications bubbles from the Radarr/Sonarr application. 58This service displays Activity (blue), Warning (orange) or Error (red) notifications bubbles from the Radarr/Sonarr application.
37Two lines are needed in the config.yml : 59Two lines are needed in the config.yml :
38``` 60
61```yaml
39type: "Radarr" or "Sonarr" 62type: "Radarr" or "Sonarr"
40apikey: "01234deb70424befb1f4ef6a23456789" 63apikey: "01234deb70424befb1f4ef6a23456789"
41``` 64```
65
42The url must be the root url of Radarr/Sonarr application. 66The url must be the root url of Radarr/Sonarr application.
43The Radarr/Sonarr API key can be found in Settings > General. It is needed to access the API. 67The Radarr/Sonarr API key can be found in Settings > General. It is needed to access the API.
44 68
45
46## PaperlessNG 69## PaperlessNG
47 70
48For Paperless you need an API-Key which you have to store at the item in the field `apikey`. 71For Paperless you need an API-Key which you have to store at the item in the field `apikey`.
49 72
50
51## Ping 73## Ping
52 74
53For Paperless you need an API-Key which you have to store at the item in the field `apikey`. 75For Ping you need to set the type to Ping and provide a url.
76
77```yaml
78items:
79 - name: "Awesome app"
80 type: Ping
81 logo: "assets/tools/sample.png"
82 subtitle: "Bookmark example" tag: "app"
83 url: "https://www.reddit.com/r/selfhosted/"
84```
diff --git a/docs/development.md b/docs/development.md
index f2e9020..a22ae0b 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -1,4 +1,6 @@
1## Development 1# Development
2
3If you want to contribute to Homer, please read the [contributing guidelines](https://github.com/bastienwirtz/homer/blob/main/CONTRIBUTING.md) first.
2 4
3```sh 5```sh
4# Using yarn (recommended) 6# Using yarn (recommended)
@@ -10,7 +12,50 @@ npm install
10npm run serve 12npm run serve
11``` 13```
12 14
13### Themes 15## Custom services
16
17Custom services are small VueJs component (see `src/components/services/`) that add little features to a classic, "static", dashboard item. It should be very simple.
18A dashboard can contain a lot of items, so performance is very important.
19
20The [`Generic`](https://github.com/bastienwirtz/homer/blob/main/src/components/services/Generic.vue) service provides a typical card layout which
21you can extend to add specific features. Unless you want a completely different design, extended the generic service is the recommended way. It gives you 3 [slots](https://vuejs.org/v2/guide/components-slots.html#Named-Slots) to extend: `icon`, `content` and `indicator`.
22Each one is **optional**, and will display the usual information if omitted.
23
24Each service must implement the `item` [property](https://vuejs.org/v2/guide/components-props.html) and bind it the Generic component if used.
25
26### Skeleton
27```Vue
28<template>
29 <Generic :item="item">
30 <template #icon>
31 <!-- left area containing the icon -->
32 </template>
33 <template #content>
34 <!-- main area containing the title, subtitle, ... -->
35 </template>
36 <template #indicator>
37 <!-- top right area, empty by default -->
38 </template>
39 </Generic>
40</template>
41
42<script>
43import Generic from "./Generic.vue";
44
45export default {
46 name: "MyNewService",
47 props: {
48 item: Object,
49 },
50 components: {
51 Generic,
52 }
53};
54</script>
55```
56
57
58## Themes
14 59
15Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)). 60Themes are meant to be simple customization (written in [scss](https://sass-lang.com/documentation/syntax)).
16To add a new theme, just add a file in the theme directory, and put all style in the `body #app.theme-<name>` scope. Then import it in the main style file. 61To add a new theme, just add a file in the theme directory, and put all style in the `body #app.theme-<name>` scope. Then import it in the main style file.
diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md
index 94167fb..17bba9a 100644
--- a/docs/tips-and-tricks.md
+++ b/docs/tips-and-tricks.md
@@ -3,6 +3,7 @@
3Here is a collection of neat tips and tricks that Homer users have come up with! 3Here is a collection of neat tips and tricks that Homer users have come up with!
4 4
5## Use Homer as a custom "new tab" page 5## Use Homer as a custom "new tab" page
6
6#### `by @vosdev` 7#### `by @vosdev`
7 8
8These extensions for [Firefox](https://addons.mozilla.org/firefox/addon/custom-new-tab-page) and [Chrome & Friends](https://chrome.google.com/webstore/detail/new-tab-changer/occbjkhimchkolibngmcefpjlbknggfh) allow you to have your homer dashboard in your new tab page, while leaving focus on the address bar meaning you can still type right away if you want to search or go to a page that is not on your homer dash. 9These extensions for [Firefox](https://addons.mozilla.org/firefox/addon/custom-new-tab-page) and [Chrome & Friends](https://chrome.google.com/webstore/detail/new-tab-changer/occbjkhimchkolibngmcefpjlbknggfh) allow you to have your homer dashboard in your new tab page, while leaving focus on the address bar meaning you can still type right away if you want to search or go to a page that is not on your homer dash.
@@ -22,11 +23,12 @@ The Firefox extension loads Homer in an iframe on your new tab page, meaning you
22``` 23```
23 24
24## YAML Anchors 25## YAML Anchors
26
25#### `by @JamiePhonic` 27#### `by @JamiePhonic`
26 28
27Since Homer is configured using YAML, it supports all of YAML's helpful features, such as anchoring! 29Since Homer is configured using YAML, it supports all of YAML's helpful features, such as anchoring!
28 30
29For example, you can define tags and tag styles for each "item" in a service. 31For example, you can define tags and tag styles for each "item" in a service.
30Using Anchoring, you can define all your tags and their styles once like this: (for example) 32Using Anchoring, you can define all your tags and their styles once like this: (for example)
31 33
32```yaml 34```yaml
@@ -70,6 +72,7 @@ The end result is that if you want to update the name or style of any particular
70Great if you have a lot of services or a lot of tags! 72Great if you have a lot of services or a lot of tags!
71 73
72## Remotely edit your config with Code Server 74## Remotely edit your config with Code Server
75
73#### `by @JamiePhonic` 76#### `by @JamiePhonic`
74 77
75Homer doesn't yet provide a way to edit your configuration from inside Homer itself, but that doesn't mean it can't be done! 78Homer doesn't yet provide a way to edit your configuration from inside Homer itself, but that doesn't mean it can't be done!
@@ -78,14 +81,17 @@ You can setup and use [Code-Server](https://github.com/cdr/code-server) to edit
78 81
79If you're running Homer in docker, you can setup a Code-Server container and pass your homer config directory into it. 82If you're running Homer in docker, you can setup a Code-Server container and pass your homer config directory into it.
80Simply pass your homer config directory as an extra -v parameter to your code-server container: 83Simply pass your homer config directory as an extra -v parameter to your code-server container:
81``` 84
85```sh
82-v '/your/local/homer/config-dir/':'/config/homer':'rw' 86-v '/your/local/homer/config-dir/':'/config/homer':'rw'
83``` 87```
88
84This will map your homer config directory (For example, /docker/appdata/homer/) into code-server's `/config/` directory, in a sub folder called `homer` 89This will map your homer config directory (For example, /docker/appdata/homer/) into code-server's `/config/` directory, in a sub folder called `homer`
85 90
86As a bonus, Code-Server puts the "current folder" as a parameter in the URL bar, so you could add a `links:` entry in Homer that points to your code-server instance with the directory pre-filled for essentially 1 click editing! 91As a bonus, Code-Server puts the "current folder" as a parameter in the URL bar, so you could add a `links:` entry in Homer that points to your code-server instance with the directory pre-filled for essentially 1 click editing!
87 92
88For example: 93For example:
94
89```yml 95```yml
90links: 96links:
91 - name: Edit config 97 - name: Edit config
@@ -93,9 +99,11 @@ links:
93 url: https://vscode.example.net/?folder=/config/homer 99 url: https://vscode.example.net/?folder=/config/homer
94 target: "_blank" # optional html tag target attribute 100 target: "_blank" # optional html tag target attribute
95``` 101```
102
96where the path after `?folder=` is the path to the folder where you mounted your homer config INSIDE the Code-Server container. 103where the path after `?folder=` is the path to the folder where you mounted your homer config INSIDE the Code-Server container.
97 104
98### Example Code-Server docker create command 105### Example Code-Server docker create command
106
99```sh 107```sh
100docker create \ 108docker create \
101 --name=code-server \ 109 --name=code-server \
@@ -111,13 +119,13 @@ docker create \
111 linuxserver/code-server 119 linuxserver/code-server
112``` 120```
113 121
114
115## Get the news headlines in Homer 122## Get the news headlines in Homer
116 123
117### Mapping Fields 124### Mapping Fields
125
118Most times, the url you're getting headlines from follows a different schema than the one expected by Homer. 126Most times, the url you're getting headlines from follows a different schema than the one expected by Homer.
119 127
120For example, if you would like to show jokes from ChuckNorris.io, you'll find that the url https://api.chucknorris.io/jokes/random is giving you info like this: 128For example, if you would like to show jokes from ChuckNorris.io, you'll find that the url <https://api.chucknorris.io/jokes/random> is giving you info like this:
121 129
122```json 130```json
123{ 131{
@@ -179,6 +187,6 @@ If the URL you specified returns a JSON object that defines a `title` and `conte
179 187
180So, using [Node-Red](https://nodered.org/docs/getting-started/) and a quick flow, you can process an RSS feed to replace the message with a news item! 188So, using [Node-Red](https://nodered.org/docs/getting-started/) and a quick flow, you can process an RSS feed to replace the message with a news item!
181 189
182To get started, simply import [this flow](https://flows.nodered.org/flow/4b6406c9a684c26ace0430dd1826e95d) into your Node-Red instance and change the RSS feed in the "Get News RSS Feed" node to one of your choosing! 190To get started, simply import [this flow](https://flows.nodered.org/flow/4b6406c9a684c26ace0430dd1826e95d) into your Node-Red instance and change the RSS feed in the "Get News RSS Feed" node to one of your choosing!
183 191
184So far, the flow has been tested with BBC News and Sky News, however it should be easy to modify the flow to work with other RSS feeds if they don't work out of the box! 192So far, the flow has been tested with BBC News and Sky News, however it should be easy to modify the flow to work with other RSS feeds if they don't work out of the box!
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
new file mode 100644
index 0000000..ed1f85d
--- /dev/null
+++ b/docs/troubleshooting.md
@@ -0,0 +1,19 @@
1# Troubleshooting
2
3## My custom service card doesn't work, nothing appears or offline status is displayed (pi-hole, sonarr, ping, ...)
4
5You might by facing a [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross Origin Request Sharing) issue.
6It happens when the targeted service is hosted on a different domain or port.
7Web browsers will not allow to fetch information from a different site without explicit permissions (the targeted service
8must include a special `Access-Control-Allow-Origin: *` HTTP headers).
9If this happens your web console (`ctrl+shit+i` or `F12`) will be filled with this kind of errors:
10
11```text
12Access to fetch at 'https://<target-service>' from origin 'https://<homer>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
13```
14
15To resolve this, you can either:
16
17* Host all your target service under the same domain & port.
18* Modify the target sever configuration so that the response of the server included following header- `Access-Control-Allow-Origin: *` (<https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests>). It might be an option in the targeted service, otherwise depending on how the service is hosted, the proxy or web server can seamlessly add it.
19* Use a cors proxy sever like [`cors-container`](https://github.com/imjacobclark/cors-container), [`cors-anywhere`](https://github.com/Rob--W/cors-anywhere) or many others.