Commit Graph

46 Commits

Author SHA1 Message Date
lsiepel
455330e741
[multiple] Reduce SAT warnings (#17564)
* NoEmptyLineSeparatorCheck
* ModifierOrderCheck
* TypeNameCheck
* ConstantNameCheck loggers
* UnusedPrivateField
* Fix imports
* New line
* dynamodb static logger

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
2024-10-19 16:59:52 +02:00
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
J-N-K
3136425b39
Adapt to core changes (ThingHandlerService) (#16107)
Related to: https://github.com/openhab/openhab-core/pull/3957

Signed-off-by: Jan N. Klug <github@klug.nrw>
2024-01-03 11:50:55 +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
Wouter Born
c58d894bf0
Use OnOffType.from to reduce code (#16101)
You can create an `OnOffType` using a boolean nowadays which reduces the amount of code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-23 19:06:21 +01: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
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
Holger Friedrich
2c8f639060
[nanoleaf] Use new core class ColorUtil for RGB conversion (#14773)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-05-01 20:43:22 +02:00
mlobstein
dc19e2991d
Declare connection for bindings N thru S (#14907)
* Declare connection for bindings N-S

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
2023-04-30 17:37:32 +02:00
lolodomo
d33f6916d2
[nanoleaf] Stop the HTTP client when disposing the thing handler (#14459)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-02-20 20:28:27 +01:00
Mark Hilbush
38fa097594
Fix incorrect i18n tags in addon.xml (#14312)
Signed-off-by: Mark Hilbush <mark@hilbush.com>
2023-02-01 20:27:10 +01: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
Holger Friedrich
4e44de3894
Fix SAT warnings (#14202)
* Fix SAT warnings

- checkstyle.ModifierOrderCheck
- checkstyle.OneStatementPerLineCheck
- checkstyle.NeedBracesCheck
- PMD.UseStandardCharsets
- PMD.UseCollectionIsEmpty
- PMD.UnusedLocalVariable
- PMD.SimplifyBooleanReturns where reasonable, suppress where
readability is better without change
- PMD.SimplifyBooleanExpressions

* Include StandardCharsets

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-01-13 08:11:06 +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ørgen Austvik
6cd59e4c94
[nanoleaf] More robust caching of layout (#13998)
* [nanoleaf] More robust caching of layout

This is a bugfix/enhancement to make sure the caching of the layout
(to save it from being recalculated) works better:
- Only save previous layout if indeed painted
- Only save layout from the layout update, not the display state
- Recalculate anyway if current state is null

* Bugfix: Update colors

When Stefan runs, the getBridge() returns null, when Jørgen runs, is doesn't. But it isn't needed, because we
are already in the handler, so just call own methods.

Improvement: Less draws when updating colors

Instead of drawing the picture for each panel (which gave a cool effect), draw only once when we have parsed all color data.

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-25 20:56:04 +01:00
Cody Cutrer
672b60b1d9
[nanoleaf] Handle and provide QuantityType for color-temperature-abs channel (#14026)
* [nanoleaf] handle and provide QuantityType for color-temperature-abs channel

see https://github.com/openhab/openhab-core/pull/3129

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-12-21 22:43:46 +01:00
Jørgen Austvik
79060f3c8f
[nanoleaf] Bugfix: Handle non-integer panel ids (#13951)
Panel ids are sometimes returned as BigInteger

We haven't been able to understand why this happens somewhere and
somewhere not, but this is an sledgehammer attempt to fix it quickly
to unblock users, and then we will try to understand it later.

Discussions:
https://community.openhab.org/t/java-lang-classcastexception-class-java-math-bigdecimal-cannot-be-cast-to-class-java-lang-integer/142035/16
https://community.openhab.org/t/nanoleaf-binding-oh3-stabilization-update/116300/61

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-14 20:15:47 +01:00
Jørgen Austvik
70cca8fc77
[nanoleaf] More color for less network calls (#13893)
* [nanoleaf] More color for less network calls

This is a refactoring that moves the "get panel color" out of the
panel handler and into a separate class, with callbacks.

This makes us do only one REST call to get colors instead of one per
panel that is a thing. It also lets us retrieve colors for all panels -
 also those that doesn't have a thing in OpenHAB,

While testing this out, I found a bug where solid colors set in the app
wasn't reflected in neither the controller nor panel channels, and that
should also be fixed now.

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-11 16:09:53 +01:00
Jørgen Austvik
8c0925a63b
Dont set read only temp file (#13905)
Because it breaks windows builds

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-11 10:10:37 +01:00
Jørgen Austvik
02398b14a3
[Nanoleaf] Support lines (#13881)
Lines is a Nanoleaf shape we haven't been able to test earlier.

Now we have tested them, and added support for painting them as well.

They do unfortunately not support touch gestures.

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-08 22:39:45 +01:00
Jørgen Austvik
177ce2a217
[Nanolaef] Visual State Bugfix (#13880)
* Nanoleaf Visual State fix

Fix the visual state channel name.

Also:
- Better name (from state to visual state) of the (new) channel
- Better logs which has helped us debug the problem
- Some more information on when it will work in the README

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-08 21:00:11 +01:00
stefan-hoehn
4c93125723
[nanoleaf] add LONG_PRESSED tap detection (#13865)
* [nanoleaf] add LONG_PRESSED tap detection

Signed-off-by: Stefan Höhn <stefan.hoehn@nfon.com>
2022-12-07 05:49:04 +01:00
Jørgen Austvik
cad69c8de5
[Nanoleaf] New Channel: State (#13746)
* [Nanoleaf] New Channel: State

Shows an image of the state of the panels with color.

Also makes the layout slightly prettier. This is less functional than the layout, and more eyecandy.

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-12-02 21:14:53 +01:00
Дилян Палаузов
78534e8106
Typos a/an (#13812) 2022-12-01 14:30:50 +01:00
Jørgen Austvik
fbd06ec709
[Nanoleaf] Visualize layout (#13552)
* Visualize Nanoleaf layout
* Only calculate image if channel is linked
* White background image
* Render more shapes

Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
2022-11-12 23:00:08 +01:00
Wouter Born
0f56369b2a
[nanoleaf] Fix LayoutTest failing on Windows (#12563)
On Windows the view has different line endings causing some tests to fail.
For readability the big strings have also been moved into files.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-03 10:44:28 +02: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
Kai Kreuzer
db567bc652
Various small enhancements (#11874)
- do not go from INITIALIZING to OFFLINE and then ONLINE, but skip OFFLINE for panels, if the controller is ONLINE
- reduce logging to debug when receiving trigger events
- only update Thing configuration if necessary to avoid Thing updated events
- fix description of model types, which was outdated due to new models being available by now

Signed-off-by: Kai Kreuzer <kai.kreuzer@telekom.de>
2021-12-28 19:27:45 +01:00
Kai Kreuzer
57cc935708
Reduce to debug logging in case of communication problems (#11872)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-28 11:17:57 +01:00
openhab-bot
860244b18b
New Crowdin updates (#11608)
* New translations openhabcloud.properties (French)

* New translations transform.properties (French)

* New translations voicerss.properties (French)

* New translations actions.properties (German)

* New translations errors.properties (German)

* New translations stateflags.properties (German)

* New translations nanoleaf.properties (German)

* New translations surepetcare.properties (German)

* New translations deconz.properties (German)

* New translations tr064.properties (German)

* New translations deconz.properties (German)

* New translations openhabcloud.properties (German)

* New translations astro.properties (French)

* New translations hue.properties (French)

* New translations ntp.properties (French)

* New translations feed.properties (German)

* New translations lgwebos.properties (French)

* New translations gce.properties (French)

* New translations airquality.properties (French)

* New translations airquality.properties (French)

* New translations rotel.properties (French)

* New translations feed.properties (German)

* New translations hue.properties (French)

* New translations mail.properties (German)

* New translations sonyprojector.properties (French)

* New translations tradfri.properties (French)

* New translations powermax.properties (French)
2021-11-22 00:58:03 +01:00
stefan-hoehn
d3d1c7ae0a
[nanoleaf] Reimplement touch detection based on SSE, stabilize behavior, add swipe support (#11133)
* [nanoleaf] reimplement touch detection based on sse, stabilize behavior
* [nanoleaf] add swipe support
* [nanoleaf] add / tested full shapes support

Signed-off-by: Stefan Höhn <stefan@andreaundstefanhoehn.de>
2021-09-28 09:07:12 +02:00
Kai Kreuzer
009208adee
[nanoleaf] Refactored code to use core features and more (#10101)
This is a bigger refactoring bringing these (breaking) changes:
- System channel types are used where applicable
- Obsolete channels (such as power) were removed
- Some channel types were marked "advanced"
- "Tap" channels were converted to a trigger channel type providing a "system button" behavior
- Layout can now be requested by a console command
- Command options for effect channel are dynamically provided
- Log level has been reduced where appropriate
- HTTP request timeouts were reduced
- handleRemoval now returns quickly as expected
- Fixed hanging thread / infinite loop when requesting layouts for non-square panels
- Various other smaller enhancements and fixes
- Documentation has been adapted accordingly

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-03-17 09:12:04 +01:00
stefan-hoehn
570f86d043
[nanoleaf] CODEOWNERs, add Shapes Support, beta-firmware support (#10029)
Signed-off-by: Stefan Höhn <stefan@andreaundstefanhoehn.de>
2021-02-03 21:26:13 +01:00
Christoph Weitkamp
b53c61b1e8
[nanoleaf] Removed dependency on org.apache.commons (#9811)
* Removed dependency on org.apache.commons
* Incorporated changes from review

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-01-13 16:40:11 -08:00
Kai Kreuzer
0dd50f226e
[nanoleaf] Fixed color temperature setting (#9786)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-13 08:24:41 +01:00
Wouter Born
d6364aceb1
Update license headers to 2021 (#9620)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-02 22:03:14 +01:00
Kai Kreuzer
007c3b56e5
removed deprecated author information from binding.xml (#9113)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-23 19:06:33 -08:00
J-N-K
ba4c96d99d
[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-11-12 21:07:11 +01:00
J-N-K
bd664ff0c8
[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-10-31 00:29:03 +01:00
Hilbrand Bouwkamp
003c3af985
Remove immediate = true from all Components (#8615)
We recommend not to use this on add-ons.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2020-10-01 20:27:01 -07:00
Wouter Born
bd82ca82df
Migrate tests to JUnit 5 (#8519)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 18:21:26 +02:00
Kai Kreuzer
6df6783b60 added migrated 2.x add-ons
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-21 03:37:19 +02:00