* [ColorUtil] Extend rgbToHsb(PercentType[]) for RGBW
rgbToHsb(PercentType) supports arrays of size 4 (RGBW) in addition to and arrays of size 3 (RGB).
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* Add conversion for HSB to RGBW and back
for KNX DPT251.600 to use all 4 colors.
With the new feature, the HSBType can converted into RGBW, and also back
to HSB.
Due to the conversion, some accuracy is lost, but the result is
approximately correct.
Signed-off-by: Marco Müller <marco@ms-mueller.ch>
Simplifies the code by using List.of, List.copyOf etc. where possible which results in less code and imports.
Signed-off-by: Wouter Born <github@maindrain.net>
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.
Signed-off-by: Wouter Born <github@maindrain.net>
This is a workaround for JDK-8301341 by using the Java 11 LinkedTransferQueue with the QueueingThreadPoolExecutor in the Core and jUPnP.
Signed-off-by: Wouter Born <github@maindrain.net>
On larger installations with 1000+ items the limit of 1000 elements in the queue is exceeded easily. Since no events are lost (they just take longer to be processed), the limit that needs to be exceeded before a warning is issued should be increased.
See reports on the forum.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Improve threading in EventHandler
* refactor pagechangelistener to event
* One executor per subscriber type, not per subscriber
Signed-off-by: Jan N. Klug <github@klug.nrw>
Allows the use of a Sizeable interface (for AudioStream that we know the length of, but we cannot clone). We can then improve the duration detection, for example for the pulseaudio sink (PR coming after).
We can also give the length information to sink in more cases.
Add the support of the mark / reset methods to some common AudioStream. We then allow more stream analysis for sink requiring it (Stream analysis often requires to get back in time after consuming a few bytes)
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* [audio] More capabilities for AudioSink using the AudioServlet
AudioServlet can now serve all type of AudioStream multiple times by buffering data in memory or in temporary file.
Adding method to ease disposal of temporary file after playing a sound
Adding an identifyier to audio stream for further development (allow audio sink to cache computation data)
We can now send audio with a Runnable for a delayed task to be executed after. This delayed task includes temporary file deletion and volume restoration.
This is a no breaking change / no behaviour modification for other addon AudioSink, as existing AudioSink must explicitly override the old behaviour to use this capability.
Add AudioSinkSync / AudioSinkAsync abstract classes to use this capability easily.
WebAudioSink now implements this capability, with the help of a modified AudioServlet
Adding (approximative, better than nothing) sound duration computation method for MP3 and WAV.
Use this sound duration computation to guess when the async sound is finished and when to do the post process (i.e. volume restoration)
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* New translations audio.properties (Romanian)
* New translations addons.properties (Romanian)
* New translations i18n.properties (Romanian)
* New translations network.properties (Romanian)
* New translations marketplace.properties (Romanian)
* New translations validation.properties (Finnish)
* New translations scriptprofile.properties (French)
* New translations scriptprofile.properties (Slovenian)
* New translations validation.properties (Hebrew)
* New translations validation.properties (Polish)
* New translations validation.properties (Slovenian)
* New translations hli.properties (French)
* New translations hli.properties (Polish)
* New translations automation.properties (Hebrew)
* New translations automation.properties (Polish)
* New translations lsp.properties (Italian)
* New translations hli.properties (Italian)
* New translations addons.properties (Finnish)
* New translations automation.properties (Italian)
* New translations LanguageSupport.properties (Portuguese)
* Add a ScriptEngineFactory bundle tracker
The `ScriptEngingeFactoryBundleTracker` tracks all bundles that provide `ScriptEngineFcatory` capabilities and sets a `ReadyMarker` if all of them are activated.
Signed-off-by: Jan N. Klug <github@klug.nrw>
Posting the `ItemAddedEvent` after notifying the listeners results in `ItemStateUpdated/ChangedEvents` before the `ItemAddedEvent` because the state could be altered by persistence services. This is at least unexpected and can be fixed by swapping the order.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* Add dimension RadiationSpecificActivity
This can be used e.g. for radon monitoring. The unit Bq/m3 was wrongly assigned to the dimension `Density` before.
Signed-off-by: Jan N. Klug <github@klug.nrw>
* improvement
Signed-off-by: Jan N. Klug <github@klug.nrw>
The log level was increased during the UoM refactoring but it turns out that a lot of code depends on failing silently. Therefore the log level is again reduced to DEBUG.
Signed-off-by: Jan N. Klug <github@klug.nrw>