Fix typos in documentation (#948)

This commit is contained in:
Murat Seker 2020-08-08 12:58:44 +02:00 committed by GitHub
parent f3f07e0c82
commit 1df0e9ce17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 79 additions and 79 deletions

View File

@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Fixed
- webui: Works now with https port 443 (#923 with #924)
- webui: Works now with HTTPS port 443 (#923 with #924)
### Removed
## [2.0.0-alpha.7](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.0-alpha.7) - 2020-07-23
@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* discover, getProperties, identify, store/restore state and power-on/off available for Philips-Hue, Nanoleaf, Yeelight, partially for Rs232 / USB (Hid)
* New device capabilities are accessible via JSON-API
* New REST-API wrapper class in support of network devices, e.g. Philips Hue, Nanoleaf and WLED
* Flexible ssdp-Discovery incl. RegEx matching and filtering
* Flexible SSDP-Discovery incl. RegEx matching and filtering
- Documentation (#875)
* Process workflow for LED-Devices
* Documentation of device classes & methods
@ -85,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Make logs look a bit more cleaner
- Decrease compile time (#886)
- Fix some data synchronization error (#890)
- Fix Qt screenhot crash (#889)
- Fix Qt screenshot crash (#889)
- Fix crash on startup if no X server available (#892)
- Fix RPC restart of Hyperion (#894)

View File

@ -4,7 +4,7 @@ Overview of the API. Get access to these functions by importing the `hapi` modul
| Function | Returns | Comment |
| ------------------------- | ------- | --------------------------------------------------------------------------------------------------- |
| hapi.abort() | bool | Check if we should abort the script, True on abort request else false |
| hapi.log() | - | Print a log message to the Hyprion log. See [hapi.log()](#hapi-log) |
| hapi.log() | - | Print a log message to the Hyperion log. See [hapi.log()](#hapi-log) |
| hapi.registerCallback() | - | Register a function with a callback function. See [hapi.registerCallback()](#hapi-registercallback) |
| hapi.unregisterCallback() | - | Unregister a function from callback. See [hapi.unregisterCallback()](#hapi-unregistercallback) |
| hapi.getComponentState() | int | Get current state of a component. See [hapi.getComponentState()](#hapi-getcomponentstate ) |
@ -70,7 +70,7 @@ hapi.registerCallback(ON_VISIBLE_PRIORITY_CHANGED, onVsibilePriorityChanged)
```
### hapi.unregisterCallback()
You can als unregister a callbackType again. You can register and unregister as often you need it. Usually you won't need it, but for completion here it is! After unregister the connected function does no longer react upon callbacks
You can also unregister a callbackType again. You can register and unregister as often you need it. Usually you won't need it, but for completion here it is! After unregister the connected function does no longer react upon callbacks
`hapi.unregisterCallback(callbackType)`
| Argument | Type | Comment |
| ------------ | ---- | ------------------------------------------------------------------------------------ |
@ -95,7 +95,7 @@ Set a Hyperion component to a new state. This method writes a debug message on e
| @return | bool | True if the requested component was found else false |
### hapi.getSettings()
Get the current user settings data for your addon. The returned data contains all settings that has been transformed from json to python data types. See the table below how they are transformed.
Get the current user settings data for your addon. The returned data contains all settings that has been transformed from JSON to python data types. See the table below how they are transformed.
`hapi.getSettings()`
| Json | Python |
| :-----: | :----: |
@ -107,7 +107,7 @@ Get the current user settings data for your addon. The returned data contains al
| object | dict |
**Basics** \
The root data type is usually of type object which will be transformed to a python dict, so we use the dict syntax to get the value. The fallback paramter should be defined wisely, if the value is not found it will be used instead.
The root data type is usually of type object which will be transformed to a python dict, so we use the dict syntax to get the value. The fallback parameter should be defined wisely, if the value is not found it will be used instead.
``` python
import hapi
# Get a bool value of a dict

View File

@ -6,11 +6,11 @@ You want to write an addon? You have no clue about everything? Perfect, the next
## Addon types
Currently there are 2 types of Addons.
* Service
* Modul
* Module
A service addon runs usually the whole time (if enabled), it starts and stops with the execution of Hyperion. Additional it has settings that can be configured from the user to fit their needs. This can be an IP address to another service, a time to trigger, or anything else that you will discover from the Addon API
A modul provides utility methods which can be imported from a service addon to be used. Examples are Python packages from the PyPi repository like httplib2, which makes the developer life easier when working with http requests. Instead implementing everything on your own you can rely on the work of others with well tested modules from the Python community. You can also create modules on your own if you think the code can be reused in other service addons.
A module provides utility methods which can be imported from a service addon to be used. Examples are Python packages from the PyPi repository like httplib2, which makes the developer life easier when working with HTTP requests. Instead implementing everything on your own you can rely on the work of others with well tested modules from the Python community. You can also create modules on your own if you think the code can be reused in other service addons.
## Development setup
All you need is:
@ -23,13 +23,13 @@ The follow files are part of an addon.
| ------------------- | -------------------------------------- | --------------------------------------------------------------------------- |
| service.py | [Python](https://www.python.org/) | Required for `service` addons. Entry point, this is where your code goes to |
| addon.json | [JSON](http://www.json.org/) | The meta data file required for all addons |
| settingsSchema.json | [JSON Schema](http://json-schema.org/) | Required for `service` addons. Options ui. [Read more](/en/api/ui.md) |
| settingsSchema.json | [JSON Schema](http://json-schema.org/) | Required for `service` addons. Options UI. [Read more](/en/api/ui.md) |
| lib | Folder | Required for `module` addons. Entry point for modules |
### Create a new service Addon
To create a service addon you need to follow a simple structure.
- Naviagte to ~/.hyperion/addons (folder in your home directory)
- Think about a short "id", this id needs to be unqiue and should just contain letters (english), lowercase no whitespace Example: `kodicon` `plexcon` `timer` `cec`
- Navigate to ~/.hyperion/addons (folder in your home directory)
- Think about a short "id", this id needs to be unique and should just contain letters (English), lowercase no whitespace Example: `kodicon` `plexcon` `timer` `cec`
- Create a folder with your id and prepend `service.`. Example: `service.kodicon` `service.timer` `service.cec`
- Inside this folder create a file called `service.py`, this is where your addon code goes to
- Create a file called `settingsSchema.json`, this will represent our options
@ -37,17 +37,17 @@ To create a service addon you need to follow a simple structure.
- That's it!
::: tip
A prepared service playground addon can be downloaded from the repository. This shows the basic usage of the API but also how option ui works
A prepared service playground addon can be downloaded from the repository. This shows the basic usage of the API but also how option UI works
:::
### Metadata
The metadata file called addon.json is a description of your addon to declare name, version, dependencies, support url, sourcecode url and more. This file is parsed by Hyperion to provide users required informations and download updates accordingly.
The metadata file called addon.json is a description of your addon to declare name, version, dependencies, support URL, sourcecode URL and more. This file is parsed by Hyperion to provide users required informations and download updates accordingly.
| Property | Type | Comment |
| ------------ | ------ | ---------------------------------------------------------------------- |
| name | String | Userfriendly name of your addon |
| name | String | User friendly name of your addon |
| description | String | What does this addon as a brief overview |
| id | String | The unqiue id |
| id | String | The unique id |
| version | String | The current version of your addon. [Semver 2.0.0](https://semver.org/) |
| category | Array | Add the addon to a category. Available `utility` |
| dependencies | Object | You can depend on modules / a specific minimum Hyperion version. |
@ -76,12 +76,12 @@ Here a version for copy and paste
### Addon categories
Addons can be assigned to a category for better sorting. Select the best matching
* **utility** A utility is usually a smaller addon, which does very basic tasks. It doesn't connect to another software. For example the Wake On Lan addon is a utility.
* **utility** A utility is usually a smaller addon, which does very basic tasks. It doesn't connect to another software. For example the Wake On LAN addon is a utility.
* **integration** A integration addon interfaces with another software to listen for specific API events which triggers now actions on the Hyperion side or vice versa. Example is the Kodi addon
* You can suggest new categories!
### Development
Enough preperation stuff, let's start! \
Enough preparation stuff, let's start! \
It's highly recommended to work/read once through a Python tutorial which explains you the principals of Python if you are new to Python.
* New to Python? No problem, here is a interactive tutorial where you can read, write and execute your first python scripts inside your browser [learnpython](https://www.learnpython.org/), available in 7 languages!
* Good beginner guide: [Python course EN](https://www.python-course.eu/python3_interactive.php). [Python Kurs DE](https://www.python-kurs.eu/python3_interaktiv.php). It's not necessary (nor possible) to understand everything, but the first pages are very helpfull as a start!
* Good beginner guide: [Python course EN](https://www.python-course.eu/python3_interactive.php). [Python Kurs DE](https://www.python-kurs.eu/python3_interaktiv.php). It's not necessary (nor possible) to understand everything, but the first pages are very helpful as a start!

View File

@ -35,7 +35,7 @@ Also known as [Apple Bonjour](https://en.wikipedia.org/wiki/Bonjour_(software))
* _hyperiond-json._tcp -> Hyperion JSON Server (TcpSocket)
* _hyperiond-flatbuf._tcp -> Hyperion Flatbuffers server (Google Flatbuffers)
So you get the ip address, hostname and port of the system. Also the Hyperion instance name is part of it (before the @ for the full name). As this works realtime you have always an up2date list of available Hyperion servers right to your hand. So check your development environment if you have access to it.
So you get the IP address, hostname and port of the system. Also the Hyperion instance name is part of it (before the @ for the full name). As this works realtime you have always an up2date list of available Hyperion servers right to your hand. So check your development environment if you have access to it.
### TXT RECORD
Each published entry contains at least the following informations at the txt field

View File

@ -4,7 +4,7 @@ Improve the experience with Hyperion by following a rule set
[[toc]]
## Priority Guidelines
The possiblities of priorities mixing and using is endless. But where are a lot of possibilities you require also some guidelines to reduce confusion on user and developer side and to get the best matching experience possible.
The possibilities of priorities mixing and using is endless. But where are a lot of possibilities you require also some guidelines to reduce confusion on user and developer side and to get the best matching experience possible.
The user expects, that an Effect or Color should be higher in priority than capturing as you usually run them from remotes and not all time.
While we have different capture/input methods, we follow also a specific priority chain to make sure that it fit's the most use cases out of the box.

View File

@ -2,7 +2,7 @@
We use a JSON schema to create a user-friendly GUI and validate the input to prevent wrong or unwanted data that will be consumed by your python file. Each python file requires a GUI schema.
::: tip
If you have never written JSON syntax, we reommend a short introduction. [Here](https://www.digitalocean.com/community/tutorials/an-introduction-to-json) and/or [Here (techinal)](http://www.json.org/)
If you have never written JSON syntax, we recommend a short introduction. [Here](https://www.digitalocean.com/community/tutorials/an-introduction-to-json) and/or [Here (technical)](http://www.json.org/)
:::
[[toc]]
@ -49,7 +49,7 @@ The option `swirl_count` will be of type integer with title `edt_eff_swirl_count
**Optional**
* Add `"minimum" : 5` to force a minimum value in case it shouldn't be lower
* Add `"maximum" : 9` to force a maximum value in case it shouldn't be higher
* Add `"step" : 2,` to define a alternate stepping of value. If not given, defaults to `1`. This doesn't prevent values which are "outside" of the step, it's more a helper if you use up/down keys and hugher or smaller steps are wanted.
* Add `"step" : 2,` to define a alternate stepping of value. If not given, defaults to `1`. This doesn't prevent values which are "outside" of the step, it's more a helper if you use up/down keys and higher or smaller steps are wanted.
### Number
@ -66,7 +66,7 @@ The option `swirl_spread` will be of type number (float) with title `edt_eff_swi
**Optional**
* Add `"minimum" : 5.0` to force a minimum value in case it shouldn't be lower
* Add `"maximum" : 9.6` to force a maximum value in case it shouldn't be higher
* Add `"step" : 0.1,` to define a alternate stepping of value. If not given, defaults to `1.0`. This doesn't prevent values which are "outside" of the step, it's more a helper if you use up/down keys and hugher or smaller steps are wanted.
* Add `"step" : 0.1,` to define a alternate stepping of value. If not given, defaults to `1.0`. This doesn't prevent values which are "outside" of the step, it's more a helper if you use up/down keys and higher or smaller steps are wanted.
### Select
Create a select element, where you can select one of the `enum` items. Default is required!
@ -149,7 +149,7 @@ Creates a RGBA colorpicker. Think twice brefore you provide a RGBA picker, the u
The option `color` will be of type array (shown as RGBA colorpicker) with the title `edt_eff_color` ([Titles will be translated](#translation)). This colorpicker will be set to red with 50% alpha initial. Required to add a default color.
## More beautification
To organize your ui better and make it prettier we provide a set of additional keywords.
To organize your UI better and make it prettier we provide a set of additional keywords.
### Dependencies
Hide/Show a specific option based on the value of another option
@ -204,7 +204,7 @@ You want a specific unit at the end of a field like "s", "ms" or "percent"? Just
```
This will add a "s" for seconds to the input field. Please note it will be also translated, so check the translation file if your unit is already available. Add a new one if required.
### Smooting control (only for effects)
### Smoothing control (only for effects)
Since v2 effects are no longer smoothed, it is possible to enable and manipulate smoothing if required. Add the following to the schema.
``` json
"smoothing-custom-settings":{

View File

@ -11,7 +11,7 @@ All available functions for usage.
| hyperion.imageCRotate() | - | Rotates the coordinate system at the center (0,0) by the given angle. See [hyperion.imageCRotate()](#hyperion-imagecrotate) |
| hyperion.imageCOffset() | - | Add a offset to the coordinate system. See [hyperion.imageCOffset()](#hyperion-imagecoffset) |
| hyperion.imageCShear() | - | Shear the coordinate system. See [hyperion.imageCShear()](#hyperion-imagecshear) |
| hyperion.imageResetT() | - | Resets all coodination system modifications done with hyperion.imageCRotate(), hyperion.imageCOffset(), hyperion.imageCShear() |
| hyperion.imageResetT() | - | Resets all coordination system modifications done with hyperion.imageCRotate(), hyperion.imageCOffset(), hyperion.imageCShear() |
| hyperion.imageMinSize() | - | See [hyperion.imageMinSize()](#hyperion-imageminsize)|
| hyperion.abort() | Boolean | If true, hyperion requests an effect abort, used in a while loop to repeat effect calculations and writing |
| hyperion.imageConicalGradient() | - | See [hyperion.imageConicalGradient()](#hyperion-imageconicalgradient) |
@ -25,7 +25,7 @@ All available functions for usage.
| hyperion.imageSolidFill() | - | See [hyperion.imageSolidFill()](#hyperion-imagesolidfill) |
| hyperion.imageShow() | - | Hyperion shows the image you created with other `hyperion.image*` functions before. This is always the last step after you created the image with other hyperion.image* function |
| hyperion.imageSetPixel() | - | See [hyperion.imageSetPixel()](#hyperion-imagesetpixel) |
| hyperion.imageGetPixel() | Tuple | A [Python tuple](https://www.tutorialspoint.com/python/python_tuples.htm) rgb values for the requested position. See [hyperion.imageGetPixel()](#hyperion-imagegetpixel) |
| hyperion.imageGetPixel() | Tuple | A [Python tuple](https://www.tutorialspoint.com/python/python_tuples.htm) RGB values for the requested position. See [hyperion.imageGetPixel()](#hyperion-imagegetpixel) |
| hyperion.imageSave() | Integer | Create a snapshot of the current effect image and returns an ID. To display the snapshot do `hyperion.imageShow(ID)`. Snapshots are the _current_ state of the picture |
| hyperion.setColor() | - | Not recommended, read why! See [hyperion.setColor()](#hyperion-setcolor) |
| hyperion.setImage() | - | hyperion.setImage(width, height, RGB_bytearray) |
@ -52,18 +52,18 @@ Rotates the coordinate system at the center which is 0 at the x-axis and 0 at th
### hyperion.imageCOffset()
Add offset to the coordinate system at the x-axis and y-axis.
::: warning
Changes at the coordinate system results in weird behaviour of some shorter versions of other hyperion.image* drawing functions
Changes at the coordinate system results in weird behavior of some shorter versions of other hyperion.image* drawing functions
:::
`hyperion.imageCOffset(offsetX, offsetY)`
| Argument | Type | Comment |
| -------- | ---------- | ----------------------------------------------------- |
| offsetX | Integer | Offset which is added to the coordiante system at the x-axis. Positive value moves to the right, negative to the left |
| offsetY | Integer | Offset which is added to the coordiante system at the y-axis. Positive value moves to the right, negative to the left |
| offsetX | Integer | Offset which is added to the coordinate system at the x-axis. Positive value moves to the right, negative to the left |
| offsetY | Integer | Offset which is added to the coordinate system at the y-axis. Positive value moves to the right, negative to the left |
### hyperion.imageCShear()
Shears the coordinate system at the vertical and horizontal. More info to shearing here: [Shear Mapping](https://en.wikipedia.org/wiki/Shear_mapping)
::: warning
Changes at the coordinate system results in weird behaviour of some shorter versions of other hyperion.image* drawing functions
Changes at the coordinate system results in weird behavior of some shorter versions of other hyperion.image* drawing functions
:::
`hyperion.imageCShear(sh, sv)`
| Argument | Type | Comment |
@ -83,7 +83,7 @@ Draws a conical gradient on the image, all arguments are required. Add the argum
| centerX | Integer | Defines the center of the gradient at the x-axis. For the center of the picture use `hyperion.imageWidth()*0.5`, don't forget to surround it with int() or round() |
| centerY | Integer | Defines the center of the gradient at the y-axis. For the center of the picture use `hyperion.imageHeight()*0.5`, don't forget to surround it with int() or round() |
| angle | Integer | Defines the angle from `0` to `360`. Used to rotate the gradient at the center point. |
| bytearray | ByteArray | bytearray of (position,red,green,blue,alpha,position,red,green,blue,alpha,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned. <br/> **Example:** `bytearray([0,255,0,0,255,255,0,255,0,255])` - this is a gradient wich starts at 0 with color 255,0,0 and alpha 255 and ends at position 255 with color 0,255,0 and alpha 255. The colors in between are interpolation, so this example is a color shift from red to green from 0° to 360°. |
| bytearray | ByteArray | bytearray of (position,red,green,blue,alpha,position,red,green,blue,alpha,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned. <br/> **Example:** `bytearray([0,255,0,0,255,255,0,255,0,255])` - this is a gradient which starts at 0 with color 255,0,0 and alpha 255 and ends at position 255 with color 0,255,0 and alpha 255. The colors in between are interpolation, so this example is a color shift from red to green from 0° to 360°. |
::: tip Shorter versions of hyperion.imageConicalGradient()
`hyperion.imageConicalGradient(centerX, centerY, angle, bytearray)` -> startX and startY are 0 and the width/height is max. -> Entire image
@ -105,7 +105,7 @@ Short description at QT Docs: [Radial Gradient](http://doc.qt.io/qt-5/qradialgra
| focalX | Integer | Defines the focal point at the x-axis |
| focalY | Integer | Defines the focal point at the y-axis |
|focalRadius| Integer | Defines the radius of the focal point |
| bytearray | ByteArray | bytearray of (position,red,green,blue,position,red,green,blue,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned <br/> **Example:** `bytearray([0,255,0,0,255,0,255,0])` - this is a gradient wich starts at 0 with color 255,0,0 and ends at position 255 with color 0,255,0. The colors in between are interpolation, so this example is a color shift from red to green. |
| bytearray | ByteArray | bytearray of (position,red,green,blue,position,red,green,blue,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned <br/> **Example:** `bytearray([0,255,0,0,255,0,255,0])` - this is a gradient which starts at 0 with color 255,0,0 and ends at position 255 with color 0,255,0. The colors in between are interpolation, so this example is a color shift from red to green. |
| spread | Integer | Defines the spread method outside the gradient. Available spread modes are: <br/> `0` -> The area is filled with the closest stop color <br/> `1` -> The gradient is reflected outside the gradient area <br/> `2` -> The gradient is repeated outside the gradient area <br/> Please note that outside means _inside_ the rectangle but outside of the gradient start and end points, so if these points are the same, you don't see the spread mode. A picture to the spread modes can you find here: [Spread modes](http://doc.qt.io/qt-5/qradialgradient.html#details) |
::: tip Shorter versions of hyperion.imageRadialGradient()
@ -128,7 +128,7 @@ Short description at QT Docs: [Linear Gradient](http://doc.qt.io/qt-5/qlineargra
| startY | Integer | Defines the start at the y-axis for the gradient. |
| endX | Integer | Defines the end at the x-axis for the gradient. |
| endY | Integer | Defines the end at the y-axis for the gradient. |
| bytearray | ByteArray | bytearray of (position,red,green,blue,alpha,position,red,green,blue,alpha,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned. <br/> **Example:** `bytearray([0,255,0,0,255,255,0,255,0,127])` this is a gradient wich starts at 0 with color 255,0,0 and alpha 255 and ends at position 255 with color 0,255,0 and alpha 127. The colors in between are interpolation, so this example is a color shift from red to green. |
| bytearray | ByteArray | bytearray of (position,red,green,blue,alpha,position,red,green,blue,alpha,...). Could be repeated as often you need it, all values have ranges from 0 to 255. The position is a point where the red green blue values are assigned. <br/> **Example:** `bytearray([0,255,0,0,255,255,0,255,0,127])` this is a gradient which starts at 0 with color 255,0,0 and alpha 255 and ends at position 255 with color 0,255,0 and alpha 127. The colors in between are interpolation, so this example is a color shift from red to green. |
| spread | Integer | Defines the spread method outside the gradient. Available spread modes are: <br/> `0` -> The area is filled with the closest stop color <br/> `1` -> The gradient is reflected outside the gradient area <br/> `2` -> The gradient is repeated outside the gradient area <br/> Please note that outside means _inside_ the rectangle but outside of the gradient start and end points, so if these points are the same, you don't see the spread mode. A picture to the spread modes can you find here: [Spread modes](http://doc.qt.io/qt-5/qlineargradient.html#details) |
::: tip Shorter versions of hyperion.imageLinearGradient()
@ -144,7 +144,7 @@ Draws a line at the image. All arguments are required, exception a for alpha. Ad
| startY | Integer | start point at the y-axis. Relates to `hyperion.imageHeight()` |
| endX | Integer | end point at the x-axis. Relates to `hyperion.imageWidth()` |
| endY | Integer | end point at the y-axis. Relates to `hyperion.imageHeight()` |
| thick | Integer | Thickness of the line, should be calcualted based on image height or width. But at least one Pixel. Example: `max(int(0.1*hyperion.imageHeight(),1)` is 10% of the image height. |
| thick | Integer | Thickness of the line, should be calculated based on image height or width. But at least one Pixel. Example: `max(int(0.1*hyperion.imageHeight(),1)` is 10% of the image height. |
| r | Integer | red color from `0` to `255` |
| g | Integer | green color from `0` to `255` |
| b | Integer | blue color from `0` to `255` |
@ -161,7 +161,7 @@ Draws a point/dot at the image. All arguments are required, exception a for alph
| --------- | ---------- | ----------------------------------------------------- |
| x | Integer | point position at the x-axis. Relates to `hyperion.imageWidth()` |
| y | Integer | point position at the y-axis. Relates to `hyperion.imageHeight()` |
| thick | Integer | Thickness of the point in pixel, should be calcualted based on image height or width. But at least one Pixel. Example: `max(int(0.1*hyperion.imageHeight(),1)` is 10% of the image height. |
| thick | Integer | Thickness of the point in pixel, should be calculated based on image height or width. But at least one Pixel. Example: `max(int(0.1*hyperion.imageHeight(),1)` is 10% of the image height. |
| r | Integer | red color from `0` to `255` |
| g | Integer | green color from `0` to `255` |
| b | Integer | blue color from `0` to `255` |
@ -263,14 +263,14 @@ Get a color of a specific pixel position. All arguments are required. Add the ar
### hyperion.setColor()
Set a single color to all leds by adding `hyperion.setColor(255,0,0)`, all leds will be red. But it is also possible to send a bytearray of rgb values. Each rgb value in this bytearray represents one led.
Set a single color to all leds by adding `hyperion.setColor(255,0,0)`, all leds will be red. But it is also possible to send a bytearray of RGB values. Each RGB value in this bytearray represents one led.
- **Example 1:** `hyperion.setColor(bytearray([255,0,0]))` The first led will be red
- **Example 2:** `hyperion.setColor(bytearray([255,0,0,0,255,0]))` The first led will be red, the second is green
- **Example 3:** `hyperion.setColor(bytearray([255,0,0,0,255,0,255,255,255]))` The first led will be red, the second is green, the third is white
- You usually assign to all leds a color, therefore you need to know how much leds the user currently have. Get it with `hyperion.ledCount`
::: warning hyperion.setColor()
- hyperion.setColor() funtion is not recommended to assign led colors, it doesn't work together with **`hyperion.image*`** functions
- hyperion.setColor() function is not recommended to assign led colors, it doesn't work together with **`hyperion.image*`** functions
- You don't know where is top/left/right/bottom and it doesn't work with matrix layouts!
- Please consider to use the **`hyperion.image*`** functions instead to create amazing effects that scales with the user setup
:::

View File

@ -1,10 +1,10 @@
# Our first Effect
Let's create together our first effect! \
Target of this effect is to show the general structure of an effect, make you confident with the api and workflow.
Target of this effect is to show the general structure of an effect, make you confident with the API and workflow.
## Requirements
* An installed and running Hyperion. You need access to the filesystem where Hyperion has been installed.
* Texteditor (of your liking, i would recommend [Visual Studio Code](https://code.visualstudio.com/))
* Text editor (of your liking, i would recommend [Visual Studio Code](https://code.visualstudio.com/))
* Navigate to the "custom-effects" folder of your Hyperion installation (Inside .hyperion folder of your home directory)
* **Configure a led matrix layout at "LED Hardware"-section at the web configuration to 10x10 LEDs**
@ -44,7 +44,7 @@ Let's talk about what we have done here
- The `neweffect.json` contains the configuration for our effect.
- The `name` property is the effect name which is displayed at the effect list and could be freely defined.
- The `script` property points to the python file it should start.
- The `args` property contains options and their values, for examaple a color, speed and so on. We leave this empty for the moment.
- The `args` property contains options and their values, for example a color, speed and so on. We leave this empty for the moment.
**After you added this file to your custom-effects folder, you need to restart Hyperion once**

View File

@ -1,5 +1,5 @@
# Effect development
Hyperion provides a powerfull API to write your own effects, along with possible options and user interface to tune them.
Hyperion provides a powerful API to write your own effects, along with possible options and user interface to tune them.
[[toc]]
@ -9,4 +9,4 @@ An effect has 3 different files.
| :-------------------: | :-----------------------------------: | :-----------------------------------------------------------------------------------: |
| neweffect.py | [Python](https://www.python.org) | The heart of the effect |
| neweffect.json | [JSON](http://www.json.org) | Contains options for the python file, which makes it configurable |
| neweffect.schema.json | [JSON Schema](http://json-schema.org) | Creates the options ui and is used to validate user input. [Read more](/en/api/ui.md) |
| neweffect.schema.json | [JSON Schema](http://json-schema.org) | Creates the options UI and is used to validate user input. [Read more](/en/api/ui.md) |

View File

@ -88,9 +88,9 @@ If you want to get the most comfortable way for your application to authenticate
* Wait for the response, the user needs to accept the request from the webconfiguration
* -> On success you get a UUID token which is now your personal app token
* -> On error you won't get a token, in this case the user denied the request or it timed out (180s).
* Now you are able to access the api, your access can be revoked by the user at any time, but will last for current connected sessions.
* Now you are able to access the API, your access can be revoked by the user at any time, but will last for current connected sessions.
Requesting a token is easy, just send the follwing command, make sure to add a sufficient comment. The "id" field has 5 random chars created by yourself. And add a meaningful comment.
Requesting a token is easy, just send the following command, make sure to add a sufficient comment. The "id" field has 5 random chars created by yourself. And add a meaningful comment.
``` json
{
"command" : "authorize",

View File

@ -1,8 +1,8 @@
# Control
You can control Hyperion by sending specific json messages. Or get a image and led colors stream of the current active source priority.
You can control Hyperion by sending specific JSON messages. Or get a image and led colors stream of the current active source priority.
::: tip
The `tan` property is supported, but ommited.
The `tan` property is supported, but omitted.
:::
[[toc]]
@ -133,7 +133,7 @@ Clear a priority, usually used to revert these: [set color](#set-color), [set ef
}
```
::: warning
When you clear all, you clear all effects and colors independet who set it! We recommend to provide a list of possible clear targets instead based on the priority list
When you clear all, you clear all effects and colors independent who set it! We recommend to provide a list of possible clear targets instead based on the priority list
:::
### Adjustments
@ -333,7 +333,7 @@ You can request a live image stream (when the current source priority can delive
"subcommand":"imagestream-start"
}
```
You will receive "ledcolors-imagestream-update" messages with a bas64 encoded image.
You will receive "ledcolors-imagestream-update" messages with a base64 encoded image.
Stop the stream by sending
``` json
{
@ -386,4 +386,4 @@ You need now the plugin id. Example: `service.kodi`.
"id":"service.kodi"
}
```
You will get a response of your action. `plugin-start` or `plugin-stop` with success true/false.
You will get a response of your action. `plugin-start` or `plugin-stop` with success true/false.

View File

@ -1,5 +1,5 @@
# JSON RPC Introduction
The JSON-RPC povide lot's of possiblities to interact with Hyperion. You could get information about Hyperion and it's states and trigger certain actions based on these informations or just out of the wild.
The JSON-RPC provide lot's of possibilities to interact with Hyperion. You could get information about Hyperion and it's states and trigger certain actions based on these informations or just out of the wild.
[[toc]]
@ -7,7 +7,7 @@ The JSON-RPC povide lot's of possiblities to interact with Hyperion. You could g
JSON is a standardized message format [JSON.org](http://www.json.org/) and is supported by lot's of programming languages, which is perfect to transmit and process informations. While it's not the smartest in traffic size, it can be read by humans.
### Sending JSON
Hyperion requires a special formatted json message to process it. `command` is always required, while `tan` is optinal. The tan is a integer you could freely define. It is part of the response so you could easy filter for it in case you need it (Might be very rarely).
Hyperion requires a special formatted JSON message to process it. `command` is always required, while `tan` is optional. The tan is a integer you could freely define. It is part of the response so you could easy filter for it in case you need it (Might be very rarely).
``` json
{
"command" : "YourCommand",

View File

@ -87,7 +87,7 @@ You can subscribe to future data updates. Read more about [Adjustment updates](/
```
### Effect list
An array of effects where each object is one effect, ususally you just use the `name` to create a list for the user. You could filter between user created effects and provided effects by checking the effect `file` string. In case it begins with `:` it's a provided effect. If the path begins with `/`, it's a user created effect. Could be used to list the user effects earlier than the provided effects and to keep the overview.
An array of effects where each object is one effect, usually you just use the `name` to create a list for the user. You could filter between user created effects and provided effects by checking the effect `file` string. In case it begins with `:` it's a provided effect. If the path begins with `/`, it's a user created effect. Could be used to list the user effects earlier than the provided effects and to keep the overview.
See also [set Effect](/en/json/control#set-effect)
::: tip Subscribe
You can subscribe to future data updates. Read more about [Effect updates](/en/json/subscribe#effects-updates)
@ -155,7 +155,7 @@ Overview of the registered/active sources. Each object is a source.
* visible: If "true" this source is displayed and will be pushed to the led device. The `visible:true`-source is always the first entry!
* componentId: A string belongs to a specific component. [See available components](/en/json/control#components-ids-explained)
* origin: The external setter of this source "NameOfRemote@IP". If not given it's `System` (from Hyperion).
* owner: Contains additional information realted to the componentId. If it's an effect, the effect name is shown here. If it's usb capture it shows the capture device. If it's platform capture you get the name of it (While we use different capture implementations on different hardware (dispmanx/x11/amlogic/...)).
* owner: Contains additional information related to the componentId. If it's an effect, the effect name is shown here. If it's USB capture it shows the capture device. If it's platform capture you get the name of it (While we use different capture implementations on different hardware (dispmanx/x11/amlogic/...)).
* priority: The priority of this source.
* value: Just available if source is a color AND color data is available (active = false has usually no data). Outputs the color in RGB and HSL.
* duration_ms: Actual duration in ms until this priority is deleted. Just available if source is color or effect AND a specific duration higher than `0` is set (because 0 is endless).

View File

@ -67,7 +67,7 @@ You can subscribe to session updates (Found with Bonjour/Zeroconf/Ahavi). These
}
```
These updates aren't incremental, so they contain always all found entries.
Example response with 2 http server sessions (_hyperiond-http._tcp)
Example response with 2 HTTP server sessions (_hyperiond-http._tcp)
``` json
{
"command":"sessions-update",

View File

@ -2,7 +2,7 @@
Hyperion is fully configurable via web browser. The interface is fully responsive and created with touch devices in mind.
## Web Configuration
Open the web configuration by typing the ip address of your device and the port 8090 in your browser. The installation script will show you the addess, if you don't know it. \
Open the web configuration by typing the IP address of your device and the port 8090 in your browser. The installation script will show you the address, if you don't know it. \
**Example:** `http://192.168.0.20:8090`
### Dashboard
@ -27,7 +27,7 @@ Open the web configuration by typing the ip address of your device and the port
* The **Component status** shows always the latest state (enabled/disabled) of the components
::: tip Hashtag navigation
The web configuration supports hashtags for sitenames, so you could directly open a specfic page by calling the hashtag. **Example:**`http://192.168.0.20:8090/#remote` - will open the remote control page.
The web configuration supports hashtags for sitenames, so you could directly open a specific page by calling the hashtag. **Example:**`http://192.168.0.20:8090/#remote` - will open the remote control page.
:::
### Configuration

View File

@ -1,7 +1,7 @@
# HyperBian
Is a ready to use image for your Raspberry Pi. Based on the original Raspberry Pi Foundation image "Raspbian lite". Hyperion is already pre installed. So simply
1. Download
2. Burn image on sd
2. Burn image on SD
3. Power on your Pi
4. Visit with your Browser `http://IpOfYourPi:8090` for configuration
@ -9,16 +9,16 @@ Is a ready to use image for your Raspberry Pi. Based on the original Raspberry P
## Requirements
* SD card with at least 2GB size
* Raspberry Pi
* Linux/Mac/Windows + sd card read/writer
* Linux/Mac/Windows + SD card read/writer
## Installation
* Download the image here: [HyperBian Download](https://github.com/Hyperion-Project/HyperBian/releases)
* Extract HyperBian-XXXX.img out of the HyperBian.zip
* Burn the extracted HyperBian-XXXX.img to your sdcard. Below 3 instructions for the specific system
* Burn the extracted HyperBian-XXXX.img to your SD card. Below 3 instructions for the specific system
* On Windows: [INSTALLING OPERATING SYSTEM IMAGES USING WINDOWS](https://www.raspberrypi.org/documentation/installation/installing-images/windows.md)
* On Mac: [INSTALLING OPERATING SYSTEM IMAGES ON MAC OS](https://www.raspberrypi.org/documentation/installation/installing-images/mac.md)
* On Linux: [INSTALLING OPERATING SYSTEM IMAGES ON LINUX](https://www.raspberrypi.org/documentation/installation/installing-images/linux.md)
* In case your Raspberry Pi has WLAN or you want to use a WLAN stick, you could pre-configure the WLAN SSID and password before you plugin the sd in your Pi. See [HyperBian WLAN](#hyperbian-wlan)
* In case your Raspberry Pi has WLAN or you want to use a WLAN stick, you could pre-configure the WLAN SSID and password before you plugin the SD in your Pi. See [HyperBian WLAN](#hyperbian-wlan)
* Optional: Enable SSH [HyperBian SSH](#HyperBian-SSH)
::: tip
@ -26,9 +26,9 @@ As a image is already outdated the moment you create it. We update it once a wee
:::
### HyperBian WLAN
In case you want to use WLAN with your Raspberry Pi, you can include the wlan ssid and password after you burned the HyperBian-XXXX.img to your sdcard for auto configuration on first boot.
Open the sdcard with a file explorer. It's called "boot".
- Create a new texfile
In case you want to use WLAN with your Raspberry Pi, you can include the WLAN SSID and password after you burned the HyperBian-XXXX.img to your SD card for auto configuration on first boot.
Open the SD card with a file explorer. It's called "boot".
- Create a new text file
<ImageWrap src="/images/en/user_hyperbian_wpa_suppli1.jpg" alt="Create a new textfile" />
- Rename it to "wpa_supplicant.conf"
<ImageWrap src="/images/en/user_hyperbian_wpa_suppli2.jpg" alt="Rename to wpa_supplicant.conf"/>

View File

@ -14,7 +14,7 @@ Applicable for all led hardware implementations \
Each LED hardware has specific settings which are explained here
### SPI
Are 4 wire leds which can be powered via SPI of a Raspberry Pi or an Ardunio (which is usb connected to your computer/HTPC/Pi)
Are 4 wire leds which can be powered via SPI of a Raspberry Pi or an Arduino (which is USB connected to your computer/HTPC/Pi)
#### apa102
APA 102. These LEDs are known for a good color spectrum (converting a data signal to the wanted color).
@ -85,7 +85,7 @@ Hyperion cannot be held liable for any foreseeable, or unforeseeable, negative o
* To use the Philips Hue Entertainment API, the bridge must use at least API version 1.22!
* Only one Entertainment group / area can be active at one time on a single Hue Bridge!
##### Multiple and / or none orignal Hue bridges
##### Multiple and / or none original Hue bridges
* Automatic detection will only find the first available bridge.
* If your bridge wasn't found or was found, but not the one you want to use, manually enter the desired bridge IP address and click the "retry" icon / button next to the IP entry field.
@ -102,7 +102,7 @@ Hyperion cannot be held liable for any foreseeable, or unforeseeable, negative o
* With the `Signal detection timeout on black` option, you can control how long all lamps are set to black, before the Entertainment API stops and the previous lamp state will be recovered.
* Set the ms value higher, so longer dark scenes in movies will not stop the Entertainment API.
* The Entertainment API automatically restarts when color information other than black is available to send.
* Some grabbers do not provide real black, but rather dark gray, so black = 0 never occurs. With the option `Signal detection brightness minimum` you can set the minimum brightness which is considered black. The range can be set from 0 = 0% to 1 = 100%, e.g. 0,005 = 0.5%. If 0 doesn' work for your setup, increase this value in 0,005 steps. It's like the thresholds for USB Capture.
* Some grabbers do not provide real black, but rather dark gray, so black = 0 never occurs. With the option `Signal detection brightness minimum` you can set the minimum brightness which is considered black. The range can be set from 0 = 0% to 1 = 100%, e.g. 0,005 = 0.5%. If 0 doesn't' work for your setup, increase this value in 0,005 steps. It's like the thresholds for USB Capture.
##### Brightness *Settings may be removed in future releases*
* Set / leave `brightness factor` back to 1 (default) - classic low brightness bug is fixed
@ -112,11 +112,11 @@ Hyperion cannot be held liable for any foreseeable, or unforeseeable, negative o
* The brightness factor is a multiplier for the input brightness, means E.g. 50% input brightness * brightness factor (e.g. 1,5) = new 75% brightness.
* __Be warned__:
If you change the brightness factor / minimum / maximum to a value other than the default value, the color rendering will also change!!!
E.g. Dark / Black will apear as a deep dark blue, if you raise the minimum brightness, because the deepes color inside the hue light system is a deep blue, because black is not a color, it's only off.
E.g. Dark / Black will appear as a deep dark blue, if you raise the minimum brightness, because the deepest color inside the hue light system is a deep blue, because black is not a color, it's only off.
__AND__ you can miss the entire Entertainment API experience ;)
::: warning Fast uncontrolled colors / flickering
* The colorinformation for each lamp, depends on the input signal from your grabber source, the defined screen position to use for the lamp (like any other led configuration) and the used capture framerate!
* The color information for each lamp, depends on the input signal from your grabber source, the defined screen position to use for the lamp (like any other led configuration) and the used capture framerate!
* Input signals with noise and other image disturbances can cause this effect of rapidly changing colors / flickering. For more information on how to reduce this problem, see the next tip:
:::
@ -140,8 +140,8 @@ Hyperion cannot be held liable for any foreseeable, or unforeseeable, negative o
##### Configuration Tips & Tricks
* Use the Philips Hue wizard at the web configuration for configuration (available at led hardware section)!
* Color calibration is not required, you can keep the default values.
* If the bightness is to low for you and Hyperion is already at 100% you can higher the brightness factor at the web configuration -> LED hardware
* Brightness componsation influences the brightness across different color (Adjust at the color section)
* If the brightness is to low for you and Hyperion is already at 100% you can higher the brightness factor at the web configuration -> LED hardware
* Brightness compensation influences the brightness across different color (Adjust at the color section)
* To enable/disable the bridge control from Hyperion, disable Hyperion or just the led hardware component. The previous lamp state will be recovered
#### atmoorb

View File

@ -55,7 +55,7 @@ Now with three LEDs
</ImageWrap>
### Additional properties
You may connected different led stripe charges with different rgb byte orders. You can overwrite the global rgb byte order by adding a `colorOrder` property to all leds that require a different one.
You may connected different led stripe charges with different RGB byte orders. You can overwrite the global RGB byte order by adding a `colorOrder` property to all leds that require a different one.
``` json
{
"hmax": 0.2,
@ -77,7 +77,7 @@ You may connected different led stripe charges with different rgb byte orders. Y
"vmin": 0.7
}
```
In this example the first led will be `gbr`, the other leds will be assigned to the global rgb order that has been defined at the led hardware section.
In this example the first led will be `gbr`, the other leds will be assigned to the global RGB order that has been defined at the led hardware section.
### Edit with Web Configuration
While editing these values in a local texteditor is a little bit weird, you could edit them at the web configuration!
@ -92,7 +92,7 @@ Explain the differences between the available modes for blackbar detection.
* **Default:** 3 scanlines in each direction (X Y) - fastest detection
* **Classic:** The original implementation - lower cpu time (legacy for RPi 1) just scan the top one third of the picture which leads to a slow detection and trouble with TV channel logo.
* **OSD:** Based on the default mode - not that effectiv but prevents border switching which may caused of OSD overlays (program infos and volume bar).
* **OSD:** Based on the default mode - not that effective but prevents border switching which may caused of OSD overlays (program infos and volume bar).
<ImageWrap src="/images/en/user_bbmodes.jpg" alt="Hyperion Blackbar detection modes" />
## Gamma Curve
@ -131,7 +131,7 @@ If a path name contains spaces, surround it with `“`.
:::
### hyperion-remote
hyperion-remote is a command line tool which translates given arguments to json commands and sends them to the Hyperion JSON-RPC. Easy to use for scripts. It supports nearly all commands that Hyperion provides.
hyperion-remote is a command line tool which translates given arguments to JSON commands and sends them to the Hyperion JSON-RPC. Easy to use for scripts. It supports nearly all commands that Hyperion provides.
``` sh
# Get a list of all available commands
@ -169,7 +169,7 @@ Hyperion remote will search for a Hyperion server automatically. So you can even
### hyperion-capture
We deliver also stand alone capture apps right in your Hyperion directory. They are called hyperion-dispmanx, hyperion-osx, hyperion-x11, hyperion-amlogic, hyperion-framebuffer, hyperion-qt. Depending on your platform you have more or less.
All these application can be started independent from Hyperion and all of these have slightly different options. They communitcate with the flatbuffer interface of Hyperion. So let's start one of them! In this example i use dispmanx for Raspberry Pi, so let us check the available options.
All these application can be started independent from Hyperion and all of these have slightly different options. They communicate with the flatbuffer interface of Hyperion. So let's start one of them! In this example i use dispmanx for Raspberry Pi, so let us check the available options.
``` sh
hyprion-dispmanx -h

View File

@ -2,7 +2,7 @@
In case you need support or you found a bug it's all about informations that you need to deliver.
## Usual request
For this pupose and to save a lot of time we included a report creation and upload function into the web configuration.
For this purpose and to save a lot of time we included a report creation and upload function into the web configuration.
So visit your web configuration and click on System -> Log. Now you click on the button "Upload report for support request".
> Image of report tool
@ -20,7 +20,7 @@ Debugging segmentation faults requires a bunch of work, if we don't own your har
* Tell gdb where "hyperiond" is located, usually at /usr/share/hyperion/bin/hyperiond. Prepend "file" to the path. So type into terminal something like that and press enter: `file /usr/share/hyperion/bin/hyperiond`
* gdb should tell you now that the binary has been loaded with it's symbols etc
* Now type in `run` and press enter, this will start Hyperion. Now you can use Hyperion as usual, repeat the steps you did to create a segmentation fault.
* A segmentation fault happend, when Hyperion stops responding and you see something like this as last message at the terminal: `Thread 1 "hyperiond" received signal SIGSEGV, Segmentation fault.`
* A segmentation fault happened, when Hyperion stops responding and you see something like this as last message at the terminal: `Thread 1 "hyperiond" received signal SIGSEGV, Segmentation fault.`
* Now type in `backtrace` and press enter, add the backtrace to your support request thread at our forum. [Hyperion Project Forum](https://forum.hyperion-project.org)
* To quit gdb press enter and type in `quit`, you can start Hyperion again with `sudo service hyperiond start`. It's not recommended to use "Debug" Hyperion builds in production, just install the "Release" version again.