2016-05-14 19:23:24 +00:00
---
layout: documentation
2020-12-12 11:27:08 +00:00
title: openHAB on Linux
2016-05-14 19:23:24 +00:00
---
2020-12-12 11:27:08 +00:00
# openHAB on Linux
2016-05-14 19:23:24 +00:00
2020-12-12 11:27:08 +00:00
The following instructions will guide you through the process of setting up openHAB and recommended packages for both .DEB (Ubuntu, Debian etc.) and .RPM (RedHat, CentOS, Fedora etc.) Linux systems.
2016-08-14 20:50:23 +00:00
All instructions can be executed in a terminal or remotely via SSH connection.
This page is structured as follows:
{::options toc_levels="2..4"/}
2017-07-06 15:36:46 +00:00
- TOC
2016-08-14 20:50:23 +00:00
{:toc}
If you are unfamiliar with Linux, SSH and the Linux console or if you want to improve your skills, read up on these important topics.
A lot of helpful articles can be found on the internet, for example:
2017-07-06 15:36:46 +00:00
- "Learn the ways of Linux-fu, for free" interactively with exercises at [linuxjourney.com ](https://linuxjourney.com ).
2016-08-14 20:50:23 +00:00
Linux file permissions is one of the biggest sources of issues, Linux novices run into.
2017-01-08 19:29:47 +00:00
If you find yourself in a situation, where you have **no write access** to the openHAB configuration or system files wrong permissions and/or the incorrect use of `sudo` are often the cause.
2016-08-14 20:50:23 +00:00
Train your understanding of Linux permissions at [linuxjourney.com/lesson/file-permissions ](https://linuxjourney.com/lesson/file-permissions ).
2020-12-25 22:44:31 +00:00
## Meeting the Requirements
2016-08-14 20:50:23 +00:00
As a first step, please verify, that your system meets the [prerequisites ](index.html#prerequisites ).
2020-11-20 14:06:36 +00:00
You may want to install Zulu, a fully certified Java build [as a package or manually ](https://docs.azul.com/zulu/zuludocs/ZuluUserGuide/InstallingZulu/InstallZulu.htm ).
2017-01-19 13:34:33 +00:00
2020-12-21 09:13:16 +00:00
Alternatively, Zulu Embedded can be installed for small systems either from the same package repository as above or [manually ](https://www.azul.com/downloads/zulu-embedded/ ).
2017-07-25 09:56:16 +00:00
If you're unsure which manual file you should download, using `dpkg --print-architecture` or `rpm -q --qf '%{ARCH}\n' rpm` in your Linux terminal should point you in the right direction (e.g. armhf means ARM Hard Float).
2017-05-10 13:05:51 +00:00
2019-08-17 07:35:17 +00:00
When installing Zulu or Zulu Embedded from a .zip or .tar archive, make sure to [set Zulu as the main Java "alternative" ](https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/SwitchingBetweenJavaAlternatives/SwitchBetweenJavaAlts.htm ).
2017-05-10 13:05:51 +00:00
2019-12-27 15:18:48 +00:00
::: tip Note
2020-12-12 11:27:08 +00:00
Make sure to download Zulu or Java **11** .
2019-12-27 15:18:48 +00:00
:::
2017-05-10 13:05:51 +00:00
2017-01-19 13:34:33 +00:00
## Installation
2020-12-12 11:27:08 +00:00
openHAB can be installed through
2020-12-25 22:44:31 +00:00
- the openHABian project ** (easiest method, ships with the openHABian configuration tool)**
- a package repository (apt, yum)
- manually from file.
2019-12-27 15:18:48 +00:00
The installation through the **openHABian project** and the use of the provided openHABian configuration tool is recommended for end users.
2019-01-12 10:42:01 +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
Installing using the provided **package repository** (using `apt` , `apt-get` , `yum` or `dnf` ) is easier, but requires more manual configuration later on due to the missing openHABian configuration tool.
2019-01-12 10:42:01 +00:00
2017-05-10 13:05:51 +00:00
The manual installation through a platform independent archive file is suited for users who know what they are doing.
2016-08-14 20:50:23 +00:00
2019-01-12 10:42:01 +00:00
### openHABian project
2020-12-25 22:44:31 +00:00
2019-04-24 07:47:49 +00:00
The easy step by step instruction can be found [here ](openhabian.html ).
2019-01-12 10:42:01 +00:00
2016-08-14 20:50:23 +00:00
### Package Repository Installation
2017-05-10 13:05:51 +00:00
Installation through a package repository is the recommended choice. You can select the appropriate installation instructions by expanding from the apt or yum instructions.
2016-10-20 13:58:03 +00:00
Alternatively resort to the [manual installation approach ](#manual-installation ).
2016-08-14 20:50:23 +00:00
2017-05-10 13:05:51 +00:00
{% include collapsible/start.html %}
{% include collapsible/heading.html %}
2019-05-05 10:07:57 +00:00
#### Apt Based Systems
2017-05-10 13:05:51 +00:00
{% include collapsible/body.html %}
2022-07-03 14:31:34 +00:00
First, add the openHAB repository key to your package manager (note `/usr/share/keyrings` may already exist):
2016-08-14 20:50:23 +00:00
2017-01-11 18:06:43 +00:00
```shell
2022-07-12 15:51:06 +00:00
curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor > openhab.gpg
2022-07-03 14:31:34 +00:00
sudo mkdir /usr/share/keyrings
2022-07-12 15:51:06 +00:00
sudo mv openhab.gpg /usr/share/keyrings
sudo chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg
2017-01-11 18:06:43 +00:00
```
2022-11-03 17:43:14 +00:00
Then, you can choose between, _Official (Stable)_ , _Beta_ or _Snapshot_ builds:
2016-08-14 20:50:23 +00:00
2020-12-25 22:44:31 +00:00
- **Stable Release**
2016-08-14 20:50:23 +00:00
2017-07-06 15:36:46 +00:00
The stable builds contain the latest official release with tested features.
2017-02-12 17:15:42 +00:00
2020-12-12 11:27:08 +00:00
Add the **openHAB Stable Repository** to your systems apt sources list:
2016-08-14 20:50:23 +00:00
2017-07-06 15:36:46 +00:00
```shell
2022-07-19 18:25:27 +00:00
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
2017-07-06 15:36:46 +00:00
```
2016-08-14 20:50:23 +00:00
2020-12-25 22:44:31 +00:00
- **Testing Release**
2017-01-11 18:06:43 +00:00
2022-02-15 20:03:17 +00:00
The beta and release candidate builds come out more frequently, but will contain new features that are currently in the testing phase.
2017-01-11 18:06:43 +00:00
2020-12-12 11:27:08 +00:00
Add the **openHAB Beta Repository** to your systems apt sources list:
2017-01-19 13:34:33 +00:00
2017-07-06 15:36:46 +00:00
```shell
2022-07-19 18:25:27 +00:00
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg testing main' | sudo tee /etc/apt/sources.list.d/openhab.list
2017-07-06 15:36:46 +00:00
```
2017-01-11 18:06:43 +00:00
2020-12-25 22:44:31 +00:00
- **Snapshot Release**
2016-08-14 20:50:23 +00:00
2020-12-12 11:27:08 +00:00
The snapshot build is created [almost daily ](https://ci.openhab.org/job/openhab-linuxpkg/ ), and include the latest changes to the openHAB core and add-ons.
2017-07-06 15:36:46 +00:00
These changes are often unstable, so you should use this branch only for testing or development purposes.
2017-01-22 22:26:54 +00:00
2017-07-06 15:36:46 +00:00
The snapshot repository is hosted in openHAB's [JFrog Artifactory instance ](https://www.jfrog.com/Artifactory ).
2020-12-12 11:27:08 +00:00
To use it, add the **openHAB Unstable Repository** to your systems apt sources list:
2016-08-14 20:50:23 +00:00
2017-07-06 15:36:46 +00:00
```shell
2022-07-19 18:25:27 +00:00
echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg unstable main' | sudo tee /etc/apt/sources.list.d/openhab.list
2017-07-06 15:36:46 +00:00
```
2016-11-13 19:44:35 +00:00
2017-01-22 22:26:54 +00:00
Next, resynchronize the package index:
2016-08-14 20:50:23 +00:00
2017-01-22 22:26:54 +00:00
```shell
sudo apt-get update
```
2016-08-14 20:50:23 +00:00
2017-01-22 22:26:54 +00:00
Now install openHAB with the following command:
2016-08-14 20:50:23 +00:00
2017-01-22 22:26:54 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo apt-get install openhab
2017-01-22 22:26:54 +00:00
```
2016-08-14 20:50:23 +00:00
2017-01-22 22:26:54 +00:00
When you choose to install an add-on, openHAB will download it from the internet on request.
If you plan on disconnecting your machine from the internet, then you will want to also install the add-ons package.
2017-01-11 18:06:43 +00:00
2017-01-22 22:26:54 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo apt-get install openhab-addons
2017-01-22 22:26:54 +00:00
```
2017-05-10 13:05:51 +00:00
{% include collapsible/item-end.html %}
{% include collapsible/heading.html %}
2019-05-05 10:07:57 +00:00
#### Yum or Dnf Based Systems
2017-05-10 13:05:51 +00:00
{% include collapsible/body.html %}
2017-06-10 13:57:41 +00:00
The RPM repo information should be defined inside a file, make a new file at `/etc/yum.repos.d/openhab.repo` with the following contents depending on your choice of release.
You may add all three to the same file, but make sure the desired repo is is set to `enabled=1` :
2017-05-10 13:05:51 +00:00
2020-12-25 22:44:31 +00:00
- **Stable Release**
2017-06-10 13:57:41 +00:00
2017-07-06 15:36:46 +00:00
The stable builds contain the latest official release with tested features.
2017-06-10 13:57:41 +00:00
2017-07-06 15:36:46 +00:00
```text
[openHAB-Stable]
2020-12-19 17:53:30 +00:00
name=openHAB Stable
2021-04-20 17:44:47 +00:00
baseurl=https://openhab.jfrog.io/artifactory/openhab-linuxpkg-rpm/stable
2017-07-06 15:36:46 +00:00
gpgcheck=1
2021-04-20 17:44:47 +00:00
gpgkey="https://openhab.jfrog.io/artifactory/api/gpg/key/public"
2017-07-06 15:36:46 +00:00
enabled=1
```
2017-06-10 13:57:41 +00:00
2020-12-25 22:44:31 +00:00
- **Testing Release**
2017-05-10 13:05:51 +00:00
2017-07-06 15:36:46 +00:00
The beta or release candidate builds come out less frequently, but will contain new features that are currently in the testing phase.
2017-06-10 13:57:41 +00:00
2017-07-06 15:36:46 +00:00
```text
[openHAB-Testing]
2020-12-19 17:53:30 +00:00
name=openHAB Testing
baseurl=https://openhab.jfrog.io/artifactory/openhab-linuxpkg-rpm/testing
2017-07-06 15:36:46 +00:00
gpgcheck=1
2020-12-19 17:53:30 +00:00
gpgkey=https://openhab.jfrog.io/artifactory/api/gpg/key/public
2017-07-06 15:36:46 +00:00
enabled=1
```
2017-06-10 13:57:41 +00:00
2020-12-25 22:44:31 +00:00
- **Snapshot Release**
2017-06-10 13:57:41 +00:00
2020-12-12 11:27:08 +00:00
The snapshot build is created [almost daily ](https://ci.openhab.org/job/openhab-linuxpkg/ ), and include the latest changes to the openHAB core and add-ons.
2017-07-06 15:36:46 +00:00
These changes are often unstable, so you should use this branch only for testing or development purposes.
2017-06-10 13:57:41 +00:00
2017-07-06 15:36:46 +00:00
```text
[openHAB-Snapshots]
2020-12-19 17:53:30 +00:00
name=openHAB Snapshots
baseurl=https://openhab.jfrog.io/artifactory/openhab-linuxpkg-rpm/unstable
2017-07-06 15:36:46 +00:00
gpgcheck=1
2020-12-19 17:53:30 +00:00
gpgkey=https://openhab.jfrog.io/artifactory/api/gpg/key/public
2017-07-06 15:36:46 +00:00
enabled=1
```
2017-05-10 13:05:51 +00:00
Now install openHAB with the following command, please note that for systems that support it `dnf` can be used instead of yum:
```shell
2020-12-12 11:27:08 +00:00
sudo yum install openhab
2017-05-10 13:05:51 +00:00
```
When you choose to install an add-on, openHAB will download it from the internet on request.
If you plan on disconnecting your machine from the internet, then you will want to also install the add-ons package.
```shell
2020-12-12 11:27:08 +00:00
sudo yum install openhab-addons
2017-05-10 13:05:51 +00:00
```
{% include collapsible/item-end.html %}
{% include collapsible/end.html %}
2020-12-11 14:10:07 +00:00
#### Arch Linux
{% include collapsible/body.html %}
The Arch User Repository ([AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository)) is a community-driven repository for Arch users.
It contains package descriptions (PKGBUILDs) that allow you to compile a package from source with makepkg and then install it via pacman.
There is a package description for stable releases of [openHAB 3 ](https://aur.archlinux.org/packages/openhab3/ ) in the AUR.
In order to create the package first make sure the necessary tools are installed.
```shell
sudo pacman -Sy --needed base-devel
```
Next clone the package description, change into the created directory, and make the package.
```shell
git clone https://aur.archlinux.org/openhab3.git
cd openhab3
makepkg -s
```
If all goes well, you'll end up with a package file which can be installed with pacman.
```shell
sudo pacman -U openhab3-3.0.0.M4-1-any.pkg.tar.zst
```
2017-02-22 12:25:19 +00:00
If everything went well, you can start openHAB and register it to be automatically executed at system startup.
2016-08-14 20:50:23 +00:00
2017-05-10 13:05:51 +00:00
{% include collapsible/start.html %}
{% include collapsible/heading.html %}
2016-08-14 20:50:23 +00:00
2017-05-10 13:05:51 +00:00
Systems based on **sysVinit** (e.g. Ubuntu 14.x, Debian Wheezy and older):
2016-08-14 20:50:23 +00:00
2017-05-10 13:05:51 +00:00
{% include collapsible/body.html %}
2016-08-14 20:50:23 +00:00
2017-05-10 13:05:51 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo /etc/init.d/openhab start
sudo /etc/init.d/openhab status
2017-05-10 13:05:51 +00:00
2020-12-12 11:27:08 +00:00
sudo update-rc.d openhab defaults
2017-05-10 13:05:51 +00:00
```
{% include collapsible/item-end.html %}
{% include collapsible/heading.html %}
Systems based on **systemd** (e.g. Debian 8, Ubuntu 15.x, Raspbian Jessie and newer):
{% include collapsible/body.html %}
```shell
2020-12-12 11:27:08 +00:00
sudo systemctl start openhab.service
sudo systemctl status openhab.service
2017-07-06 15:36:46 +00:00
2017-05-10 13:05:51 +00:00
sudo systemctl daemon-reload
2020-12-12 11:27:08 +00:00
sudo systemctl enable openhab.service
2017-05-10 13:05:51 +00:00
```
{% include collapsible/item-end.html %}
{% include collapsible/end.html %}
2016-08-14 20:50:23 +00:00
The first start may take **up to 15 minutes** , this is a good time to reward yourself with hot coffee or a freshly brewed tea!
2020-12-25 22:44:31 +00:00
You should be able to reach the openHAB Dashboard at `http://openhab-device:8080` at this point.
2020-12-24 08:44:11 +00:00
If you're new to openHAB, then you should checkout the [beginner's tutorial ]({{base}}/tutorial/first_steps.html )!
2016-08-14 20:50:23 +00:00
2020-12-13 15:51:47 +00:00

2016-08-14 20:50:23 +00:00
2017-02-22 12:25:19 +00:00
#### Service Control
openHAB will run as a service in the background.
The most important commands to control the openHAB service are given below.
2017-05-10 13:05:51 +00:00
{% include collapsible/start.html %}
{% include collapsible/heading.html %}
Systems based on **sysVinit** (e.g. Ubuntu 14.x, Debian Wheezy and older):
{% include collapsible/body.html %}
2017-02-22 12:25:19 +00:00
```shell
# Learn about the current service status
2020-12-12 11:27:08 +00:00
sudo /etc/init.d/openhab status
2017-07-06 15:36:46 +00:00
2017-02-22 12:25:19 +00:00
# (Re-)Start openHAB (background service)
2020-12-12 11:27:08 +00:00
sudo /etc/init.d/openhab restart
2017-07-06 15:36:46 +00:00
2017-02-22 12:25:19 +00:00
# Stop the openHAB background service
2020-12-12 11:27:08 +00:00
sudo /etc/init.d/openhab stop
2017-02-22 12:25:19 +00:00
# Make openHAB automatically start after booting the Linux host
2020-12-12 11:27:08 +00:00
sudo update-rc.d openhab defaults
2017-02-22 12:25:19 +00:00
```
2017-05-10 13:05:51 +00:00
{% include collapsible/item-end.html %}
{% include collapsible/heading.html %}
Systems based on **systemd** (e.g. Debian 8, Ubuntu 15.x, Raspbian Jessie and newer):
{% include collapsible/body.html %}
2017-02-22 12:25:19 +00:00
```shell
# Learn about the current service status
2020-12-12 11:27:08 +00:00
sudo systemctl status openhab.service
2017-07-06 15:36:46 +00:00
2017-02-22 12:25:19 +00:00
# (Re-)Start openHAB (background service)
2020-12-12 11:27:08 +00:00
sudo systemctl restart openhab.service
2017-07-06 15:36:46 +00:00
2017-02-22 12:25:19 +00:00
# Stop the openHAB background service
2020-12-12 11:27:08 +00:00
sudo systemctl stop openhab.service
2019-12-27 15:18:48 +00:00
2017-12-16 23:57:32 +00:00
# Get the service log since the last boot
2020-12-12 11:27:08 +00:00
sudo journalctl -u openhab.service -b
2017-07-06 15:36:46 +00:00
2017-02-22 12:25:19 +00:00
# Make openHAB automatically start after booting the Linux host
sudo systemctl daemon-reload
2020-12-12 11:27:08 +00:00
sudo systemctl enable openhab.service
2017-02-22 12:25:19 +00:00
```
2017-05-10 13:05:51 +00:00
{% include collapsible/item-end.html %}
{% include collapsible/end.html %}
2017-12-16 23:57:32 +00:00
#### Command Line Interface (CLI)
After installing openHAB, a shortcut named `openhab-cli` provides access to the openHAB-specific commands (such as [backup, restore ](#backup-and-restore ), and [console ]({{base}}/administration/console.html )).
To use the shortcuts in a terminal, simply type `openhab-cli` followed by the command.
For example:
```shell
Usage: openhab-cli command [options]
Possible commands:
start [--debug] -- Starts openHAB in the terminal.
stop -- Stops any running instance of openHAB.
status -- Checks to see if openHAB is running.
console -- Opens the openHAB console.
backup [filename] -- Stores the current configuration of openHAB.
restore filename -- Restores the openHAB configuration from a backup.
showlogs -- Displays the log messages of openHAB.
info -- Displays distribution information.
```
2017-05-13 13:48:03 +00:00
#### Changing Versions
2016-08-14 20:50:23 +00:00
To stay up to date with new releases, you should do regular upgrades.
2017-01-08 19:29:47 +00:00
This is especially important if you are working with the latest snapshot as changes and fixes are incorporated constantly.
2016-08-14 20:50:23 +00:00
Your personal configuration will be retained on upgrades.
We still recommend a backup before each upgrade.
2017-05-10 13:05:51 +00:00
{% include collapsible/start.html %}
{% include collapsible/heading.html %}
Apt Based Systems
{% include collapsible/body.html %}
2016-08-14 20:50:23 +00:00
Upgrading is as easy as:
```shell
sudo apt-get update
sudo apt-get upgrade
```
2017-01-22 22:26:54 +00:00
You may want to switch to a different repo, or an older (but more stable) version of openHAB.
To do this, simply select the repo as in the [installation instructions above ](#package-repository-installation ), then find the version by bringing a list of all versions available to install:
```shell
sudo apt-get update
2020-12-12 11:27:08 +00:00
apt-cache showpkg openhab
2017-01-22 22:26:54 +00:00
```
2020-12-12 11:27:08 +00:00
Once you know which version you want, you can upgrade/downgrade to it by using the `apt-get install openhab=[version]` command, for example:
2017-01-22 22:26:54 +00:00
```shell
2020-12-19 17:53:30 +00:00
sudo apt-get install openhab=3.0.0-1
2017-01-22 22:26:54 +00:00
```
2017-05-10 13:05:51 +00:00
{% include collapsible/item-end.html %}
{% include collapsible/heading.html %}
Yum or Dnf Based Systems
{% include collapsible/body.html %}
Upgrading is as easy as: (you can use `dnf` instead of `yum` for systems that support it)
```shell
sudo yum upgrade
```
You may want to switch to a different version of openHAB.
To do this, simply select the repo as in the [installation instructions above ](#package-repository-installation ), then find the version by bringing a list of all versions available to install:
```shell
2020-12-12 11:27:08 +00:00
rpm -q openhab
2017-05-10 13:05:51 +00:00
```
2020-12-12 11:27:08 +00:00
Once you know which version you want, you can upgrade/downgrade to it by using the `yum install openhab-[version]` command, for example:
2017-05-10 13:05:51 +00:00
```shell
2020-12-19 17:53:30 +00:00
sudo yum install openhab-3.0.0-1
2017-05-10 13:05:51 +00:00
```
{% include collapsible/item-end.html %}
{% include collapsible/end.html %}
2016-08-14 22:24:41 +00:00
#### Uninstall
2020-12-12 11:27:08 +00:00
To uninstall openHAB and get rid of all related files managed by the package manager, make a backup, then uninstall openHAB and remove the repository:
2017-05-10 13:05:51 +00:00
{% include collapsible/start.html %}
{% include collapsible/heading.html %}
Apt Based Systems
{% include collapsible/body.html %}
2016-08-14 22:24:41 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo apt-get purge openhab*
sudo rm /etc/apt/sources.list.d/openhab.list
2016-08-14 22:24:41 +00:00
```
2017-05-10 13:05:51 +00:00
{% include collapsible/item-end.html %}
{% include collapsible/heading.html %}
Yum or Dnf Based Systems
{% include collapsible/body.html %}
```shell
2020-12-12 11:27:08 +00:00
sudo yum remove openhab*
2020-12-19 17:53:30 +00:00
sudo rm /etc/yum.repos.d/openhab.repo
2017-05-10 13:05:51 +00:00
```
{% include collapsible/item-end.html %}
{% include collapsible/end.html %}
2016-08-14 20:50:23 +00:00
### Manual Installation
The manual installation/setup is an alternative to the otherwise **recommended** [installation through package repository ](#package-repository-installation ).
First, create a Linux system user for openHAB.
This user will later serve to execute the openHAB runtime with restricted permissions and can be used by other services like Samba if desired.
```shell
sudo adduser --system --no-create-home --group --disabled-login openhab
```
2020-12-12 11:27:08 +00:00
We are going to download a platform independent archive file and extract it to the path `/opt/openhab` .
2016-08-14 20:50:23 +00:00
Choose between the latest Beta release or a Snapshot with all incoming contributions, created daily.
2020-12-12 11:27:08 +00:00
As openHAB is still in an evolving state, the snapshot may be the **preferred choice** .
2016-08-14 20:50:23 +00:00
2020-12-25 22:44:31 +00:00
- **Official Release**
2017-01-22 22:26:54 +00:00
2020-12-12 11:27:08 +00:00
Download and extract the latest offical stable version of openHAB from [our downloadpage ](https://www.openhab.org/download/ ) to your host:
2017-01-22 22:26:54 +00:00
2017-07-06 15:36:46 +00:00
```shell
cd /tmp
2021-04-20 17:44:47 +00:00
wget -O openhab-download.zip https://www.openhab.org/download/releases... # Insert download link here
2020-12-12 11:27:08 +00:00
sudo unzip openhab-download.zip -d /opt/openhab
2017-07-06 15:36:46 +00:00
rm openhab-download.zip
```
2017-01-22 22:26:54 +00:00
2020-12-25 22:44:31 +00:00
- **Beta/RC Release**
2016-08-14 20:50:23 +00:00
2020-12-12 11:27:08 +00:00
If available, beta or release candidate builds of openHAB can also be downloaded from [our downloadpage ](https://www.openhab.org/download/ ) and extracted to your host as shown above.
2016-08-14 20:50:23 +00:00
2020-12-25 22:44:31 +00:00
- **Snapshot Release**
2016-08-14 20:50:23 +00:00
2020-12-12 11:27:08 +00:00
Download and extract the latest snapshot version of openHAB from [our downloadpage ](https://www.openhab.org/download/ ) to your host. The process is analogue to above.
2016-08-14 20:50:23 +00:00
2017-07-06 15:36:46 +00:00
The extracted openHAB files should belong to the earlier created `openhab` user.
2017-01-19 13:34:33 +00:00
Execute:
2016-08-14 20:50:23 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo chown -hR openhab:openhab /opt/openhab
2016-08-14 20:50:23 +00:00
```
Everything is ready for a first test run.
2020-12-25 22:44:31 +00:00
**Execute** openHAB and you should be able to reach the openHAB Dashboard at `http://openhab-device:8080` after a few minutes:
2016-08-14 20:50:23 +00:00
```shell
2016-08-14 22:24:41 +00:00
# execute as restricted user openhab:
2020-12-12 11:27:08 +00:00
sudo su -s /bin/bash -c '/opt/openhab/start.sh' openhab
2016-08-14 20:50:23 +00:00
```
2018-07-12 19:22:32 +00:00
You will see the openHAB Console in your terminal and can directly interact with it.
2020-12-12 11:27:08 +00:00
Please be aware, that openHAB will need a few minutes so finish the first start, even after the openHAB console is visible.
Let openHAB settle for **around 15 minutes** .
2016-08-14 22:24:41 +00:00
If the portal is not reachable by then, restart once.
2016-08-14 20:50:23 +00:00
2020-12-13 15:51:47 +00:00

2016-08-14 22:24:41 +00:00
2017-01-11 18:06:43 +00:00
An important downside of the above method is, that openHAB will be terminated, as soon as you close your terminal.
2016-08-14 22:24:41 +00:00
To work around that, a quick solution is, to execute openHAB in a detached [screen ](https://www.howtoforge.com/linux_screen ) terminal.
2016-08-14 20:50:23 +00:00
2016-08-14 22:24:41 +00:00
A cleaner approach is to create a Linux service.
2016-08-14 20:50:23 +00:00
#### Service
The following instructions are intended for a Linux init system based on **systemd** (e.g. Debian 8 / Ubuntu 15.x and newer).
This will allow you to register openHAB as a service, so that it runs at startup and automatically restarts if openHAB crashes.
2020-12-12 11:27:08 +00:00
The service will be running with the privileges of the user "openhab" and expects the openHAB files under `/opt/openhab` .
2016-08-14 20:50:23 +00:00
2020-12-12 11:27:08 +00:00
Create the file `/usr/lib/systemd/system/openhab.service` with the following content:
2016-08-14 20:50:23 +00:00
```ini
[Unit]
2020-12-12 11:27:08 +00:00
Description=openHAB - empowering the smart home
2019-12-16 11:59:30 +00:00
Documentation=https://www.openhab.org/docs/
Documentation=https://community.openhab.org
2016-08-14 20:50:23 +00:00
Wants=network-online.target
After=network-online.target
[Service]
User=openhab
Group=openhab
2019-12-16 11:59:30 +00:00
2020-12-12 11:27:08 +00:00
WorkingDirectory=/opt/openhab
#EnvironmentFile=-/etc/default/openhab
2019-12-16 11:59:30 +00:00
2020-12-12 11:27:08 +00:00
ExecStart=/opt/openhab/runtime/bin/karaf daemon
ExecStop=/opt/openhab/runtime/bin/karaf stop
2016-08-14 20:50:23 +00:00
Restart=on-failure
2019-12-16 11:59:30 +00:00
SuccessExitStatus=0 143
2016-08-14 20:50:23 +00:00
[Install]
WantedBy=multi-user.target
```
2016-08-14 22:24:41 +00:00
Next, enable the service to be executed on system startup, start the service and retrieve status information:
2016-08-14 20:50:23 +00:00
```shell
2016-08-14 22:24:41 +00:00
# initialize the new service (execute only once)
sudo systemctl daemon-reload
2020-12-12 11:27:08 +00:00
sudo systemctl enable openhab.service
2016-08-14 22:24:41 +00:00
#start and retrieve status
2020-12-12 11:27:08 +00:00
sudo systemctl start openhab.service
sudo systemctl status openhab.service
2016-08-14 20:50:23 +00:00
```
The output of `status` after a successful execution should be similar to:
```text
2020-12-12 11:27:08 +00:00
openhab.service - openHAB - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled)
2016-08-14 20:50:23 +00:00
Active: active (running) since Thu 2016-08-14 01:16:00 GMT; 18h ago
2019-12-16 11:59:30 +00:00
Docs: https://www.openhab.org/docs/
https://community.openhab.org
2016-08-14 20:50:23 +00:00
```
2017-01-11 18:06:43 +00:00
#### Installing add-ons
When running a manual installation, it is possible to pre-download add-ons or legacy add-ons if you want to install any bindings at a later date without connecting to the internet.
2020-12-12 11:27:08 +00:00
Simply download the kar files (the latest builds can be found [here ](https://ci.openhab.org/job/openHAB-Distribution/ )) and move them to the `/opt/openhab/addons` folder.
2017-01-11 18:06:43 +00:00
2017-06-28 13:19:44 +00:00
#### Upgrade
To stay up to date with new releases, you should do regular upgrades of your manual installation.
This is especially important if you are working with the latest snapshot as changes and fixes are incorporated [constantly ](https://openhab.jfrog.io/openhab/webapp/#/builds/openHAB-Distribution ).
openHAB uses a script to update to any other version, or from stable to snapshot and visa-versa.
Your personal configuration will be retained on upgrades, but you should **stop openHAB** and perform a backup first.
2020-12-25 22:44:31 +00:00
- **Versions 2.1.0 and Above**
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
From version 2.1.0, openHAB is distributed with the update script included.
This script should be called from within openHAB's root directory.
Assuming the openHAB directory is in `/opt/openhab` , simply run the following commands to update to the next major version of openHAB:
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
```bash
cd /opt/openhab
sudo runtime/bin/update
```
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
You can also specify any version as a parameter. For example, to switch back to 2.0.0:
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
```bash
sudo runtime/bin/update 2.0.0
```
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
You may also change to openHAB's more frequent, but less stable snapshot builds.
Just append "-SNAPSHOT" to the target version, e.g.:
2017-06-28 13:19:44 +00:00
2017-07-06 15:36:46 +00:00
```bash
sudo runtime/bin/update 2.2.0-SNAPSHOT
```
2017-06-28 13:19:44 +00:00
2020-12-25 22:44:31 +00:00
- **Older Versions**
2017-07-06 15:36:46 +00:00
If you're using a version earlier than 2.1.0, then you can use the following commands in Terminal to download the script and run it.
Assuming the openHAB directory is in `/opt/openhab` :
```bash
cd /opt/openhab
2021-01-20 19:32:07 +00:00
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/openhab/openhab-distro/main/distributions/openhab/src/main/resources/bin/update)" -- 2.1.0
2017-07-06 15:36:46 +00:00
```
2017-06-28 13:19:44 +00:00
2016-08-14 22:24:41 +00:00
#### Uninstall
2020-12-12 11:27:08 +00:00
To uninstall (or more precisely remove) openHAB after being manually set up, take a backup if needed and then simply stop and deactivate the openHAB service and get rid of all files:
2016-08-14 22:24:41 +00:00
```shell
2020-12-12 11:27:08 +00:00
sudo systemctl stop openhab.service
sudo systemctl disable openhab.service
sudo rm -rf /opt/openhab/
sudo rm /usr/lib/systemd/system/openhab.service
sudo rm /lib/systemd/system/openhab.service
2019-12-16 11:59:30 +00:00
sudo systemctl daemon-reload
2016-08-14 22:24:41 +00:00
```
2016-11-13 19:44:35 +00:00
### File Locations
2018-07-12 19:22:32 +00:00
| | Repository Installation | Manual Installation (according to [guide ](#manual-installation )) |
|:-----------------------------:|------------------------------|------------------------------------------------------------------|
2020-12-12 11:27:08 +00:00
| openHAB application | `/usr/share/openhab` | `/opt/openhab` |
| Additional add-on files | `/usr/share/openhab/addons` | `/opt/openhab/addons` |
| Site configuration | `/etc/openhab` | `/opt/openhab/conf` |
| Log files | `/var/log/openhab` | `/opt/openhab/userdata/logs` |
| Userdata like rrd4j databases | `/var/lib/openhab` | `/opt/openhab/userdata` |
| Backups folder | `/var/lib/openhab/backups` | `/opt/openhab/backups` |
| Service configuration | `/etc/default/openhab` | (not preconfigured) |
2016-11-13 19:44:35 +00:00
2017-12-16 23:57:32 +00:00
## Backup and Restore
2022-11-03 17:43:14 +00:00
It is recommended to make a backup of your configuration before _any_ major change.
2021-01-03 20:35:28 +00:00
To make a backup of openHAB 2 or higher, you need to retain your configuration and userdata files.
2020-12-12 11:27:08 +00:00
openHAB comes with scripts for storing your configuration in a zip file which is saved in `/var/lib/openhab/backups` for automatic installs and `openhab/backups` for manual installs.
2017-12-16 23:57:32 +00:00
You can change the default path by setting the $OPENHAB_BACKUPS environment variable.
```shell
sudo $OPENHAB_RUNTIME/bin/backup
## OR ##
sudo $OPENHAB_RUNTIME/bin/backup /path/to/backups/folder/myBackup.zip
```
To restore from these generated files:
```shell
sudo $OPENHAB_RUNTIME/bin/restore $OPENHAB_BACKUPS/myBackup.zip
```
If you're unsure how to use the above files, just use `--help` or `-h` :
```shell
$OPENHAB_RUNTIME/bin/backup --help
```
2016-11-13 19:44:35 +00:00
## Viewing Log Messages
2017-12-16 23:57:32 +00:00
You can learn more about openHAB and how it works by looking at your log files.
2017-01-19 13:34:33 +00:00
These will tell you everything you might need to know.
Execute the following command in one session or have both files separated in sessions side by side:
2016-11-13 19:44:35 +00:00
2017-07-06 15:36:46 +00:00
- Package repository based installation:
2016-11-13 19:44:35 +00:00
```shell
2020-12-12 11:27:08 +00:00
tail -f /var/log/openhab/openhab.log -f /var/log/openhab/events.log
2016-11-13 19:44:35 +00:00
```
2017-07-06 15:36:46 +00:00
- Manual installation:
2016-11-13 19:44:35 +00:00
```shell
2020-12-12 11:27:08 +00:00
tail -f /opt/openhab/userdata/logs/openhab.log -f /opt/openhab/userdata/logs/events.log
2016-11-13 19:44:35 +00:00
```
You could even set up an SSH configuration (in Putty or similar) to automatically connect and execute the commands every time you start working on your setup.
2020-12-12 11:27:08 +00:00
With openHAB you can also [use the openHAB console ]({{base}}/administration/logging.html#karaf-console ) to have a colored glance at the logging information.
2016-11-13 19:44:35 +00:00
## Recommended Additional Setup Steps
2020-11-28 22:12:14 +00:00
The following is not directly related to the openHAB installation but rather recommended on an openHAB system.
2016-11-13 19:44:35 +00:00
The need for these and the exact implementation on a specific system might differ from user to user.
### Privileges for Common Peripherals
2017-01-11 18:06:43 +00:00
An openHAB setup will often rely on hardware like a modem, transceiver or adapter to interface with home automation hardware.
2020-01-12 10:53:49 +00:00
Examples are a Z-Wave, Enocean or RXFcom USB Stick or a Raspberry Pi add-on board connected to the serial port on its GPIOs.
2016-11-13 19:44:35 +00:00
In order to allow openHAB to communicate with additional peripherals, it has to be added to corresponding Linux groups.
The following example shows how to add Linux user `openhab` to the often needed groups `dialout` and `tty` .
Additional groups may be needed, depending on your hardware and software setup.
2016-08-14 20:50:23 +00:00
2016-11-13 19:44:35 +00:00
```shell
2016-11-19 15:08:36 +00:00
sudo adduser openhab dialout
sudo adduser openhab tty
2016-11-13 19:44:35 +00:00
```
2016-08-14 20:50:23 +00:00
2017-02-26 13:29:15 +00:00
If you are looking to enable sound privileges for openHAB, it will also be necessary to add openHAB to the "audio" group.
```shell
sudo adduser openhab audio
```
2016-11-13 19:44:35 +00:00
### Java Network Permissions
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
The Java Virtual Machine hosting openHAB is restricted in its permissions to interact on network level for security reasons.
2020-11-28 22:12:14 +00:00
Some openHAB add-ons like the network binding need elevated permissions to work.
If needed, grant these permissions by executing the following command:
2016-11-13 19:44:35 +00:00
```shell
2017-02-12 17:15:42 +00:00
setcap 'cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep' $(realpath /usr/bin/java)
2016-11-13 19:44:35 +00:00
```
### Network Sharing
2016-08-14 20:50:23 +00:00
2016-12-11 00:22:42 +00:00
openHAB depends on configuration files and folders with custom content (details in [Configuration ]({{base}}/configuration/index.html ) articles).
2017-07-06 15:36:46 +00:00
Because your openHAB installation most probably is stored on a remote device, being able to easily access and modify these files from your local PC or Mac is important.
Therefore setting up a [Samba ](https://en.wikipedia.org/wiki/Samba_%28software%29 ) network share is **highly recommended** .
2016-08-14 20:50:23 +00:00
2018-07-12 19:22:32 +00:00
The [openHAB VS Code Extension ]({{base}}/configuration/editors.html#openhab-vs-code-extension ) software does also depend on a mounted share to access the openHAB configuration files.
2016-08-14 20:50:23 +00:00
We will now guide you through the Samba network shares setup process.
2017-01-19 13:34:33 +00:00
Start by installing Samba.
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
Afterwards open its configuration file in your favorite editor:
2016-08-14 20:50:23 +00:00
```shell
sudo apt-get install samba samba-common-bin
sudo vim /etc/samba/smb.conf
```
Change the workgroup name if needed, otherwise uncomment and enable WINS support:
```ini
wins support = yes
```
Next, add the desired share configurations to the end of the file:
<!-- Note to author: Do not name share "openhab". Depending on the host system, a share for the home of user "openhab" will be created. -->
<!-- TODO: Limit to configuration folder??? -->
2020-12-25 22:44:31 +00:00
- Package repository based installation:
2017-07-06 15:36:46 +00:00
```ini
2020-12-19 17:53:30 +00:00
[openHAB-userdata]
comment=openHAB userdata
2020-12-12 11:27:08 +00:00
path=/var/lib/openhab
2017-07-06 15:36:46 +00:00
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777
2020-12-19 17:53:30 +00:00
[openHAB-conf]
comment=openHAB site configuration
2020-12-12 11:27:08 +00:00
path=/etc/openhab
2017-07-06 15:36:46 +00:00
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777
2019-12-27 15:18:48 +00:00
2020-12-19 17:53:30 +00:00
[openHAB-logs]
comment=openHAB logs
2020-12-12 11:27:08 +00:00
path=/var/log/openhab
2019-04-27 18:52:51 +00:00
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777
2017-07-06 15:36:46 +00:00
```
2020-12-25 22:44:31 +00:00
- Manual installation:
2017-07-06 15:36:46 +00:00
```ini
[openHAB-files]
2020-12-19 17:53:30 +00:00
comment=openHAB
2020-12-12 11:27:08 +00:00
path=/opt/openhab
2017-07-06 15:36:46 +00:00
browseable=Yes
writeable=Yes
only guest=no
public=no
create mask=0777
directory mask=0777
```
2016-08-14 20:50:23 +00:00
Save and close the samba configuration file.
The shares are configured to be not open for guests nor to the public.
Let's activate the "openhab" user as a samba user and set his password (e.g. "habopen"):
```shell
sudo smbpasswd -a openhab
```
2022-11-03 17:43:14 +00:00
Be aware, that creating and later using a specific user will ensure, that **permissions** are honored.
2016-08-14 20:50:23 +00:00
Make sure, the "openhab" user has ownership and/or write access to the openHAB configuration files.
This can be accomplished by executing:
```shell
2020-12-12 11:27:08 +00:00
sudo chown -hR openhab:openhab /etc/openhab /opt/openhab/conf
2016-08-14 20:50:23 +00:00
```
Finally check the configuration file for correctness and restart Samba to load the new settings:
```shell
2021-09-27 16:48:44 +00:00
samba-tool testparm
2016-08-14 20:50:23 +00:00
# Linux init systems based on sysVinit
sudo service smbd restart
# Linux init systems based on systemd
sudo systemctl restart smbd.service
```
2016-11-13 19:44:35 +00:00
#### Mounting Locally
2016-08-14 20:50:23 +00:00
After setting up and restarting Samba, check your connection to the shared folder and create a permanent mount.
Check the network devices manager of your local operating system to find and access your openHAB host and share.
2017-01-19 13:34:33 +00:00
These might however not be auto-discovered.
You can also manually connect:
2016-08-14 20:50:23 +00:00
2018-09-18 17:35:39 +00:00
- **On macOS:** Open Finder → Go → Connect to Server: `smb://openhab@openhab-device.local`
2017-07-06 15:36:46 +00:00
- **On Windows:** Open Windows Explorer → Address bar: `\\openhab-device.local` → Right click a share and assign a drive letter
2016-08-14 20:50:23 +00:00
Be sure to use the actual host name instead of `openhab-device` .
When asked, authenticate with the username "openhab" and the chosen password.
If you are not able to connect, try with the IP of your device (e.g. `smb://openhab@192.168.0.2` or `\\192.168.0.2` ).
2016-12-11 00:22:42 +00:00
If everything went well, you are set and ready to start [configuring ]({{base}}/configuration/index.html ) your openHAB system.