2016-05-14 19:23:24 +00:00
---
layout: documentation
2016-08-05 10:10:20 +00:00
title: Persistence
2016-05-14 19:23:24 +00:00
---
2016-12-04 00:41:13 +00:00
# Persistence
2016-05-14 19:23:24 +00:00
2017-10-20 11:35:07 +00:00
openHAB can store data over time; this is known as persistence.
The data may be retrieved at a later time, for example to restore your system after startup, or to prepare graphs for display on a UI.
2016-12-04 00:41:13 +00:00
2022-01-15 09:13:38 +00:00
openHAB ships with the [rrd4j persistence service ](addons/persistence/rrd4j/ ) installed by default, which persists every Item on every state change and at least once a minute. Additionally, it restores the last stored value at system startup. To change this behaviour see [Persistence Configuration ](#persistence-configuration ).
2017-10-20 11:35:07 +00:00
openHAB persists Item states in a database, and most popular databases are supported.
2017-11-03 17:16:59 +00:00
You may have more than one persistence add-on loaded, and each of these may be configured independently.
2016-12-04 00:41:13 +00:00
2018-11-05 19:53:05 +00:00
A complete list of supported persistence add-ons may be found in the [persistence ](/addons/#persistence ) section of the on-line openHAB documentation.
2017-10-20 11:35:07 +00:00
2018-07-13 20:14:47 +00:00
Please refer to the [available persistence service add-on ](/addons/#persistence ) documentation for your selected persistence add-on for configuration instructions.
2017-10-20 11:35:07 +00:00
## Default Persistence Service
2022-01-31 19:14:07 +00:00
You should configure a default persistence service even if you have only one persistence add-on installed.
The default persistence service is used to provide data for the UI charting features and rules (you may choose to use another persistence service in either of these, configured on a case-by-case basis).
2017-10-20 11:35:07 +00:00
2021-01-16 09:07:41 +00:00
To select a default persistence service, in UI, select `Settings->Persistence` .
Select your default service from the drop-down list.
2017-10-20 11:35:07 +00:00
Note that you must first install a persistence add-on before you make this selection.
Be sure to save your choice once you have selected your default service.
2017-11-03 17:16:59 +00:00
## Persistence Configuration
The information below allows you to determine which Item states are persisted, when they are persisted, and where they are stored.
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
Persistence Strategies are configured in a file named `<persistenceservice>.persist` , stored in `$OPENHAB_CONF/persistence` .
Replace "persistenceservice" with the name of your persistence add-on (e.g. `rrd4j.persist` ).
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
### Persistence Triggers
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
The persistence of an Item's state may be triggered when that Item changes state or when the Item is updated (even if its state did not change).
Persistence may also be triggered by a time-related event (see Cron Persistence Triggers below).
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
### Strategies
2017-10-20 11:35:07 +00:00
2022-11-26 12:09:56 +00:00
This section allows you to name and define one or more `Strategies` .
2017-11-03 17:16:59 +00:00
The syntax is as follows:
2017-10-20 11:35:07 +00:00
```java
Strategies {
2017-11-03 17:16:59 +00:00
< strategyName1 > : "cronexpression1"
< strategyName2 > : "cronexpression2"
...
2017-10-20 11:35:07 +00:00
}
```
2017-11-03 17:16:59 +00:00
#### Predefined Strategies
The following strategies are defined internally and may be used in place of `strategyName` above:
- `everyChange` : persist the Item state whenever its state has changed
- `everyUpdate` : persist the Item state whenever its state has been updated, even if it did not change
- `restoreOnStartup` : load and initialize the last persisted state of the Item on openHAB startup (if the Item state is undefined (`UNDEF`)).
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
#### Cron Persistence Triggers
2021-01-10 12:50:59 +00:00
Merge 2.5.x into main (#1266)
* Update README (2.5.x) (#1153)
Change branch name.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update items.md (#1156)
* Added var and VA units to UoM (#1146)
VA (Volt-Ampere - apparent power) and var (Volt-Ampere reactive) are used to measure power and energy consumption in AC circuits.
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* Fix filepath to keystore (#1148)
Default openHAB userdata environment variable should be `$OPENHAB_USERDATA`, not `$USER_DATA` shouldn't it? At least, this is the default on my fresh openHABian and also the most popular variant to find in the docs.
* Slight language corrections (#1150)
I think it reads better this way
Signed-off-by: Richard Davies <rwdrich@gmail.com>
* additional example for non default persistence service (#1152)
For me it was confusing how to pass on the serviceId into methods that already had an argument. An extra example is always good.
Signed-off-by: jaco <jaco.waes@gmail.com>
* Adding 12 new logos for OH Add-Ons page on website (#1158)
Signed-off-by: bracklanna bracklanna@users.noreply.github.com
* Added missing preset variables (#1104)
* Added missing preset variables
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Cleaned up blank lines, fixed table, and added file name for SimpleRule
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Fix broken link (#1165)
* Added Hotlink from "label" section to "state presentation" (#1167)
* Added note about broken action (#1164)
* Added note about broken action
See https://github.com/openhab/openhab-core/issues/1374
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Update index.md (#1170)
Link appears to be wrong and does not work when I click on it in Edge. Loads the same page again instead of loading the correct new page from the hyperlink.
https://www.openhab.org/docs/developer/guidelines.html
* Added Airthings logo (#1171)
* typo in exambp (#1172)
`Temperature.averageSince(now.minusMinutes(5),"influxdb")`
* file.encoding=UTF-8 (#1173)
* Update demo URL and add demo.rules URL (#1174)
Based on: https://community.openhab.org/t/demo-setup-missing/94850
Old Link is broken leading to 404.
The link to the demo.rules on github is an extra :)
* Replace outdated zulu.org link. (#1177)
* Replace outdated zulu.org link.
As of 3/23/2020 zulu.org has an SSL cert that expired on 9/28/2019. Changed link to azul.com/downloads, since that appears to be the new official source.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Changed all http links to https for installation/index.md.
All changed links working, tested on 3/24/2020.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Minor language tweak (#1178)
* Ending an active scan/stopScan (#1179)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add files via upload (#1184)
* Update persistence.md (#1185)
Clarify return objects for max/min rules extensions.
Signed-off-by: Ross Kennedy rossko@culzean.clara.co.uk
* Update things.md (#1186)
Amended example code to include using label and location when defining a Thing with a bridge that is defined elsewhere.
* Correct typos (#1190)
* Correct usage of its/it's
"It's" is always a contraction of "it is" or "it has". "Its" is a
possessive. Correct a few places where they were used backwards.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct "Z-Wave" spelling
Per https://www.z-wave.com/, the canonical spelling appears to be "Z-Wave".
Most places use "Z-Wave" already; change the remaining references to match.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct typos and grammatical errors
Correct some typos and grammatical errors.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Update sitemap.md section charts (#1191)
I observed that the unique first word in the labels of items charted in a group isn't causing an empty chart anymore. I'm on openHAB 2.5.1.
Signed-off-by: Juergen Baginski opus42@gmx.de
* Add image for insteon binding (#1196)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* typo (#1198)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Installation details (#1197)
Added more details around the installation and configuration process.
Fixed that engine no longer logs "Activated scripting support..."
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update sitemaps.md (#1202)
Added full item definition for usage of visibility. See https://community.openhab.org/t/sitemap-visibility-basic-ui/97304/9
* Updated ecobee logo (https://brand.ecobee.com/) (#1203)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* tutorial: Fix description of sitemap 'type' (#1204)
In the tutorial, the generic sitemap description says that ItemType has
to be the same as the type defined in default.items.
Looking at
https://www.openhab.org/docs/configuration/items.html#type and
https://www.openhab.org/docs/configuration/sitemaps.html#element-types
this is incorrect as they take different values.
The example is even mislading as `Switch` is one of the only types which
is common between items and sitemaps. Might be better to describe
`Default` instead.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
* Added information about DateTime Group functions LATEST/EARLIEST (#1206)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Add section for documentation contributions (#1205)
Hopefully this will lower the hurdle for people to submit documentation contributions. I know from myself that I didn't submit various documentation improvements, because I didn't know git and thought it would be a much more involved process.
Ideally there would be a separate documentation section, but submitting this under the development contribution page for now (as per discussion with @Confectrician in https://github.com/openhab/openhab-docs/pull/1179#issuecomment-605642091).
Note that I am addressing the issue of DCO failures wrt specifying the full name that I ran into myself in https://github.com/openhab/openhab-docs/pull/1197#issuecomment-615597308. I found a good discussion of the issue at https://github.com/probot/dco/issues/43.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* fix typo (#1209)
* add description of Ephemeris localization support (#1210)
Add a new section to describe the localization support and how-to steps
Signed-off-by: Michael Roßner Schrott.Micha@web.de
* Line 115 broken link - should be: (#1217)
* Line 115 broken link - should be:
({{base}}/docs/configuration/sitemaps.html#element-types)
was:
({{base}}/configuration/configuration/sitemaps.html#element-types)
* Removed diplicated docs breadcrumb
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* add missing space between words (#1212)
* Update configuration.md (#1215)
I'm a beginner myself. Though I liked this tutorial very much, it took me some time trying and erroring and finally reading forum posts to get behind this. I didn't even know there was something like a more modern ping. So maybe others are happy to learn this right from the beginning.
* Remove architecture from Docker tags (#1220)
Docker automatically detects the architecture and downloads the appropriate image (openhab/openhab-docker#213).
BuildKit will no longer generate new tags having the architecture (openhab/openhab-docker#293).
Signed-off-by: Wouter Born <github@maindrain.net>
* slight readability improvements (#1221)
* slight readability improvements
* Update introduction.md
* Update introduction.md
* minor wording update
* Update eclipse.md (#1225)
Clarifying that it's no longer possible to make changes in the Core Framework for 2.5.x.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* [fmiweather] logo for FMI Weather binding (#929)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* Update eclipse.md (#1226)
Added additional structure around install, run, debug and update steps. Provided more pointers to interactions with Eclipse, Maven and Git.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1227)
Need to escape \< and \> in the sign off message format so users see them explicitly in the Contributing to the Documentation section.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1228)
Small refinement on documentation change submission flow.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add doc folder to the binding directory structure (#1230)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Make Subheadings Use Proper Subheading Syntax (#1234)
This way they render out as proper markdown and don't look weird on the website
Signed-off-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* Remove unnecessary isCancelled() from code example (#1235)
Cancelling an already canceled task has no effect. IMHO this check is not necesssary and removal would simplify the code. I came to this because I saw this pattern in many bindings during reviewing.
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Update thing-xml.md (#1236)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Fix broken ESH links (#1231)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update logging.md (#1238)
Add information on how to find out the symbolic names of the bundles
* Remove Apache Commons from Default Libraries (#1229)
See openhab/openhab-addons#7722
Signed-off-by: Fabian Wolter <git@fabian-wolter.de>
* Update introduction.md (#1239)
* Update introduction.md
Signed-off-by: Markus Storm markus.storm@gmx.net
* Update introduction.md
* Revise Java recommendations (#1240)
* Revise Java recommendations
* Delete pine.md
Do not recommend PINE, it's not supported any longer by openHABian.
* Removed sidebar link in config
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Update security.md (#1241)
Been using FreeDNS for many years (ever since all these companies got rid of their free tiers) and never an issue!
* Fix DecimalType hex conversion example (#1243)
See: https://github.com/openhab/openhab-core/issues/1526
Signed-off-by: Wouter Born <github@maindrain.net>
* Fix typo (#1244)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update persistence.md (#1246)
Fixes link to quartz docs page.
* Revision. (openhab#1187) (#1237)
* Revision. (openhab#1187)
- Update of screenshots, removal of old screenshots
- Chapters for better formatting
- Removal of ZWave chapter (one example of adding things should be enough IMHO)
- Adding items in simple mode and in "manual" mode
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
* Use one line per sentence
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Add notes for configuring Synology Diskstation (#1219)
* Add notes for configuring Synology Diskstation
I have a working set up for SSL enabled remote access on a Synology diskstation, taking advantage of the GUI as much as possible, to ensure automatic renewal of certs from Let's Encrypt, etc. It took me about 8 hours to suss it all out, but it could be achieved in about 30 mins if you knew exactly what to do... may not be widely useful, but since Synology is officially supported, I figured this might be a good addition.
There's also a minor error in the 'allow' masks - these should be 192.168.0.0/24 to allow access to anything in the 192.168.0.xxx range.
* Updated to use one line per sentence
Updated to use one line per sentence - sorry for the delay!
* Update security.md
* Updated for one line per sentence
Updated for one line per sentence
Signed-off-by: Andrew Mills mills@prettymachine.co.nz
* Bad subnet (#1245)
Nginx warns about low address bits of `192.168.0.1/24` because they are meaningless.
The correct subnet mask should be `192.168.0.0/24`
Signed-off-by: Olivier Béraud <olivierberaud@free.fr>
* Fixed broken images. (#1247)
* Fixed broken images.
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* Fix image path
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* [documentation] clarification of representation property (#1248)
* [documentation] clarification of representation property
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopt suggestions of reviewers
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] commas
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] addopted suggestions of @bobadair
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] example added back
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] simplified text
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopted reviewer comment
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add Alexa mapping along side a channel mapping (#1249)
* Add Alexa mapping along side a channel mapping
It took me a while to find this https://community.openhab.org/t/tagging-devices-for-alexa-support/98155/3 on the Forum and its not clearly documented in the openHAB Amazon Alexa Smart Home Skill or here in Item Metadata.
I originally suggested this as an update to the openHAB Amazon Alexa Smart Home Skill documentaion, but it fits better here, then other integrations using metadata (e.g. HomeKit or Google Assistant) could refer to it as well.
* Update items.md
* Mention defaults for element type setpoint. (#1250)
Mention defaults for min, max and step value for element type setpoint.
Signed-off-by: Thomas Weiler <toweosp@gmail.com>
* Update index.md (#1251)
I thought 'workl' was probably intended to be 'work'.
* Items - Bedroom_Light written as Light_Bedroom (#1252)
Fix small error which might mislead some readers.
* Added example for time-weighted averages (#1253)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Remove deprecated UIs, Eclipse Marketplace from sidebar
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update branch name in README
Signed-off-by: Yannick Schaus <github@schaus.net>
Co-authored-by: Markus Storm <markus.storm@gmx.net>
Co-authored-by: Nagy Attila Gábor <mrbig@sneaker.hu>
Co-authored-by: Christoph Thiede <38782922+LinqLover@users.noreply.github.com>
Co-authored-by: Richard Davies <rwdrich@gmail.com>
Co-authored-by: jwaes <50528773+jwaes@users.noreply.github.com>
Co-authored-by: bracklanna <16140600+bracklanna@users.noreply.github.com>
Co-authored-by: Scott Rushworth <openhab@5iver.com>
Co-authored-by: cpmeister <mistercpp2000@gmail.com>
Co-authored-by: Ross Kennedy <rossko@culzean.clara.co.uk>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Co-authored-by: Skinah <32607303+Skinah@users.noreply.github.com>
Co-authored-by: pali <pauli.anttila@gmail.com>
Co-authored-by: ljsquare <laurens-jan@merkx-ewals.nl>
Co-authored-by: PatrikG <40170469+PatrikG8@users.noreply.github.com>
Co-authored-by: Elias H <E.Hackradt@web.de>
Co-authored-by: Billy Stevens <contact@wasv.me>
Co-authored-by: theiding <mark.theiding@gmail.com>
Co-authored-by: jadcx <60408305+jadcx@users.noreply.github.com>
Co-authored-by: Bjorn Helgaas <bjorn@helgaas.com>
Co-authored-by: Jürgen Baginski <opus42@gmx.de>
Co-authored-by: robnielsen <rob.nielsen@yahoo.com>
Co-authored-by: GumbyMan82 <40233411+GumbyMan82@users.noreply.github.com>
Co-authored-by: Christophe Fergeau <teuf@gnome.org>
Co-authored-by: Paulo "JCranky" Siqueira <paulo.siqueira@gmail.com>
Co-authored-by: Michael Rossner <Schrott.Micha@web.de>
Co-authored-by: BugSmurF <52825547+bugsmurf@users.noreply.github.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: josefscript <64727123+josefscript@users.noreply.github.com>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
Co-authored-by: TRS-80 <25938297+TRSx80@users.noreply.github.com>
Co-authored-by: sihui <10405486+sihui62@users.noreply.github.com>
Co-authored-by: Andrew Mills <amil109@users.noreply.github.com>
Co-authored-by: Olivier Béraud <olivbd@users.noreply.github.com>
Co-authored-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: LeeC77 <LeeC77@users.noreply.github.com>
Co-authored-by: Thomas Weiler <18066810+toweosp@users.noreply.github.com>
Co-authored-by: garretcook <garretcook@gmail.com>
Co-authored-by: Michael Fielding <michael.fielding@gmail.com>
2020-09-21 11:29:39 +00:00
openHAB uses [Quartz ](https://www.quartz-scheduler.org/documentation ) for time-related cron events.
2017-11-19 20:04:22 +00:00
See the [Rules article ]({{base}}/configuration/rules-dsl.html#time-based-triggers ) for more information.
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
### Items
2017-10-20 11:35:07 +00:00
This section defines which items should be persisted with which strategy.
The syntax is as follows:
```java
Items {
2017-11-03 17:16:59 +00:00
< itemlist1 > [-> "< alias1 > "] : [strategy = < strategy1 > , < strategy2 > , ...]
2017-10-20 11:35:07 +00:00
< itemlist2 > [-> "< alias2 > "] : [strategy = < strategyX > , < strategyY > , ...]
...
}
```
where `<itemlist>` is a comma-separated list consisting of one or more of the following options:
- `*` - this line should apply to all items in the system
- `<itemName>` a single Item identified by its name. This Item can be a group Item. But note that only the group value will be persisted. The value of the individual group members will not be persisted using this option.
2022-11-26 12:09:56 +00:00
- `<groupName>*` - all members of this group will be persisted, but not the group itself.
2021-01-10 18:47:15 +00:00
Optionally, an alias may be provided if the persistence service requires special names (e.g. a table to be used in a database, a feed id for an IoT service, etc.)
Note that `*` is NOT a wildcard match character in this context.
2017-10-20 11:35:07 +00:00
2023-02-06 08:57:29 +00:00
The entries are additive.
2023-02-06 09:11:52 +00:00
This means if one Item appears in more than one `<itemlist>` either directly or indirectly (e.g. `*` which includes all Items or as a member of a Group used in `<groupName>*` ), all the strategies strategies listed on all those lines apply to that Item.
2023-02-06 08:57:29 +00:00
2017-11-03 17:16:59 +00:00
Below you will find a complete example persistence configuration file:
```java
// persistence strategies have a name and definition and are referred to in the "Items" section
2017-10-20 11:35:07 +00:00
Strategies {
2018-06-18 12:40:05 +00:00
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
2017-10-20 11:35:07 +00:00
}
/*
* Each line in this section defines for which Item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* Item (excl. the group Item itself).
*/
Items {
2017-11-03 17:16:59 +00:00
// persist the Item state of Heating_Mode and Notifications_Active on every change and restore them from the db at startup
Heating_Mode, Notifications_Active: strategy = everyChange, restoreOnStartup
2017-10-20 11:35:07 +00:00
// additionally, persist all temperature and weather values every hour
Temperature*, Weather* : strategy = everyHour
}
```
2017-11-03 17:16:59 +00:00
## Restoring Item States on Restart
2017-10-20 11:35:07 +00:00
2019-03-17 18:37:49 +00:00
When restarting your openHAB installation you may find there are times when your logs indicate some Items have the state `NULL` .
2017-10-20 11:35:07 +00:00
This is because, by default, Item states are not persisted when openHAB restarts - even if you have installed a persistence add-on.
2019-03-17 18:37:49 +00:00
In order for items to be persisted across openHAB restarts, you must define a `restoreOnStartup` strategy for your items.
Then whatever state they were in before the restart will be restored automatically.
The following example persists two items on every change and restores them at startup:
2017-10-20 11:35:07 +00:00
```java
Strategies {
2022-11-26 12:09:56 +00:00
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
2017-10-20 11:35:07 +00:00
}
Items {
2019-03-17 18:37:49 +00:00
item1, item2 : strategy = everyChange, restoreOnStartup
2017-10-20 11:35:07 +00:00
}
```
2019-03-17 18:37:49 +00:00
2021-01-10 12:50:59 +00:00
It is usually not necessary to restore all Items since there is a good chance that they are no longer accurate (switches may have been toggled, sensor values are likely to have changed), and the restoration may result in unwanted rule actions.
2017-10-20 11:35:07 +00:00
2017-11-03 17:16:59 +00:00
## Persistence Extensions in Scripts and Rules
2017-10-20 11:35:07 +00:00
To make use of persisted states inside scripts and rules, a few useful extensions have been defined on items.
2017-11-03 17:16:59 +00:00
Note that these extensions are only available to be applied to Items.
They are not generally available for use in Scripts or Rules.
2017-10-20 11:35:07 +00:00
Example:
The statement
`Temperature.historicState(now.minusDays(1))`
will return the state of the Item "Temperature" from 24 hours ago.
You can easily imagine that you can implement very powerful rules using this feature.
Here is the full list of available persistence extensions:
2022-12-04 13:02:09 +00:00
| Persistence Extension | Description |
|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<item>.persist` | Persists the current State of the Item |
| `<item>.lastUpdate` | Returns the last timestamp a given Item was persisted |
| `<item>.historicState(ZonedDateTime)` | Retrieves the State of an Item at a certain point in time (returns HistoricItem) |
| `<item>.changedSince(ZonedDateTime)` | Checks if the State of the Item has (ever) changed since a certain point in time |
| `<item>.changedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the State of the Item has (ever) changed between certain points in time |
| `<item>.updatedSince(ZonedDateTime)` | Checks if the state of the Item has been updated since a certain point in time |
| `<item>.updatedBetween(ZonedDateTime, ZonedDateTime)` | Checks if the state of the Item has been updated between certain points in time |
| `<item>.maximumSince(ZonedDateTime)` | Gets the maximum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
2023-03-09 17:57:09 +00:00
| `<item>.maximumBetween(ZonedDateTime, ZonedDateTime)` | Gets the maximum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
2022-12-04 13:02:09 +00:00
| `<item>.minimumSince(ZonedDateTime)` | Gets the minimum value of the State of a persisted Item since a certain point in time (returns HistoricItem) |
| `<item>.minimumBetween(ZonedDateTime, ZonedDateTime)` | Gets the minimum value of the State of a persisted Item between certain points in time (returns HistoricItem) |
| `<item>.averageSince(ZonedDateTime)` | Gets the average value of the State of a persisted Item since a certain point in time. This method uses a time-weighted average calculation (see example below) |
2022-06-08 15:59:42 +00:00
| `<item>.averageBetween(ZonedDateTime, ZonedDateTime)` | Gets the average value of the State of a persisted Item betwen certain points in time. This method uses a time-weighted average calculation (see example below) |
2022-12-04 13:02:09 +00:00
| `<item>.deltaSince(ZonedDateTime)` | Gets the difference in value of the State of a given Item since a certain point in time |
| `<item>.deltaBetween(ZonedDateTime, ZonedDateTime)` | Gets the difference in value of the State of a given Item between certain points in time |
| `<item>.evolutionRate(ZonedDateTime)` | Gets the evolution rate of the state of a given Item since a certain point in time (returns DecimalType) |
| `<item>.evolutionRate(ZonedDateTime, ZonedDateTime)` | Gets the evolution rate of the state of a given Item between certain points in time (returns DecimalType) |
| `<item>.deviationSince(ZonedDateTime)` | Gets the standard deviation of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.deviationBetween(ZonedDateTime, ZonedDateTime)` | Gets the standard deviation of the state of the given Item between certain points in time (returns DecimalType) |
| `<item>.varianceSince(ZonedDateTime)` | Gets the variance of the state of the given Item since a certain point in time (returns DecimalType) |
| `<item>.varianceBetween(ZonedDateTime, ZonedDateTime)` | Gets the variance of the state of the given Item between certain point sin time (returns DecimalType) |
| `<item>.previousState()` | Gets the previous State of a persisted Item (returns HistoricItem) |
| `<item>.previousState(true)` | Gets the previous State of a persisted Item, skips Items with equal State values and searches the first Item with State not equal the current State (returns HistoricItem) |
| `<item>.sumSince(ZonedDateTime)` | Gets the sum of the previous States of a persisted Item since a certain point in time |
| `<item>.sumBetween(ZonedDateTime, ZonedDateTime)` | Gets the sum of the previous States of a persisted Item between certain points in time |
2017-11-03 17:16:59 +00:00
2022-11-26 12:09:56 +00:00
These extensions use the [default persistence service ](#default-persistence-service ).
2017-11-03 17:16:59 +00:00
You may specify a different persistence service by appending a String as an optional additional parameter at the end of the extension.
2021-01-10 15:01:56 +00:00
### Examples
Merge 2.5.x into main (#1266)
* Update README (2.5.x) (#1153)
Change branch name.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update items.md (#1156)
* Added var and VA units to UoM (#1146)
VA (Volt-Ampere - apparent power) and var (Volt-Ampere reactive) are used to measure power and energy consumption in AC circuits.
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* Fix filepath to keystore (#1148)
Default openHAB userdata environment variable should be `$OPENHAB_USERDATA`, not `$USER_DATA` shouldn't it? At least, this is the default on my fresh openHABian and also the most popular variant to find in the docs.
* Slight language corrections (#1150)
I think it reads better this way
Signed-off-by: Richard Davies <rwdrich@gmail.com>
* additional example for non default persistence service (#1152)
For me it was confusing how to pass on the serviceId into methods that already had an argument. An extra example is always good.
Signed-off-by: jaco <jaco.waes@gmail.com>
* Adding 12 new logos for OH Add-Ons page on website (#1158)
Signed-off-by: bracklanna bracklanna@users.noreply.github.com
* Added missing preset variables (#1104)
* Added missing preset variables
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Cleaned up blank lines, fixed table, and added file name for SimpleRule
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Fix broken link (#1165)
* Added Hotlink from "label" section to "state presentation" (#1167)
* Added note about broken action (#1164)
* Added note about broken action
See https://github.com/openhab/openhab-core/issues/1374
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Update index.md (#1170)
Link appears to be wrong and does not work when I click on it in Edge. Loads the same page again instead of loading the correct new page from the hyperlink.
https://www.openhab.org/docs/developer/guidelines.html
* Added Airthings logo (#1171)
* typo in exambp (#1172)
`Temperature.averageSince(now.minusMinutes(5),"influxdb")`
* file.encoding=UTF-8 (#1173)
* Update demo URL and add demo.rules URL (#1174)
Based on: https://community.openhab.org/t/demo-setup-missing/94850
Old Link is broken leading to 404.
The link to the demo.rules on github is an extra :)
* Replace outdated zulu.org link. (#1177)
* Replace outdated zulu.org link.
As of 3/23/2020 zulu.org has an SSL cert that expired on 9/28/2019. Changed link to azul.com/downloads, since that appears to be the new official source.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Changed all http links to https for installation/index.md.
All changed links working, tested on 3/24/2020.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Minor language tweak (#1178)
* Ending an active scan/stopScan (#1179)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add files via upload (#1184)
* Update persistence.md (#1185)
Clarify return objects for max/min rules extensions.
Signed-off-by: Ross Kennedy rossko@culzean.clara.co.uk
* Update things.md (#1186)
Amended example code to include using label and location when defining a Thing with a bridge that is defined elsewhere.
* Correct typos (#1190)
* Correct usage of its/it's
"It's" is always a contraction of "it is" or "it has". "Its" is a
possessive. Correct a few places where they were used backwards.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct "Z-Wave" spelling
Per https://www.z-wave.com/, the canonical spelling appears to be "Z-Wave".
Most places use "Z-Wave" already; change the remaining references to match.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct typos and grammatical errors
Correct some typos and grammatical errors.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Update sitemap.md section charts (#1191)
I observed that the unique first word in the labels of items charted in a group isn't causing an empty chart anymore. I'm on openHAB 2.5.1.
Signed-off-by: Juergen Baginski opus42@gmx.de
* Add image for insteon binding (#1196)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* typo (#1198)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Installation details (#1197)
Added more details around the installation and configuration process.
Fixed that engine no longer logs "Activated scripting support..."
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update sitemaps.md (#1202)
Added full item definition for usage of visibility. See https://community.openhab.org/t/sitemap-visibility-basic-ui/97304/9
* Updated ecobee logo (https://brand.ecobee.com/) (#1203)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* tutorial: Fix description of sitemap 'type' (#1204)
In the tutorial, the generic sitemap description says that ItemType has
to be the same as the type defined in default.items.
Looking at
https://www.openhab.org/docs/configuration/items.html#type and
https://www.openhab.org/docs/configuration/sitemaps.html#element-types
this is incorrect as they take different values.
The example is even mislading as `Switch` is one of the only types which
is common between items and sitemaps. Might be better to describe
`Default` instead.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
* Added information about DateTime Group functions LATEST/EARLIEST (#1206)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Add section for documentation contributions (#1205)
Hopefully this will lower the hurdle for people to submit documentation contributions. I know from myself that I didn't submit various documentation improvements, because I didn't know git and thought it would be a much more involved process.
Ideally there would be a separate documentation section, but submitting this under the development contribution page for now (as per discussion with @Confectrician in https://github.com/openhab/openhab-docs/pull/1179#issuecomment-605642091).
Note that I am addressing the issue of DCO failures wrt specifying the full name that I ran into myself in https://github.com/openhab/openhab-docs/pull/1197#issuecomment-615597308. I found a good discussion of the issue at https://github.com/probot/dco/issues/43.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* fix typo (#1209)
* add description of Ephemeris localization support (#1210)
Add a new section to describe the localization support and how-to steps
Signed-off-by: Michael Roßner Schrott.Micha@web.de
* Line 115 broken link - should be: (#1217)
* Line 115 broken link - should be:
({{base}}/docs/configuration/sitemaps.html#element-types)
was:
({{base}}/configuration/configuration/sitemaps.html#element-types)
* Removed diplicated docs breadcrumb
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* add missing space between words (#1212)
* Update configuration.md (#1215)
I'm a beginner myself. Though I liked this tutorial very much, it took me some time trying and erroring and finally reading forum posts to get behind this. I didn't even know there was something like a more modern ping. So maybe others are happy to learn this right from the beginning.
* Remove architecture from Docker tags (#1220)
Docker automatically detects the architecture and downloads the appropriate image (openhab/openhab-docker#213).
BuildKit will no longer generate new tags having the architecture (openhab/openhab-docker#293).
Signed-off-by: Wouter Born <github@maindrain.net>
* slight readability improvements (#1221)
* slight readability improvements
* Update introduction.md
* Update introduction.md
* minor wording update
* Update eclipse.md (#1225)
Clarifying that it's no longer possible to make changes in the Core Framework for 2.5.x.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* [fmiweather] logo for FMI Weather binding (#929)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* Update eclipse.md (#1226)
Added additional structure around install, run, debug and update steps. Provided more pointers to interactions with Eclipse, Maven and Git.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1227)
Need to escape \< and \> in the sign off message format so users see them explicitly in the Contributing to the Documentation section.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1228)
Small refinement on documentation change submission flow.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add doc folder to the binding directory structure (#1230)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Make Subheadings Use Proper Subheading Syntax (#1234)
This way they render out as proper markdown and don't look weird on the website
Signed-off-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* Remove unnecessary isCancelled() from code example (#1235)
Cancelling an already canceled task has no effect. IMHO this check is not necesssary and removal would simplify the code. I came to this because I saw this pattern in many bindings during reviewing.
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Update thing-xml.md (#1236)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Fix broken ESH links (#1231)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update logging.md (#1238)
Add information on how to find out the symbolic names of the bundles
* Remove Apache Commons from Default Libraries (#1229)
See openhab/openhab-addons#7722
Signed-off-by: Fabian Wolter <git@fabian-wolter.de>
* Update introduction.md (#1239)
* Update introduction.md
Signed-off-by: Markus Storm markus.storm@gmx.net
* Update introduction.md
* Revise Java recommendations (#1240)
* Revise Java recommendations
* Delete pine.md
Do not recommend PINE, it's not supported any longer by openHABian.
* Removed sidebar link in config
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Update security.md (#1241)
Been using FreeDNS for many years (ever since all these companies got rid of their free tiers) and never an issue!
* Fix DecimalType hex conversion example (#1243)
See: https://github.com/openhab/openhab-core/issues/1526
Signed-off-by: Wouter Born <github@maindrain.net>
* Fix typo (#1244)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update persistence.md (#1246)
Fixes link to quartz docs page.
* Revision. (openhab#1187) (#1237)
* Revision. (openhab#1187)
- Update of screenshots, removal of old screenshots
- Chapters for better formatting
- Removal of ZWave chapter (one example of adding things should be enough IMHO)
- Adding items in simple mode and in "manual" mode
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
* Use one line per sentence
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Add notes for configuring Synology Diskstation (#1219)
* Add notes for configuring Synology Diskstation
I have a working set up for SSL enabled remote access on a Synology diskstation, taking advantage of the GUI as much as possible, to ensure automatic renewal of certs from Let's Encrypt, etc. It took me about 8 hours to suss it all out, but it could be achieved in about 30 mins if you knew exactly what to do... may not be widely useful, but since Synology is officially supported, I figured this might be a good addition.
There's also a minor error in the 'allow' masks - these should be 192.168.0.0/24 to allow access to anything in the 192.168.0.xxx range.
* Updated to use one line per sentence
Updated to use one line per sentence - sorry for the delay!
* Update security.md
* Updated for one line per sentence
Updated for one line per sentence
Signed-off-by: Andrew Mills mills@prettymachine.co.nz
* Bad subnet (#1245)
Nginx warns about low address bits of `192.168.0.1/24` because they are meaningless.
The correct subnet mask should be `192.168.0.0/24`
Signed-off-by: Olivier Béraud <olivierberaud@free.fr>
* Fixed broken images. (#1247)
* Fixed broken images.
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* Fix image path
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* [documentation] clarification of representation property (#1248)
* [documentation] clarification of representation property
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopt suggestions of reviewers
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] commas
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] addopted suggestions of @bobadair
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] example added back
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] simplified text
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopted reviewer comment
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add Alexa mapping along side a channel mapping (#1249)
* Add Alexa mapping along side a channel mapping
It took me a while to find this https://community.openhab.org/t/tagging-devices-for-alexa-support/98155/3 on the Forum and its not clearly documented in the openHAB Amazon Alexa Smart Home Skill or here in Item Metadata.
I originally suggested this as an update to the openHAB Amazon Alexa Smart Home Skill documentaion, but it fits better here, then other integrations using metadata (e.g. HomeKit or Google Assistant) could refer to it as well.
* Update items.md
* Mention defaults for element type setpoint. (#1250)
Mention defaults for min, max and step value for element type setpoint.
Signed-off-by: Thomas Weiler <toweosp@gmail.com>
* Update index.md (#1251)
I thought 'workl' was probably intended to be 'work'.
* Items - Bedroom_Light written as Light_Bedroom (#1252)
Fix small error which might mislead some readers.
* Added example for time-weighted averages (#1253)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Remove deprecated UIs, Eclipse Marketplace from sidebar
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update branch name in README
Signed-off-by: Yannick Schaus <github@schaus.net>
Co-authored-by: Markus Storm <markus.storm@gmx.net>
Co-authored-by: Nagy Attila Gábor <mrbig@sneaker.hu>
Co-authored-by: Christoph Thiede <38782922+LinqLover@users.noreply.github.com>
Co-authored-by: Richard Davies <rwdrich@gmail.com>
Co-authored-by: jwaes <50528773+jwaes@users.noreply.github.com>
Co-authored-by: bracklanna <16140600+bracklanna@users.noreply.github.com>
Co-authored-by: Scott Rushworth <openhab@5iver.com>
Co-authored-by: cpmeister <mistercpp2000@gmail.com>
Co-authored-by: Ross Kennedy <rossko@culzean.clara.co.uk>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Co-authored-by: Skinah <32607303+Skinah@users.noreply.github.com>
Co-authored-by: pali <pauli.anttila@gmail.com>
Co-authored-by: ljsquare <laurens-jan@merkx-ewals.nl>
Co-authored-by: PatrikG <40170469+PatrikG8@users.noreply.github.com>
Co-authored-by: Elias H <E.Hackradt@web.de>
Co-authored-by: Billy Stevens <contact@wasv.me>
Co-authored-by: theiding <mark.theiding@gmail.com>
Co-authored-by: jadcx <60408305+jadcx@users.noreply.github.com>
Co-authored-by: Bjorn Helgaas <bjorn@helgaas.com>
Co-authored-by: Jürgen Baginski <opus42@gmx.de>
Co-authored-by: robnielsen <rob.nielsen@yahoo.com>
Co-authored-by: GumbyMan82 <40233411+GumbyMan82@users.noreply.github.com>
Co-authored-by: Christophe Fergeau <teuf@gnome.org>
Co-authored-by: Paulo "JCranky" Siqueira <paulo.siqueira@gmail.com>
Co-authored-by: Michael Rossner <Schrott.Micha@web.de>
Co-authored-by: BugSmurF <52825547+bugsmurf@users.noreply.github.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: josefscript <64727123+josefscript@users.noreply.github.com>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
Co-authored-by: TRS-80 <25938297+TRSx80@users.noreply.github.com>
Co-authored-by: sihui <10405486+sihui62@users.noreply.github.com>
Co-authored-by: Andrew Mills <amil109@users.noreply.github.com>
Co-authored-by: Olivier Béraud <olivbd@users.noreply.github.com>
Co-authored-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: LeeC77 <LeeC77@users.noreply.github.com>
Co-authored-by: Thomas Weiler <18066810+toweosp@users.noreply.github.com>
Co-authored-by: garretcook <garretcook@gmail.com>
Co-authored-by: Michael Fielding <michael.fielding@gmail.com>
2020-09-21 11:29:39 +00:00
2017-11-03 17:16:59 +00:00
To persist an Item called `Lights` in an rrd4j database, you would enter the following:
`Lights.persist("rrd4j")`
Merge 2.5.x into main (#1266)
* Update README (2.5.x) (#1153)
Change branch name.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update items.md (#1156)
* Added var and VA units to UoM (#1146)
VA (Volt-Ampere - apparent power) and var (Volt-Ampere reactive) are used to measure power and energy consumption in AC circuits.
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* Fix filepath to keystore (#1148)
Default openHAB userdata environment variable should be `$OPENHAB_USERDATA`, not `$USER_DATA` shouldn't it? At least, this is the default on my fresh openHABian and also the most popular variant to find in the docs.
* Slight language corrections (#1150)
I think it reads better this way
Signed-off-by: Richard Davies <rwdrich@gmail.com>
* additional example for non default persistence service (#1152)
For me it was confusing how to pass on the serviceId into methods that already had an argument. An extra example is always good.
Signed-off-by: jaco <jaco.waes@gmail.com>
* Adding 12 new logos for OH Add-Ons page on website (#1158)
Signed-off-by: bracklanna bracklanna@users.noreply.github.com
* Added missing preset variables (#1104)
* Added missing preset variables
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Cleaned up blank lines, fixed table, and added file name for SimpleRule
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Fix broken link (#1165)
* Added Hotlink from "label" section to "state presentation" (#1167)
* Added note about broken action (#1164)
* Added note about broken action
See https://github.com/openhab/openhab-core/issues/1374
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Update index.md (#1170)
Link appears to be wrong and does not work when I click on it in Edge. Loads the same page again instead of loading the correct new page from the hyperlink.
https://www.openhab.org/docs/developer/guidelines.html
* Added Airthings logo (#1171)
* typo in exambp (#1172)
`Temperature.averageSince(now.minusMinutes(5),"influxdb")`
* file.encoding=UTF-8 (#1173)
* Update demo URL and add demo.rules URL (#1174)
Based on: https://community.openhab.org/t/demo-setup-missing/94850
Old Link is broken leading to 404.
The link to the demo.rules on github is an extra :)
* Replace outdated zulu.org link. (#1177)
* Replace outdated zulu.org link.
As of 3/23/2020 zulu.org has an SSL cert that expired on 9/28/2019. Changed link to azul.com/downloads, since that appears to be the new official source.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Changed all http links to https for installation/index.md.
All changed links working, tested on 3/24/2020.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Minor language tweak (#1178)
* Ending an active scan/stopScan (#1179)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add files via upload (#1184)
* Update persistence.md (#1185)
Clarify return objects for max/min rules extensions.
Signed-off-by: Ross Kennedy rossko@culzean.clara.co.uk
* Update things.md (#1186)
Amended example code to include using label and location when defining a Thing with a bridge that is defined elsewhere.
* Correct typos (#1190)
* Correct usage of its/it's
"It's" is always a contraction of "it is" or "it has". "Its" is a
possessive. Correct a few places where they were used backwards.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct "Z-Wave" spelling
Per https://www.z-wave.com/, the canonical spelling appears to be "Z-Wave".
Most places use "Z-Wave" already; change the remaining references to match.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct typos and grammatical errors
Correct some typos and grammatical errors.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Update sitemap.md section charts (#1191)
I observed that the unique first word in the labels of items charted in a group isn't causing an empty chart anymore. I'm on openHAB 2.5.1.
Signed-off-by: Juergen Baginski opus42@gmx.de
* Add image for insteon binding (#1196)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* typo (#1198)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Installation details (#1197)
Added more details around the installation and configuration process.
Fixed that engine no longer logs "Activated scripting support..."
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update sitemaps.md (#1202)
Added full item definition for usage of visibility. See https://community.openhab.org/t/sitemap-visibility-basic-ui/97304/9
* Updated ecobee logo (https://brand.ecobee.com/) (#1203)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* tutorial: Fix description of sitemap 'type' (#1204)
In the tutorial, the generic sitemap description says that ItemType has
to be the same as the type defined in default.items.
Looking at
https://www.openhab.org/docs/configuration/items.html#type and
https://www.openhab.org/docs/configuration/sitemaps.html#element-types
this is incorrect as they take different values.
The example is even mislading as `Switch` is one of the only types which
is common between items and sitemaps. Might be better to describe
`Default` instead.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
* Added information about DateTime Group functions LATEST/EARLIEST (#1206)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Add section for documentation contributions (#1205)
Hopefully this will lower the hurdle for people to submit documentation contributions. I know from myself that I didn't submit various documentation improvements, because I didn't know git and thought it would be a much more involved process.
Ideally there would be a separate documentation section, but submitting this under the development contribution page for now (as per discussion with @Confectrician in https://github.com/openhab/openhab-docs/pull/1179#issuecomment-605642091).
Note that I am addressing the issue of DCO failures wrt specifying the full name that I ran into myself in https://github.com/openhab/openhab-docs/pull/1197#issuecomment-615597308. I found a good discussion of the issue at https://github.com/probot/dco/issues/43.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* fix typo (#1209)
* add description of Ephemeris localization support (#1210)
Add a new section to describe the localization support and how-to steps
Signed-off-by: Michael Roßner Schrott.Micha@web.de
* Line 115 broken link - should be: (#1217)
* Line 115 broken link - should be:
({{base}}/docs/configuration/sitemaps.html#element-types)
was:
({{base}}/configuration/configuration/sitemaps.html#element-types)
* Removed diplicated docs breadcrumb
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* add missing space between words (#1212)
* Update configuration.md (#1215)
I'm a beginner myself. Though I liked this tutorial very much, it took me some time trying and erroring and finally reading forum posts to get behind this. I didn't even know there was something like a more modern ping. So maybe others are happy to learn this right from the beginning.
* Remove architecture from Docker tags (#1220)
Docker automatically detects the architecture and downloads the appropriate image (openhab/openhab-docker#213).
BuildKit will no longer generate new tags having the architecture (openhab/openhab-docker#293).
Signed-off-by: Wouter Born <github@maindrain.net>
* slight readability improvements (#1221)
* slight readability improvements
* Update introduction.md
* Update introduction.md
* minor wording update
* Update eclipse.md (#1225)
Clarifying that it's no longer possible to make changes in the Core Framework for 2.5.x.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* [fmiweather] logo for FMI Weather binding (#929)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* Update eclipse.md (#1226)
Added additional structure around install, run, debug and update steps. Provided more pointers to interactions with Eclipse, Maven and Git.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1227)
Need to escape \< and \> in the sign off message format so users see them explicitly in the Contributing to the Documentation section.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1228)
Small refinement on documentation change submission flow.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add doc folder to the binding directory structure (#1230)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Make Subheadings Use Proper Subheading Syntax (#1234)
This way they render out as proper markdown and don't look weird on the website
Signed-off-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* Remove unnecessary isCancelled() from code example (#1235)
Cancelling an already canceled task has no effect. IMHO this check is not necesssary and removal would simplify the code. I came to this because I saw this pattern in many bindings during reviewing.
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Update thing-xml.md (#1236)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Fix broken ESH links (#1231)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update logging.md (#1238)
Add information on how to find out the symbolic names of the bundles
* Remove Apache Commons from Default Libraries (#1229)
See openhab/openhab-addons#7722
Signed-off-by: Fabian Wolter <git@fabian-wolter.de>
* Update introduction.md (#1239)
* Update introduction.md
Signed-off-by: Markus Storm markus.storm@gmx.net
* Update introduction.md
* Revise Java recommendations (#1240)
* Revise Java recommendations
* Delete pine.md
Do not recommend PINE, it's not supported any longer by openHABian.
* Removed sidebar link in config
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Update security.md (#1241)
Been using FreeDNS for many years (ever since all these companies got rid of their free tiers) and never an issue!
* Fix DecimalType hex conversion example (#1243)
See: https://github.com/openhab/openhab-core/issues/1526
Signed-off-by: Wouter Born <github@maindrain.net>
* Fix typo (#1244)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update persistence.md (#1246)
Fixes link to quartz docs page.
* Revision. (openhab#1187) (#1237)
* Revision. (openhab#1187)
- Update of screenshots, removal of old screenshots
- Chapters for better formatting
- Removal of ZWave chapter (one example of adding things should be enough IMHO)
- Adding items in simple mode and in "manual" mode
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
* Use one line per sentence
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Add notes for configuring Synology Diskstation (#1219)
* Add notes for configuring Synology Diskstation
I have a working set up for SSL enabled remote access on a Synology diskstation, taking advantage of the GUI as much as possible, to ensure automatic renewal of certs from Let's Encrypt, etc. It took me about 8 hours to suss it all out, but it could be achieved in about 30 mins if you knew exactly what to do... may not be widely useful, but since Synology is officially supported, I figured this might be a good addition.
There's also a minor error in the 'allow' masks - these should be 192.168.0.0/24 to allow access to anything in the 192.168.0.xxx range.
* Updated to use one line per sentence
Updated to use one line per sentence - sorry for the delay!
* Update security.md
* Updated for one line per sentence
Updated for one line per sentence
Signed-off-by: Andrew Mills mills@prettymachine.co.nz
* Bad subnet (#1245)
Nginx warns about low address bits of `192.168.0.1/24` because they are meaningless.
The correct subnet mask should be `192.168.0.0/24`
Signed-off-by: Olivier Béraud <olivierberaud@free.fr>
* Fixed broken images. (#1247)
* Fixed broken images.
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* Fix image path
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* [documentation] clarification of representation property (#1248)
* [documentation] clarification of representation property
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopt suggestions of reviewers
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] commas
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] addopted suggestions of @bobadair
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] example added back
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] simplified text
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopted reviewer comment
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add Alexa mapping along side a channel mapping (#1249)
* Add Alexa mapping along side a channel mapping
It took me a while to find this https://community.openhab.org/t/tagging-devices-for-alexa-support/98155/3 on the Forum and its not clearly documented in the openHAB Amazon Alexa Smart Home Skill or here in Item Metadata.
I originally suggested this as an update to the openHAB Amazon Alexa Smart Home Skill documentaion, but it fits better here, then other integrations using metadata (e.g. HomeKit or Google Assistant) could refer to it as well.
* Update items.md
* Mention defaults for element type setpoint. (#1250)
Mention defaults for min, max and step value for element type setpoint.
Signed-off-by: Thomas Weiler <toweosp@gmail.com>
* Update index.md (#1251)
I thought 'workl' was probably intended to be 'work'.
* Items - Bedroom_Light written as Light_Bedroom (#1252)
Fix small error which might mislead some readers.
* Added example for time-weighted averages (#1253)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Remove deprecated UIs, Eclipse Marketplace from sidebar
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update branch name in README
Signed-off-by: Yannick Schaus <github@schaus.net>
Co-authored-by: Markus Storm <markus.storm@gmx.net>
Co-authored-by: Nagy Attila Gábor <mrbig@sneaker.hu>
Co-authored-by: Christoph Thiede <38782922+LinqLover@users.noreply.github.com>
Co-authored-by: Richard Davies <rwdrich@gmail.com>
Co-authored-by: jwaes <50528773+jwaes@users.noreply.github.com>
Co-authored-by: bracklanna <16140600+bracklanna@users.noreply.github.com>
Co-authored-by: Scott Rushworth <openhab@5iver.com>
Co-authored-by: cpmeister <mistercpp2000@gmail.com>
Co-authored-by: Ross Kennedy <rossko@culzean.clara.co.uk>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Co-authored-by: Skinah <32607303+Skinah@users.noreply.github.com>
Co-authored-by: pali <pauli.anttila@gmail.com>
Co-authored-by: ljsquare <laurens-jan@merkx-ewals.nl>
Co-authored-by: PatrikG <40170469+PatrikG8@users.noreply.github.com>
Co-authored-by: Elias H <E.Hackradt@web.de>
Co-authored-by: Billy Stevens <contact@wasv.me>
Co-authored-by: theiding <mark.theiding@gmail.com>
Co-authored-by: jadcx <60408305+jadcx@users.noreply.github.com>
Co-authored-by: Bjorn Helgaas <bjorn@helgaas.com>
Co-authored-by: Jürgen Baginski <opus42@gmx.de>
Co-authored-by: robnielsen <rob.nielsen@yahoo.com>
Co-authored-by: GumbyMan82 <40233411+GumbyMan82@users.noreply.github.com>
Co-authored-by: Christophe Fergeau <teuf@gnome.org>
Co-authored-by: Paulo "JCranky" Siqueira <paulo.siqueira@gmail.com>
Co-authored-by: Michael Rossner <Schrott.Micha@web.de>
Co-authored-by: BugSmurF <52825547+bugsmurf@users.noreply.github.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: josefscript <64727123+josefscript@users.noreply.github.com>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
Co-authored-by: TRS-80 <25938297+TRSx80@users.noreply.github.com>
Co-authored-by: sihui <10405486+sihui62@users.noreply.github.com>
Co-authored-by: Andrew Mills <amil109@users.noreply.github.com>
Co-authored-by: Olivier Béraud <olivbd@users.noreply.github.com>
Co-authored-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: LeeC77 <LeeC77@users.noreply.github.com>
Co-authored-by: Thomas Weiler <18066810+toweosp@users.noreply.github.com>
Co-authored-by: garretcook <garretcook@gmail.com>
Co-authored-by: Michael Fielding <michael.fielding@gmail.com>
2020-09-21 11:29:39 +00:00
To get the average temperature over the last 5 minutes from the Item called `Temperature` in the influxdb persistence service, you would use:
`Temperature.averageSince(now.minusMinutes(5), "influxdb")`
2019-09-29 08:39:49 +00:00
The most useful methods of the HistoricItem object returned by some queries, are `.state` and `.getTimestamp`
Merge 2.5.x into main (#1266)
* Update README (2.5.x) (#1153)
Change branch name.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update items.md (#1156)
* Added var and VA units to UoM (#1146)
VA (Volt-Ampere - apparent power) and var (Volt-Ampere reactive) are used to measure power and energy consumption in AC circuits.
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* Fix filepath to keystore (#1148)
Default openHAB userdata environment variable should be `$OPENHAB_USERDATA`, not `$USER_DATA` shouldn't it? At least, this is the default on my fresh openHABian and also the most popular variant to find in the docs.
* Slight language corrections (#1150)
I think it reads better this way
Signed-off-by: Richard Davies <rwdrich@gmail.com>
* additional example for non default persistence service (#1152)
For me it was confusing how to pass on the serviceId into methods that already had an argument. An extra example is always good.
Signed-off-by: jaco <jaco.waes@gmail.com>
* Adding 12 new logos for OH Add-Ons page on website (#1158)
Signed-off-by: bracklanna bracklanna@users.noreply.github.com
* Added missing preset variables (#1104)
* Added missing preset variables
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Cleaned up blank lines, fixed table, and added file name for SimpleRule
Signed-off-by: Scott Rushworth <openhab@5iver.com>
* Fix broken link (#1165)
* Added Hotlink from "label" section to "state presentation" (#1167)
* Added note about broken action (#1164)
* Added note about broken action
See https://github.com/openhab/openhab-core/issues/1374
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Incorporated changes from review
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Update index.md (#1170)
Link appears to be wrong and does not work when I click on it in Edge. Loads the same page again instead of loading the correct new page from the hyperlink.
https://www.openhab.org/docs/developer/guidelines.html
* Added Airthings logo (#1171)
* typo in exambp (#1172)
`Temperature.averageSince(now.minusMinutes(5),"influxdb")`
* file.encoding=UTF-8 (#1173)
* Update demo URL and add demo.rules URL (#1174)
Based on: https://community.openhab.org/t/demo-setup-missing/94850
Old Link is broken leading to 404.
The link to the demo.rules on github is an extra :)
* Replace outdated zulu.org link. (#1177)
* Replace outdated zulu.org link.
As of 3/23/2020 zulu.org has an SSL cert that expired on 9/28/2019. Changed link to azul.com/downloads, since that appears to be the new official source.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Changed all http links to https for installation/index.md.
All changed links working, tested on 3/24/2020.
Signed-off-by: Billy Stevens <contact@wasv.me>
* Minor language tweak (#1178)
* Ending an active scan/stopScan (#1179)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add files via upload (#1184)
* Update persistence.md (#1185)
Clarify return objects for max/min rules extensions.
Signed-off-by: Ross Kennedy rossko@culzean.clara.co.uk
* Update things.md (#1186)
Amended example code to include using label and location when defining a Thing with a bridge that is defined elsewhere.
* Correct typos (#1190)
* Correct usage of its/it's
"It's" is always a contraction of "it is" or "it has". "Its" is a
possessive. Correct a few places where they were used backwards.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct "Z-Wave" spelling
Per https://www.z-wave.com/, the canonical spelling appears to be "Z-Wave".
Most places use "Z-Wave" already; change the remaining references to match.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Correct typos and grammatical errors
Correct some typos and grammatical errors.
Signed-off-by: Bjorn Helgaas <bjorn@helgaas.com>
* Update sitemap.md section charts (#1191)
I observed that the unique first word in the labels of items charted in a group isn't causing an empty chart anymore. I'm on openHAB 2.5.1.
Signed-off-by: Juergen Baginski opus42@gmx.de
* Add image for insteon binding (#1196)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* typo (#1198)
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Installation details (#1197)
Added more details around the installation and configuration process.
Fixed that engine no longer logs "Activated scripting support..."
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update sitemaps.md (#1202)
Added full item definition for usage of visibility. See https://community.openhab.org/t/sitemap-visibility-basic-ui/97304/9
* Updated ecobee logo (https://brand.ecobee.com/) (#1203)
Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
* tutorial: Fix description of sitemap 'type' (#1204)
In the tutorial, the generic sitemap description says that ItemType has
to be the same as the type defined in default.items.
Looking at
https://www.openhab.org/docs/configuration/items.html#type and
https://www.openhab.org/docs/configuration/sitemaps.html#element-types
this is incorrect as they take different values.
The example is even mislading as `Switch` is one of the only types which
is common between items and sitemaps. Might be better to describe
`Default` instead.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
* Added information about DateTime Group functions LATEST/EARLIEST (#1206)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Add section for documentation contributions (#1205)
Hopefully this will lower the hurdle for people to submit documentation contributions. I know from myself that I didn't submit various documentation improvements, because I didn't know git and thought it would be a much more involved process.
Ideally there would be a separate documentation section, but submitting this under the development contribution page for now (as per discussion with @Confectrician in https://github.com/openhab/openhab-docs/pull/1179#issuecomment-605642091).
Note that I am addressing the issue of DCO failures wrt specifying the full name that I ran into myself in https://github.com/openhab/openhab-docs/pull/1197#issuecomment-615597308. I found a good discussion of the issue at https://github.com/probot/dco/issues/43.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* fix typo (#1209)
* add description of Ephemeris localization support (#1210)
Add a new section to describe the localization support and how-to steps
Signed-off-by: Michael Roßner Schrott.Micha@web.de
* Line 115 broken link - should be: (#1217)
* Line 115 broken link - should be:
({{base}}/docs/configuration/sitemaps.html#element-types)
was:
({{base}}/configuration/configuration/sitemaps.html#element-types)
* Removed diplicated docs breadcrumb
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* add missing space between words (#1212)
* Update configuration.md (#1215)
I'm a beginner myself. Though I liked this tutorial very much, it took me some time trying and erroring and finally reading forum posts to get behind this. I didn't even know there was something like a more modern ping. So maybe others are happy to learn this right from the beginning.
* Remove architecture from Docker tags (#1220)
Docker automatically detects the architecture and downloads the appropriate image (openhab/openhab-docker#213).
BuildKit will no longer generate new tags having the architecture (openhab/openhab-docker#293).
Signed-off-by: Wouter Born <github@maindrain.net>
* slight readability improvements (#1221)
* slight readability improvements
* Update introduction.md
* Update introduction.md
* minor wording update
* Update eclipse.md (#1225)
Clarifying that it's no longer possible to make changes in the Core Framework for 2.5.x.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* [fmiweather] logo for FMI Weather binding (#929)
Signed-off-by: Sami Salonen <ssalonen@gmail.com>
* Update eclipse.md (#1226)
Added additional structure around install, run, debug and update steps. Provided more pointers to interactions with Eclipse, Maven and Git.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1227)
Need to escape \< and \> in the sign off message format so users see them explicitly in the Contributing to the Documentation section.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Update contributing.md (#1228)
Small refinement on documentation change submission flow.
Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
* Add doc folder to the binding directory structure (#1230)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Make Subheadings Use Proper Subheading Syntax (#1234)
This way they render out as proper markdown and don't look weird on the website
Signed-off-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* Remove unnecessary isCancelled() from code example (#1235)
Cancelling an already canceled task has no effect. IMHO this check is not necesssary and removal would simplify the code. I came to this because I saw this pattern in many bindings during reviewing.
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
* Update thing-xml.md (#1236)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Fix broken ESH links (#1231)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update logging.md (#1238)
Add information on how to find out the symbolic names of the bundles
* Remove Apache Commons from Default Libraries (#1229)
See openhab/openhab-addons#7722
Signed-off-by: Fabian Wolter <git@fabian-wolter.de>
* Update introduction.md (#1239)
* Update introduction.md
Signed-off-by: Markus Storm markus.storm@gmx.net
* Update introduction.md
* Revise Java recommendations (#1240)
* Revise Java recommendations
* Delete pine.md
Do not recommend PINE, it's not supported any longer by openHABian.
* Removed sidebar link in config
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Update security.md (#1241)
Been using FreeDNS for many years (ever since all these companies got rid of their free tiers) and never an issue!
* Fix DecimalType hex conversion example (#1243)
See: https://github.com/openhab/openhab-core/issues/1526
Signed-off-by: Wouter Born <github@maindrain.net>
* Fix typo (#1244)
Signed-off-by: Wouter Born <github@maindrain.net>
* Update persistence.md (#1246)
Fixes link to quartz docs page.
* Revision. (openhab#1187) (#1237)
* Revision. (openhab#1187)
- Update of screenshots, removal of old screenshots
- Chapters for better formatting
- Removal of ZWave chapter (one example of adding things should be enough IMHO)
- Adding items in simple mode and in "manual" mode
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
* Use one line per sentence
Signed-off-by: Sascha Billian <sascha.billian@googlemail.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
* Add notes for configuring Synology Diskstation (#1219)
* Add notes for configuring Synology Diskstation
I have a working set up for SSL enabled remote access on a Synology diskstation, taking advantage of the GUI as much as possible, to ensure automatic renewal of certs from Let's Encrypt, etc. It took me about 8 hours to suss it all out, but it could be achieved in about 30 mins if you knew exactly what to do... may not be widely useful, but since Synology is officially supported, I figured this might be a good addition.
There's also a minor error in the 'allow' masks - these should be 192.168.0.0/24 to allow access to anything in the 192.168.0.xxx range.
* Updated to use one line per sentence
Updated to use one line per sentence - sorry for the delay!
* Update security.md
* Updated for one line per sentence
Updated for one line per sentence
Signed-off-by: Andrew Mills mills@prettymachine.co.nz
* Bad subnet (#1245)
Nginx warns about low address bits of `192.168.0.1/24` because they are meaningless.
The correct subnet mask should be `192.168.0.0/24`
Signed-off-by: Olivier Béraud <olivierberaud@free.fr>
* Fixed broken images. (#1247)
* Fixed broken images.
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* Fix image path
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
* [documentation] clarification of representation property (#1248)
* [documentation] clarification of representation property
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopt suggestions of reviewers
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] commas
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] addopted suggestions of @bobadair
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] example added back
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentaion] simplified text
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] typo
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* [documentation] adopted reviewer comment
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
* Add Alexa mapping along side a channel mapping (#1249)
* Add Alexa mapping along side a channel mapping
It took me a while to find this https://community.openhab.org/t/tagging-devices-for-alexa-support/98155/3 on the Forum and its not clearly documented in the openHAB Amazon Alexa Smart Home Skill or here in Item Metadata.
I originally suggested this as an update to the openHAB Amazon Alexa Smart Home Skill documentaion, but it fits better here, then other integrations using metadata (e.g. HomeKit or Google Assistant) could refer to it as well.
* Update items.md
* Mention defaults for element type setpoint. (#1250)
Mention defaults for min, max and step value for element type setpoint.
Signed-off-by: Thomas Weiler <toweosp@gmail.com>
* Update index.md (#1251)
I thought 'workl' was probably intended to be 'work'.
* Items - Bedroom_Light written as Light_Bedroom (#1252)
Fix small error which might mislead some readers.
* Added example for time-weighted averages (#1253)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
* Remove deprecated UIs, Eclipse Marketplace from sidebar
Signed-off-by: Yannick Schaus <github@schaus.net>
* Update branch name in README
Signed-off-by: Yannick Schaus <github@schaus.net>
Co-authored-by: Markus Storm <markus.storm@gmx.net>
Co-authored-by: Nagy Attila Gábor <mrbig@sneaker.hu>
Co-authored-by: Christoph Thiede <38782922+LinqLover@users.noreply.github.com>
Co-authored-by: Richard Davies <rwdrich@gmail.com>
Co-authored-by: jwaes <50528773+jwaes@users.noreply.github.com>
Co-authored-by: bracklanna <16140600+bracklanna@users.noreply.github.com>
Co-authored-by: Scott Rushworth <openhab@5iver.com>
Co-authored-by: cpmeister <mistercpp2000@gmail.com>
Co-authored-by: Ross Kennedy <rossko@culzean.clara.co.uk>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Co-authored-by: Skinah <32607303+Skinah@users.noreply.github.com>
Co-authored-by: pali <pauli.anttila@gmail.com>
Co-authored-by: ljsquare <laurens-jan@merkx-ewals.nl>
Co-authored-by: PatrikG <40170469+PatrikG8@users.noreply.github.com>
Co-authored-by: Elias H <E.Hackradt@web.de>
Co-authored-by: Billy Stevens <contact@wasv.me>
Co-authored-by: theiding <mark.theiding@gmail.com>
Co-authored-by: jadcx <60408305+jadcx@users.noreply.github.com>
Co-authored-by: Bjorn Helgaas <bjorn@helgaas.com>
Co-authored-by: Jürgen Baginski <opus42@gmx.de>
Co-authored-by: robnielsen <rob.nielsen@yahoo.com>
Co-authored-by: GumbyMan82 <40233411+GumbyMan82@users.noreply.github.com>
Co-authored-by: Christophe Fergeau <teuf@gnome.org>
Co-authored-by: Paulo "JCranky" Siqueira <paulo.siqueira@gmail.com>
Co-authored-by: Michael Rossner <Schrott.Micha@web.de>
Co-authored-by: BugSmurF <52825547+bugsmurf@users.noreply.github.com>
Co-authored-by: Jerome Luckenbach <github@luckenba.ch>
Co-authored-by: josefscript <64727123+josefscript@users.noreply.github.com>
Co-authored-by: Wouter Born <github@maindrain.net>
Co-authored-by: Sami Salonen <ssalonen@gmail.com>
Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
Co-authored-by: TRS-80 <25938297+TRSx80@users.noreply.github.com>
Co-authored-by: sihui <10405486+sihui62@users.noreply.github.com>
Co-authored-by: Andrew Mills <amil109@users.noreply.github.com>
Co-authored-by: Olivier Béraud <olivbd@users.noreply.github.com>
Co-authored-by: Andrew Fiddian-Green <software@whitebear.ch>
Co-authored-by: LeeC77 <LeeC77@users.noreply.github.com>
Co-authored-by: Thomas Weiler <18066810+toweosp@users.noreply.github.com>
Co-authored-by: garretcook <garretcook@gmail.com>
Co-authored-by: Michael Fielding <michael.fielding@gmail.com>
2020-09-21 11:29:39 +00:00
#### Time-weighted averages
Time-weighted averages take into consideration not only the numerical levels of a particular variable, but also the amount of time spent on it.
For instance, if you are measuring the temperature in a room - acknowledging the differences in the amounts of time until it changes.
A brief example:
18 °C for 13 hours a day, 21 °C for 7 hours a day, and 16.5 °C for 4 hours a day, you would obtain 18 °C x 13 h, 21 °C x 7 h and 16.5 °C x 4 h (234, 147, and 66, respectively).
Sum the values that you obtained.
In this case, 447 °C hours.
Add together the time weights to get the total weight.
In our example, the total weight is 13 h + 7 h + 4 h = 24 h.
Divide the value in Step 2 by the total weights in Step 3, to get an average of 447 °C hours / 24 h = 18.625 °C.
2017-11-03 17:16:59 +00:00
### Date and Time Extensions
2017-10-20 11:35:07 +00:00
2020-12-19 19:16:46 +00:00
A number of date and time calculations have been made available in openHAB through `ZonedDateTime` .
2017-10-20 11:35:07 +00:00
This makes it very easy to perform actions based upon time.
Here are some examples:
```java
Lights.changedSince(now.minusMinutes(2).minusSeconds(30))
2020-12-19 19:16:46 +00:00
Temperature.maximumSince(now.truncatedTo(ChronoUnit.DAYS))
2017-10-20 11:35:07 +00:00
Temperature.minimumSince(parse("2012-01-01"))
2020-12-19 19:16:46 +00:00
PowerMeter.historicState(now.truncatedTo(ChronoUnit.DAYS).withDayOfMonth(1))
2017-10-20 11:35:07 +00:00
```
The "now" variable can be used for relative time expressions, while "parse()" can define absolute dates and times.
## Startup Behavior
2017-11-03 17:16:59 +00:00
Persistence services and the Rule engine are started in parallel.
Because of this, it is possible that, during an openHAB startup, Rules will execute before Item states used by those Rules have been restored.
(In this case, those unrestored Items have an "undefined" state when the Rule is executed.)
Therefore, Rules that rely on persisted Item states may not work correctly on a consistent basis.
2017-10-20 11:35:07 +00:00
### Workaround 1
2017-11-03 17:16:59 +00:00
A workaround which helps in some cases is to create an Item e.g. "delayed_start" that is set to "OFF" at startup and to "ON" some time later (when it can be assumed that persistence has restored all items).
You can then write a Rule that restores Items from your persistence service after the delay has completed.
2017-10-20 11:35:07 +00:00
The time of the delay must be determined by experimentation.
How long you need to wait before changing your "delayed_start" Item from "OFF" to "ON" depends upon the size of your home automation project and the performance of your platform.
<!-- TODO: Need a code example for Workaround 1. -->
### Workaround 2
Create `$OPENHAB_CONF/rules/refresh.rules` with the following content (This rule runs only once when openHAB starts):
```sh
2018-01-21 21:14:11 +00:00
var boolean reloadOnce = true
2017-10-20 11:35:07 +00:00
rule "Refresh rules after persistence service has started"
when System started
then
if(reloadOnce)
executeCommandLine("$OPENHAB_CONF/rules/rules_refresh.sh")
else
println("reloadOnce is false")
reloadOnce = false
end
```
2018-11-05 19:52:50 +00:00
Create a refresh script `$OPENHAB_CONF/rules/rules_refresh.sh` and make it executable (`chmod +x $OPENHAB_CONF/rules/rules_refresh.sh`):
2017-10-20 11:35:07 +00:00
```sh
2018-04-07 08:13:25 +00:00
#!/bin/bash
2017-10-20 11:35:07 +00:00
#This script is called by openHAB after the persistence service has started
sleep 5
2018-12-04 11:54:07 +00:00
find "$OPENHAB_CONF/rules" -type f -name '*.rules' -not -name refresh.rules | xargs touch
2017-10-20 11:35:07 +00:00
```
The script waits for five seconds and then touches all `*.rules` files (except `refresh.rules` ).
This causes openHAB to reload all rules (openHAB automatically reloads rules when their creation date/time changes).
Other rules files may be added on new lines.
Note - you will have to experiment to find the appropriate sleep value for your specific system.