]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Merge branch 'main' into main 181/head
authorBastien Wirtz <bastien.wirtz@gmail.com>
Mon, 13 Sep 2021 20:09:40 +0000 (13:09 -0700)
committerGitHub <noreply@github.com>
Mon, 13 Sep 2021 20:09:40 +0000 (13:09 -0700)
1  2 
docs/configuration.md
docs/customservices.md

diff --combined docs/configuration.md
index c88069eb30560bb7a6421196026ce1af937e803b,a472b416d7ed707946b8d615975d96aa64200355..a76ecb3b8fa28eacc89cd913f85856f2b3e11507
@@@ -7,7 -7,7 +7,7 @@@ Title, icons, links, colors, and servic
  # Homepage configuration
  # See https://fontawesome.com/icons for icons options
  
 -# Optional: Use external configuration file. 
 +# Optional: Use external configuration file.
  # Using this will ignore remaining config in this file
  # externalConfig: https://example.com/server-luci/config.yaml
  
@@@ -66,6 -66,17 +66,17 @@@ colors
  # Optional message
  message:
    # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
+   # mapping: # allows to map fields from the remote format to the one expected by Homer
+   #   title: 'id' # use value from field 'id' as title
+   #   content: 'value' # value from field 'value' as content
+   # refreshInterval: 10000 # Optional: time interval to refresh message
+   #
+   # Real example using chucknorris.io for showing Chuck Norris facts as messages:
+   # url: https://api.chucknorris.io/jokes/random
+   # mapping:
+   #   title: 'id'
+   #   content: 'value'
+   # refreshInterval: 10000
    style: "is-warning"
    title: "Optional message!"
    icon: "fa fa-exclamation-triangle"
@@@ -81,6 -92,11 +92,11 @@@ links
    - name: "link 2"
      icon: "fas fa-book"
      url: "https://github.com/bastienwirtz/homer"
+   # this will link to a second homer page that will load config from page2.yml and keep default config values as in config.yml file
+   # see url field and assets/page.yml used in this example:
+   - name: "Second Page"
+     icon: "fas fa-file-alt"
+     url: "#page2"
  
  # Services
  # First level array represents a group.
  services:
    - name: "Application"
      icon: "fas fa-code-branch"
+     # A path to an image can also be provided. Note that icon take precedence if both icon and logo are set.
+     # logo: "path/to/logo"
      items:
        - name: "Awesome app"
          logo: "assets/tools/sample.png"
          # background: red # optional color for card to set color directly without custom stylesheet
  ```
  
- If you choose to fetch message information from an endpoint, the output format should be:
++
 +View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them.
 +
+ If 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)):
  
  ```json
  {
diff --combined docs/customservices.md
index 40f2e3dbdd351b29825d9c5420d1cda369c67a65,5778fadfe661e83b6789f149fd5596bb1435d5cf..4f64eccb536d7f14e23e1e49eddfbd1e4b6dbfd9
@@@ -1,6 -1,8 +1,8 @@@
  # Custom Services
  
- Here is an overview of all custom services that are available within Homer.
+ Some service can use a specific a component that provides some extra features by adding a `type` key to the service yaml
+ configuration. Available services are in `src/components/`. Here is an overview of all custom services that are available 
+ within Homer.
  
  ## PiHole
  
@@@ -17,22 -19,35 +19,57 @@@ The following configuration is availabl
          type: "PiHole"
  ```
  
- If 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).
++
 +## OpenWeatherMap
 +
 +Using the OpenWeatherMap service you can display weather information about a given location.
 +
 +The following configuration is available for the OpenWeatherMap service
 +
 +```
 +items:
 +     - name: "Weather"
 +       location: "Amsterdam" # your location.
 +       locationId: "2759794" # OpenWeatherMap city ID.
 +       apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api.
 +       units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin.
 +       background: "square" # choose which type of background you want behind the image. Can be one of: square, cicle, none. Defaults to none.
 +       type: "OpenWeather"
 +```
 +
 +**Remarks:**
++If 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).
++
++
+ ## Medusa
+ This service displays News (grey), Warning (orange) or Error (red) notifications bubbles from the Medusa application.
+ Two lines are needed in the config.yml :
+ ```
+ type: "Medusa"
+ apikey: "01234deb70424befb1f4ef6a23456789"
+ ```
+ The url must be the root url of Medusa application.
+ The Medusa API key can be found in General configuration > Interface. It is needed to access Medusa API.
+ ## Sonarr/Radarr
+ This service displays Activity (blue), Warning (orange) or Error (red) notifications bubbles from the Radarr/Sonarr application.
+ Two lines are needed in the config.yml :
+ ```
+ type: "Radarr" or "Sonarr"
+ apikey: "01234deb70424befb1f4ef6a23456789"
+ ```
+ The url must be the root url of Radarr/Sonarr application.
+ The Radarr/Sonarr API key can be found in Settings > General. It is needed to access the API.
+ ## PaperlessNG
+ For Paperless you need an API-Key which you have to store at the item in the field `apikey`.
+ ## Ping
+ For Ping you need an API-Key which you have to store at the item in the field `apikey`.