Commit Graph

63 Commits

Author SHA1 Message Date
Wouter Born
a2868bb0dc
Use diamond operator and remove redundant type arguments (#16249)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-09 23:46:15 +01:00
Wouter Born
3415397a83
Remove unnecessary semicolons (#16214)
This helps with stopping the proliferation of unnecessary semicolons.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-05 23:56:58 +01:00
Wouter Born
4fe00bb2bf
Remove redundant feature dependencies (#16204)
* Remove redundant feature dependencies

The following features are already dependencies of openhab-runtime-base:

* openhab-core-base
* openhab-core-model-item
* openhab-core-model-script
* openhab-transport-mdns

See also: https://github.com/openhab/openhab-addons/pull/16202#issuecomment-1876875456

* Remove redundant openhab.tp-jackson and openhab.tp-jaxb feature dependencies

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-05 20:00:24 +01:00
Jacob Laursen
f4596f581e
Update license headers to 2024 (#16168)
* Update copyright year in configuration
* Update license headers
* Manually update nibeheatpump headers (.cpp/.h/.ino)
* Manually update smsmodem header
* Manually update hueemulation header
* Manually update addon-header.xml header

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-01 18:14:57 +01:00
Holger Friedrich
533cc666ab
Apply spotless after release (#16097)
* Apply spotless after release
* itests: resolve bundles

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:30:38 +01:00
openhab-bot
83e0485219 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 14:37:48 +00:00
Mark Herwege
463cebcbdf
change mdns add-on discovery syntax (#16060)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-16 14:14:32 +01:00
Andrew Fiddian-Green
3814f37d9a
Make bindings discoverable on system startup (#15817)
* [discovery-methods] mDNS discovery methods
* [discovery-methods] UPnP discovery methods

---------

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2023-12-07 20:34:45 +01:00
Holger Friedrich
cbf4411034
Improve javadoc for all addons (#15667)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-30 21:49:12 +02:00
Holger Friedrich
ab58f4ffb4
Java 17 features (N-S) (#15565)
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex
- instanceof matching and multiline strings

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-13 08:03:31 +02:00
Gwendal Roulleau
f98ed3fc22
[pulseaudio] For source, default timeout should be disconnection ASAP (#15314)
* [pulseaudio] For source,  default timeout should be disconnection ASAP

To avoid weird behaviour, such as pulseaudio server storing audio data between inputstream get/read and then sending the backlog all at once when finally reading, we must disconnect immediately thereafter.

---------

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-08-03 11:01:48 +02:00
Kai Kreuzer
72607d3bee Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:20:31 +02:00
openhab-bot
809fceaff3 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 19:19:01 +00:00
Gwendal Roulleau
94a761f84e
[pulseaudio] Make the process method asynchronous (#15179)
* [pulseaudio] Make the process method asynchronous

And use the new 'complete' system to signal core that the sound is fully played.

---------

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-07-06 19:21:12 +02:00
Wouter Born
83cbe746d0
Remove redundant modifiers from interfaces (#14843)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-18 13:07:04 +02:00
Wouter Born
f21f7bc8b3
Add more connection details to add-ons (#14813)
* Add more connection details to add-ons

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-15 21:23:24 +02:00
J-N-K
89d0689e36
fix i18n for bindings (#14235)
Also-By: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-21 12:14:51 +01:00
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) (#13289)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +01:00
Jacob Laursen
4dd6d3a8a2
Update license headers to 2023 (#14154)
* Update copyright year in configuration
* Update license headers

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-01-06 09:49:54 +01:00
J-N-K
4d6d6443ef
fix spotless after release (#14014)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 15:22:17 +01:00
openhab-bot
7993786dc9 [unleash-maven-plugin] Preparation for next development cycle. 2022-12-19 00:55:11 +00:00
Jerome Luckenbach
1ca9baf157
[Documentation] Markdown improvements n to s (#13948)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
2022-12-14 16:52:43 +01:00
Дилян Палаузов
0ffc5257d5
Typos a/an (#13876) 2022-12-08 21:12:49 +01:00
Дилян Палаузов
78534e8106
Typos a/an (#13812) 2022-12-01 14:30:50 +01:00
Gwendal Roulleau
b7cbf2ba72
[pulseaudio] Apply real disconnection when needed (#13338)
* [pulseaudio] Removing isIdle test

The isIdle boolean was not properly handled.
When disconnection is called, isIdle is not relevant : we should always honnor the disconnection request.
In fact, isIdle prevented disconnection when it is necessary (example : when a IOException occurs when sending audio to sink)

+Little bug fix on volume parsing: some volume request doesn't respond with a space after the comma separating left/right channel.

* [pulseaudio] Enhancement to the idle detection for disconnection

Using a counter to count client instead of a isIdle variable, which was not thread safe.
The PulseaudioSimpleProtocolStream parent class is now the sole responsible for closing source or sink stream.

* [pulseaudio] Small performance enhancement

Avoid a costly synchronized operation for a method called very often.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-09-25 12:59:30 +02:00
Kai Kreuzer
440f603e88
Apply spotless and resolver (#13027)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 16:00:37 +02:00
openhab-bot
ed4858ebbb [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 18:18:40 +00:00
GiviMAD
6eed7fb542
[pulseaudio] regenerate default translations (#12916)
* [pulseaudio] regenerate default translations

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-06-11 08:36:00 +02:00
GiviMAD
798d59b2c5
[pulseaudio] Fix source format options (#12913)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-06-10 07:39:01 +02:00
Gwendal Roulleau
ae20f93f19
[pulseaudio] Allow flexible parameters to find a given pulseaudio device (#12598)
* [pulseaudio] Allow flexible parameters to find a given pulseaudio device

To identify the device on the pulseaudio server, you can now use the description instead of the technical id (a.k.a. "name").
To filter furthermore, you can also use the parameter additionalFilters (optional regular expressions that need to match a property value of a device on the pulseaudio server)

Closes #12555

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-04-28 23:25:23 +02:00
Gwendal Roulleau
2be9a658d5
[pulseaudio] Small bugfixes and rewrite (#12581)
* [pulseaudio] small fixes and rewrite

- All classes are now @NonNullByDefault
- all build warnings cleared
- no more need for a watchdog scheduled thread for every pulseaudio device : the bridge now handles sending information to child
- fix bug : exception at startup when child handler try to get information from the bridge too soon is now handled by waiting 2 seconds if necessary
- fix bug : playing MP3 with high bitrate is now OK with the replacement of the ResetableInputStream by a standard BufferedInputStream that handle mark/reset method better
- fix bug : ghost device listener no longer receive event after dispose
- fix bug : discovery doesn't show already added thing anymore
- Updating the status bridge to ONLINE only AFTER the update method is done.
- Use the bridgeStatusChanged method in the childhandler to get opportunity to test if the child could go ONLINE, (and by the way initialize the audiosink and audiosource, has they also need information from the bridge)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Laurent Garnier <lg.hc@free.fr>
2022-04-10 00:25:45 +02:00
dalgwen
ecf8aa32b0
[pulseaudio] Fix misconfiguration example in README (#12553)
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>

Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2022-04-01 09:24:53 +02:00
GiviMAD
fee7f7e9c5
[pulseaudio] source: use thread safe collection and force reconnection (#12441)
* [pulseaudio] use thread safe collection
* [pulseaudio] source: connect pipe before store ref
* [pulseaudio] source: improve warning messages
* [pulseaudio] fix IOException when closing all sources
* [pulseaudio] prevent warning when InterruptedIOException on source close

Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-03-18 00:41:00 +01:00
lolodomo
e3ca3b01bf
[pulseaudio] Fix exception handling when connecting (#12423)
Fix bridge/thing status update
Also update log levels

Fix #12419
Fix #12424

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2022-03-08 00:01:54 +01:00
GiviMAD
3ed28ae745
[pulseaudio] fix null pointer exception and ensure source bg task stops (#12414)
* [pulseaudio] fix null pointer exception and ensure source bg task stops

Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-03-04 22:40:04 +01:00
GiviMAD
094cb7f12d
[pulseaudio] register audio sources in openhab (#12376)
* [pulseaudio] register audio sources in openha
* [pulseaudio] fix audio source reconnection
* [pulseaudio] audio source check record property and customize SOTimeout
* [pulseaudio] use pipe streams
* [pulseaudio] synchronize commands and update after module load

Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
2022-03-03 13:01:07 +01:00
Hilbrand Bouwkamp
da59cdd255
Update license headers to 2022 (#11973)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-01-06 18:14:47 +01:00
Marcel
cc47ef7f3e
pom update from http to https reference (#11833)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2021-12-23 19:40:44 +01:00
Kai Kreuzer
48746f5e3f Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 09:07:55 +01:00
openhab-bot
6dc031e6cf [unleash-maven-plugin] Preparation for next development cycle. 2021-12-20 00:30:46 +00:00
Wouter Born
07a1976c81
Add default translations for binding add-ons (#11760)
* Add default translations for binding add-ons

This makes the texts used by these add-ons translatable with Crowdin.

To keep the PR simple, it only adds default translations for add-ons which do not yet have any default translations properties file.
We can do follow up PRs for adding missing key/values to add-ons that already have these files or to remove duplications.

There are several add-ons in this PR that do have non-English translation files, so I'll upload those to Crowdin when the PR is merged.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-15 18:40:21 +01:00
dalgwen
374a89a9fb
[pulseaudio] Add reencoding to play more audio formats (#11630) (#11631)
Add a pass to reencode PCM sound in 16 bit, 44100 hz, 2 channels, before sending it to the pulseaudio audio sink.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>

Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2021-12-11 13:08:03 +01:00
Robert von Könemann
845ab29501
simpleProtocolSinkPort expects int (#11403)
the parameter should be specified as int instead of as a string.
l
2021-10-18 00:47:24 +02:00
dalgwen
83fd01498a
[pulseaudio] Fix sink-input configuration and other (#11272) (#11276)
* [pulseaudio] Fix sink-input configuration  and other small improvements (#11272)

The binding requires a parameter to activate the parsing of sink-input entries on the pulseaudio server. This patch :
- document this behaviour
- fix the parsing of these parameters if a configuration file is used (the old method of casting launched a class cast exception)

Other small improvements :
- Force a refresh/new parsing when the configuration changes
- Fix scheduled disconnection : if a sound is played during the grace period, the scheduled disconnection is postponed, not added to the last
- add a possibility to never disconnect the audio sink (in order to have a lower latency when playing sound)
Closes #11272

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>

* Small fixes after proofreading

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>

Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2021-10-09 11:44:20 +02:00
dalgwen
0a96792a93
[pulseaudio] Fix playing time with pulseaudio sink (#11170) (#11171)
Fixes #11170 by introducing an intelligent thread.sleep (getting the duration of the sound, if possible, then wait the appropriate time for letting the sound play). By the way, the method to get the sound duration is not as easy as I thought.

Also fix a minor issue with the last volume not propertly saved.

And fix some minor warnings by using final local variable.

Signed-off-by: Gwendal ROULLEAU <gwendal.roulleau@gmail.com>
2021-09-08 21:08:05 +02:00
lolodomo
0c2d697909
[pulseaudio] Move the binding config in file binding.xml (#11055)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-07-25 12:40:57 +02:00
Kai Kreuzer
bebab9ce29 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:25:35 +02:00
jenkins
8c5c81e256 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 17:35:01 +00:00
Dbzman
7109475929
[pulseaudio] Add "idle timeout" to Pulseaudio audio sink (#10731)
* Add "idle timeout" to pulseaudio audio sink to allow the sink to disconnect after being idle

Signed-off-by: Timo Litzius <dev@dbzman-online.eu>
2021-06-05 11:29:59 +02:00
Ando "David" Roots
19eea60a26
Fix typo in pactl list sinks example (#10568)
The syntax for listing Pulseaudio sinks is with a space,
not dash (two arguments).

Ref https://manpages.ubuntu.com/manpages/trusty/man1/pactl.1.html

Signed-off-by: Ando Roots <ando@sqroot.eu>
2021-04-24 12:12:20 +02:00