Commit Graph

232 Commits

Author SHA1 Message Date
openhab-bot
0972ad5ede
New Crowdin updates (#2336)
* New translations addons.properties (French)
* New translations audio.properties (Hebrew)
* New translations audio.properties (Hungarian)
* New translations chart.properties (Finnish)
* New translations chart.properties (French)
* New translations ephemeris.properties (Hebrew)
* New translations firmware.properties (Finnish)
* New translations i18n.properties (Hebrew)
* New translations inbox.properties (Hebrew)
* New translations jsonStorage.properties (French)
* New translations LanguageSupport.properties (Finnish)
* New translations network.properties (Hebrew)
* New translations persistence.properties (French)
* New translations persistence.properties (Hebrew)
* New translations SystemProfiles.properties (Hebrew)
* New translations tags.properties (Hebrew)
* New translations voice.properties (Hebrew)
2021-05-02 11:40:36 +02:00
openhab-bot
f2bf0a26c9
New Crowdin updates (#2326)
* New translations DefaultSystemChannels.properties (Hebrew)

* New translations addons.properties (German)

* New translations voice.properties (German)

* New translations chart.properties (German)

* New translations persistence.properties (German)

* New translations ephemeris.properties (German)

* New translations inbox.properties (German)

* New translations audio.properties (German)

* New translations DefaultSystemChannels.properties (Portuguese, Brazilian)

* New translations voice.properties (German)

* New translations messages.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations audio.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations audio.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations voice.properties (Dutch)

* New translations voice.properties (Ukrainian)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations persistence.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations audio.properties (Italian)

* New translations inbox.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations voice.properties (Italian)

* New translations addons.properties (Italian)

* New translations restauth.properties (Italian)

* New translations firmware.properties (Luxembourgish)

* New translations firmware.properties (Italian)

* New translations messages.properties (Luxembourgish)

* New translations tags.properties (Finnish)

* New translations units.properties (Finnish)

* New translations validation.properties (Italian)

* New translations LanguageSupport.properties (Italian)

* New translations persistence.properties (Italian)

* New translations chart.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations network.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (Portuguese, Brazilian)

* New translations network.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations restauth.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations ephemeris.properties (Portuguese, Brazilian)

* New translations inbox.properties (Portuguese, Brazilian)

* New translations audio.properties (Portuguese, Brazilian)

* New translations i18n.properties (German)

* New translations network.properties (German)

* New translations jsonStorage.properties (German)

* New translations restauth.properties (German)
2021-04-30 18:19:50 +02:00
Christoph Weitkamp
93d7973b56
[i18n] Translation of configurable services (#2306)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-29 15:20:55 +02:00
Christoph Weitkamp
c9cdf5d0e8
Added i18n propertie files for DefaultSystemChannels and Profiles (#2297)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-19 17:06:42 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings (#2291)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
Sönke Küper
db488d861e
[automation] Added rule rest endpoint and backend operation for rule execution simulation (#2125)
* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <soenkekueper@gmx.de>
2021-04-11 09:31:48 +02:00
Wouter Born
07b95ca668
Fix SAT findings (#2256)
Fixes 65 SAT findings.

Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:18:08 +01:00
Christoph Weitkamp
26e9a8ed9c
Added nullness annotations to fix NPE in HttpServiceUtil (#2234)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-03-12 22:12:03 +01:00
Hilbrand Bouwkamp
7fef42c6c8
[scheduler] Mitigation fix for earlier triggers #1976 (#2190)
Some users reported the scheduler to be run to earlier.
It actual is known the Java scheduler can drift.
To handle this problem 2 changes have been made:
1. If the scheduler triggers > 2 sec before expected end time it will
reschedule.
2. The scheduler keeps track of the timestamp the job should run. For
recurring schedulers, like cron, when the next job is run it offsets of
the calculated time, and not the actual time. This guaranties that the
next scheduled time is actual the next scheduled time and not the same
end time in case the scheduler would trigger to early.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2021-02-27 11:21:10 +01:00
Christoph Weitkamp
7907f48735
Added nullness annotations to TypeParser (#2181)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-02-07 09:47:27 +01:00
Wouter Born
46666eb169
Fix deprecations (#2163)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-30 12:22:31 +01:00
pravussum
75f52ac3ee
add getPoolNames method to ThreadPoolManager (#2065)
Signed-off-by: Robert Bach <openhab@mortalsilence.net>
2021-01-05 23:27:35 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
Kai Kreuzer
a91f8c657b Align all threads to naming convention (#2018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-28 09:22:13 +01:00
t2000
caaf1c7281
Expire group item states (#2009)
Fixes #1989

Signed-off-by: Stefan Triller <github@stefantriller.de>
2020-12-26 22:53:26 +01:00
Wouter Born
ce95ed191e
Hide StateDescription constructor (#1995)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-23 21:43:38 +01:00
Gaël L'hopital
f7e03397fb
[OAuth] Added capability for custom deserializer (#1891)
* Added capability for custom deserializer

Closes #1888

Signed-off-by: clinique <gael@lhopital.org>
2020-12-23 15:40:54 +01:00
Hilbrand Bouwkamp
df2013805b
Fix for invalid day of week max check (#1986)
Closes #1813

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2020-12-22 20:42:37 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Kai Kreuzer
0dd4cc97fe
Let StartLevelService only start once its configuration is available (#1942)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-16 12:47:03 +01:00
Kai Kreuzer
1a2c81d9e2
Improved startup logging and avoid scripts being loaded in start level service thread (#1919)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-13 09:31:09 +01:00
Kai Kreuzer
076ac3fe15
Implemented start level service (#1914)
Fixes #1637
Fixes #1777
Fixes #1734
Fixes #1823
Fixes #1808

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-12 14:34:37 +01:00
Wouter Born
fea6237153
Improve ChannelLinkNotifier.removed and AbstractUID.getAsString performance (#1909)
Fixes #1908

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-10 10:20:35 +01:00
Wouter Born
0dabc63423
Update "o.e.sh" references (#1910)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-10 10:15:48 +01:00
Markus Rathgeb
406f83cbb6
HexUtils: fix empty string handling (#1907)
Fixes #1903

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2020-12-09 09:57:39 +01:00
Wouter Born
0abf1aa987
Remove SmartHome leftovers (#1901)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-08 12:49:06 +01:00
Wouter Born
13c2d7bf2b
Rename classes with "SmartHome" in their name (#1896)
* Rename SmartHomeUnits to Units
* Rename SmartHome Servlets and HTTP Context

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-06 23:35:37 +01:00
Kai Kreuzer
c5f133b3e9
[automation] Provide triggering item name in the rule context (#1770)
* introduced implicit variable "triggeringItemName"

Fixes #1768

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-01 20:29:50 +01:00
Kai Kreuzer
f2e1dea5bf
Adapted event handler thread names to naming convention (#1858)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-29 11:12:03 +01:00
silamon
9a12f95dee
Remove the groupname from the members if the group item is removed (#1833)
Remove the groupname from the members if the group item is removed.
This is implemented in the ManagedItemProvider.

Fixes #1785
Fixes #1392

Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-11-22 12:24:38 +01:00
Christoph Weitkamp
ddaf0d46fd
Added support for MetricPrefix combined with byte and use byte as default instead of octet (#1838)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-19 19:33:10 +01:00
Kai Kreuzer
63ec4342f2
Added expire functionality as core framework feature (#1803)
* Added expire functionality as core framework feature

Closes #1620

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-19 14:15:02 +01:00
Kai Kreuzer
70ca7655a2
Harden item creation by checking for validity of name (#1825)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-18 00:18:00 +01:00
Kai Kreuzer
c2b3885e9e
Do not provide unit information for plain number items (#1811)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-12 22:13:28 +01:00
Wouter Born
2f2bfde500
Remove Map null annotation workarounds (#1780)
These workarounds to prevent false positives can be removed now the EEAs allow for proper null analysis.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 22:12:22 +01:00
Wouter Born
0281c10036
[infrastructure] add external null-annotations (#1775)
Add EEAs and fix null analysis errors.

Related to:

* #888
* openhab/openhab-addons#8848

Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-03 21:33:48 +01:00
Christoph Weitkamp
a598fa94f4
Fixed provider comparison (#1792)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-03 18:00:28 +01:00
Christoph Weitkamp
5683cc2472
Revert ordering of accepted data types for 'StringItem' (#1776)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-30 15:15:03 +01:00
Christoph Weitkamp
25683471e8
Revert ordering of accepted datatypes for StringItem (#1774)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-29 08:45:21 +01:00
Christoph Weitkamp
172ee2f0ad
Replaced static inline declarations by List.of() method (#1755)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-25 15:20:30 +01:00
Christoph Weitkamp
8744bc10fe
[cache] Added 'ByteArrayFileCache' (#1723)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-10-25 12:06:30 +01:00
Yannick Schaus
8b52cab5ef
[REST Auth] API tokens & openhab:users console command (#1735)
This adds API tokens as a new credential type. Their format is:
`oh.<name>.<random chars>`

The "oh." prefix is used to tell them apart from a JWT access token,
because they're both used as a Bearer authorization scheme, but there
is no semantic value attached to any of the other parts.

They are stored hashed in the user's profile, and can be listed, added
or removed managed with the new `openhab:users` console command.

Currently the scopes are still not checked, but ultimately they could
be, for instance a scope of e.g. `user admin.items` would mean that the
API token can be used to perform user operations like retrieving info
or sending a command, _and_ managing the items, but nothing else -
even if the user has more permissions because of their role (which
will of course still be checked).

Tokens are normally passed in the Authorization header with the Bearer
scheme, or the X-OPENHAB-TOKEN header, like access tokens.
As a special exception, API tokens can also be used with the Basic
authorization scheme, **even if the allowBasicAuth** option is not
enabled in the "API Security" service, because there's no additional
security risk in allowing that. In that case, the token should be
passed as the username and the password MUST be empty.

In short, this means that all these curl commands will work:
- `curl -H 'Authorization: Bearer <token>' http://localhost:8080/rest/inbox`
- `curl -H 'X-OPENHAB-TOKEN: <token>' http://localhost:8080/rest/inbox`
- `curl -u '<token>[:]' http://localhost:8080/rest/inbox`
- `curl http://<token>@localhost:8080/rest/inbox`

2 REST API operations were adding to the AuthResource, to allow
authenticated users to list their tokens or remove (revoke) one.
Self-service for creating a token or changing the password is more
sensitive so these should be handled with a servlet and pages devoid
of any JavaScript instead of REST API calls, therefore for now they'll
have to be done with the console.

This also fixes regressions introduced with #1713 - the operations
annotated with @RolesAllowed({ Role.USER }) only were not authorized
for administrators anymore.

* Generate a unique salt for each token

Reusing the password salt is bad practice, and changing the
password changes the salt as well which makes all tokens
invalid.

Put the salt in the same field as the hash (concatenated
with a separator) to avoid modifying the JSON DB schema.

* Fix API token authentication, make scope available to security context

The X-OPENHAB-TOKEN header now has priority over the Authorization
header to credentials, if both are set.

* Add self-service pages to change password & create new API token

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-10-25 12:04:40 +01:00
Wouter Born
4c31c0b3ff
Fix issues with configuration PIDs (#1727)
* Fixes warnings about "using different service PIDs"
* Fixes missing default values

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-18 18:02:13 +02:00
Wouter Born
3d88e91952
Open ProviderTracker asynchronously when activating AbstractRegistry (#1719)
* Open ProviderTracker asynchronously when activating AbstractRegistry

Fixes #890

Signed-off-by: Wouter Born <github@maindrain.net>
2020-10-18 00:31:13 +02:00
Kai Kreuzer
70fed5a9c2
Fixed initialization of group items with aggregation functions (#1718)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-15 23:03:22 +02:00
Kai Kreuzer
e9ffff9f01
Fixed name of measurement systems (#1717)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-10-14 22:46:55 +02:00
Christoph Weitkamp
fc65deca01
Reduced logging level to warn (#1657)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-19 16:00:37 +02:00
Kai Kreuzer
fa18610d77
[core] Make logger in QuantityType transient (#1652)
This makes QuantityType serialisable

Fixes #1651

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-19 09:57:42 +02:00
Christoph Weitkamp
eab9be1410
Removed deprecated constructors and methods from Thing API (#1414)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-09-13 13:53:12 +02:00