Commit Graph

1220 Commits

Author SHA1 Message Date
Christoph Hofmann
bbede78dc9
Added operationIds for OpenAPI specification (#1861)
Signed-off-by: Christoph Hofmann <christoph@hofmann.pm>
2020-12-10 23:12:11 +01:00
Christoph Weitkamp
fe677966af
[link] Use constructor injection (#1911)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-10 23:07:56 +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
openhab-bot
ff4442b021 Update Crowdin configuration file 2020-12-08 22:25:00 +01:00
silamon
2f5a6269c2
[semantics] Remove semantic metadata on item tag removal (#1860)
* Remove semantic update on tag removal

Fixes #1841

Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-12-08 17:12:14 +01:00
Kai Kreuzer
e075df30f8
Moved modbus transport from addons to core (#1892)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-08 12:55:52 +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
f99135ae3d
Reverted the introduction of an automation threadpool (#1890)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-05 11:50:16 +01:00
silamon
34a3487e3e
Disable AutoUpdateManager for GroupItems (#1862)
* Disable AutoUpdateManager for GroupItems

Fixes #1330 

Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-12-03 17:20:59 +01:00
Kai Kreuzer
85fcb7b141
Cache safe call proxies for profiles instead of continuously recreating them (#1880)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-12-03 09:28:07 +01:00
Wouter Born
6e0a5d0260
Improve tags_nl.properties (#1883)
* Fix wrong Location_Indoor_Floor_SecondFloor translation
* Remove redundant whitespace chars

Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-03 08:37:55 +01:00
lolodomo
5ae3c675c6
[semantics] Property Illuminance removed (#1879)
Related to #1791

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-12-02 20:29:18 +01:00
Christoph Weitkamp
0e7563c901
[automation] Added Actions for Play and Say which sets the volume (#1854)
* Added Actions for Play and Say which sets the volume

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-01 22:57:43 +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
Christoph Weitkamp
cd0654806b
Fixed config description (#1873)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-12-01 08:39:52 +01:00
Christoph Weitkamp
818a7c82fa
Get only relevant links instead of all (#1874)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-30 19:31:18 +01:00
Kai Kreuzer
a892c7bcac
Synchronize the executions of each rule (#1870)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-30 10:31:33 +01:00
Markus Rathgeb
c044061dc4
fix null constraint mismatch in model.thing for generic thing provider (#1872)
The type 'Thing' is not a valid substitute for the type parameter '@NonNull E extends Object'

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2020-11-30 10:27:40 +01:00
Markus Rathgeb
0eaf58f047
fix null type mismatch in model.thing generic thing provider (#1865)
required '@NonNull URI' but this expression has type '@Nullable URI'

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2020-11-30 10:27:16 +01:00
Markus Rathgeb
7885aa3526
fix null type in model.thing generic item channel link provider (#1864)
required '@NonNull Collection<?>' but this expression has type '@Nullable Set<@NonNull String>'

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2020-11-30 10:26:56 +01:00
Kai Kreuzer
575f744a43
Request automation thread pool as a scheduled pool (#1869)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-30 10:18:56 +01:00
Marcel
aa317d8c85
Fix typo in TriggerChannelTypeBuilder (#1866)
Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
2020-11-29 23:07:57 +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
Kai Kreuzer
fe62a4fdae
Make maps thread safe (#1856)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-29 11:02:00 +01:00
Kai Kreuzer
1e2fd7b447
Make rule engine use a threadpool (#1857)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-29 10:56:01 +01:00
Kai Kreuzer
a301e96b6c
sync Jetty versions between compile and runtime (#1845)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-29 10:54:24 +01:00
Christoph Weitkamp
109fae9974
[profiles] Added 'Hysteresis' profile (#1726)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-29 00:21:43 +01:00
Jonathan Gilbert
e8d017da77
Extracted accessor into interface and added to script engine context to allow access to script extensions from script engine factories (#1843)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-11-28 23:24:19 +01:00
Kai Kreuzer
9e89a4dbda
[magic] Added a trigger channel for easier tests (#1853)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-27 15:02:04 +01:00
lolodomo
f6d3f1d560
[semantics] Ontology enhanced (#1814)
Related to #1791

Also-by: Christoph Weitkamp <github@christophweitkamp.de>
Also-by: Mark <m.stroeve@appsoftware.nl>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-26 15:01:33 +01:00
lolodomo
b40d10a978
[inbox REST API] Added new optional pareameter newThingId to approve (#1848)
Fix #1783

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-26 08:37:16 +01:00
Yannick Schaus
6ff65df7d2
[REST Auth] Remove user access to things (#1807)
I can't think of a good reason why listing things or querying their status should be allowed for users.
The things layer should only be of concern to admins IMHO.
As noted here: https://community.openhab.org/t/oh3-will-list-all-your-things-even-if-you-are-not-logged-in/108006/3
passwords and other sensible information in configuration could end up being exposed without auth required.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-26 08:31:10 +01:00
Kai Kreuzer
89767cee9e
removed deprecated author information from bindings (#1844)
* removed deprecated author information from bindings
* removed author tag from itests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-24 19:01:50 +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
Jonathan Gilbert
60edebc111
Pass script context to script engines (#1837)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2020-11-22 10:52:22 +01:00
Yannick Schaus
065177b730
[rest] Add summary option to rules, things, UI components resources (#1827)
The /things, /rules, /ui/components endpoints retrieve all objects
in their entirety, which can become very big, i.e. channels, config
parameters, script rule modules or trees of UI components can
quickly add up to the size.

When the UI simply displays a list of those objects it retrieves all
this extra information but does nothing with it.

This introduces an optional ?summary=true query parameter for the
above resources to limit the output to pre-defined fields which are
deemed most relevant for displaying these lists, omitting the rest.

When the option is not set, the behavior remains unchanged so this
change is not API breaking. The API version has therefore not been
incremented. The client is responsible for adding the option to
retrieve summarized collections instead of the entire objects.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-21 18:40:48 +01:00
Kai Kreuzer
5330de0473
Avoid potential NPE (#1839)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-19 20:13:23 +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
Wouter Born
d5e7fe3ab3
Update LastNPE EEAs to 2.2.1 (#1821)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-11-17 16:29:09 +01:00
Kai Kreuzer
94d6a80493
Create separate DSLScriptEngine instances for every handler (#1819)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-14 20:16:19 +01:00
silamon
d59d3c3cc2
[REST] Apply metadata selector regex on all namespaces (#1756)
* Change metadata selector

Fixes #1692

Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-11-14 17:58:46 +01:00
Yannick Schaus
4e045204ac
[automation] Create Nashorn script engines with the proper class loader (#1799)
This should fix the issue reported here:
https://community.openhab.org/t/openhab-3-0-milestone-2-discussion/107564/8

where the Nashorn script engine would be created with the
current thread's class loader, causing JS code like this:
```
var Log = Java.type("org.openhab.core.model.script.actions.Log");
Log.logError("Experiments", "This is an OH error log");
Log.logWarn("Experiments", "This is an OH warn log");
Log.logInfo("Experiments", "This is an OH info log");
Log.logDebug("Experiments", "This is an OH debug log");
```
to run fine when the rule was triggered but fail to find the Log
class when run from the REST API's `/rest/rules/{ruleUID}/runnow`,
because in that case the generic createScriptEngine implementation
would return script engines using the JAX-RS class loader as the
"app" class loader.

Note:
We also have an opportunity to restrict which classes are exposed
to the script with a ClassFilter to a specific set:
https://docs.oracle.com/javase/8/docs/jdk/api/nashorn/jdk/nashorn/api/scripting/NashornScriptEngineFactory.html#getScriptEngine-java.lang.String:A-java.lang.ClassLoader-jdk.nashorn.api.scripting.ClassFilter-
This could prove useful to mitigate code execution vulnerabilities,
as the script code is modifiable remotely.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-14 15:17:33 +01:00
Christoph Weitkamp
7cb746ece1
Changed comparison from equals() to reference (#1817)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-14 13:46:03 +01:00
lolodomo
8102cffb7f
Log reason for rules/scripts refresh (#1812)
* Log reason for rules/scripts refresh

Fixes #1293

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-13 21:38:35 +01:00
Kai Kreuzer
7d2a505e13
[automation] Correctly map the state context variable of the ItemStateEvent to the implicit var newState (#1809)
Fixes #1802 

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-13 07:29:56 +01:00