208 lines
13 KiB
HTML
208 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
||
|
||
|
||
|
||
<!--<link rel="shortcut icon" href="https://www.openhab.org/favicon.png"></link>-->
|
||
<title>openHAB 2 - Empowering the Smart Home</title>
|
||
|
||
<!-- CSS -->
|
||
<link type="text/css" rel="stylesheet" href="/v2.1/css/materialize.css" media="screen,projection" />
|
||
<link type="text/css" rel="stylesheet" href="/v2.1/css/pygments-jekyll-style.css" />
|
||
<link type="text/css" rel="stylesheet" href="/v2.1/css/styles.css" />
|
||
<link type="text/css" rel="stylesheet" href="/v2.1/css/openhab.css" />
|
||
<link type="text/css" rel="stylesheet" href="/v2.1/css/collapsible.css" />
|
||
|
||
<!-- Font -->
|
||
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,400,700" />
|
||
<link rel="canonical" href="http://docs.openhab.org/tutorials/demo.html" />
|
||
<script type="text/javascript">var gaProperty = 'UA-47717934-3';var disableStr = 'ga-disable-' + gaProperty;if (document.cookie.indexOf(disableStr + '=true') > -1) {window[disableStr] = true;}</script>
|
||
<script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||
ga('create', 'UA-47717934-3', 'auto');
|
||
ga('set', 'anonymizeIp', true);
|
||
ga('send', 'pageview');
|
||
</script>
|
||
</head>
|
||
|
||
|
||
<body class="documentation">
|
||
<div id="header" class="navbar-fixed">
|
||
<nav role="navigation">
|
||
<div class="container">
|
||
<div class="nav-wrapper">
|
||
<a href="/v2.1/index.html"><img id="logo" src="/images/logo.png" /></a>
|
||
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
|
||
<ul class="right hide-on-med-and-down">
|
||
<li><a href="/tutorials/index.html">Tutorials</a></li>
|
||
<li><a href="/v2.1/introduction.html">User Manual</a></li>
|
||
<li><a href="/developers/index.html">Developer Guide</a></li>
|
||
<li><a target="_blank" href="https://community.openhab.org">Community Forum</a></li>
|
||
<li><a target="_blank" href="https://github.com/openhab">GitHub</a></li>
|
||
<li class="search"><i class="material-icons">search</i></li>
|
||
<li class="search">
|
||
<form method="GET" id="searchform" class="search-form" action="/search">
|
||
<input id="query" name="q" type="text" class="search-form-input" placeholder="search" />
|
||
</form>
|
||
</li>
|
||
</ul>
|
||
<ul id="nav-mobile" class="side-nav">
|
||
<li><a href="/v2.1/index.html">Home</a></li>
|
||
<li><a href="/tutorials/index.html">Tutorials</a></li>
|
||
<li><a href="/v2.1/introduction.html">User Manual</a></li>
|
||
<li><a href="/developers/index.html">Developer Guide</a></li>
|
||
<li><a target="_blank" href="https://community.openhab.org">Community Forum</a></li>
|
||
<li><a target="_blank" href="https://github.com/openhab">GitHub</a></li>
|
||
<li class="search">
|
||
<form method="GET" id="searchformmob" class="search-form" action="/search">
|
||
<input id="querymob" name="q" type="text" class="search-form-input" placeholder="search" />
|
||
</form>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
|
||
|
||
<section id="documentation" class="text content-wrapper">
|
||
<div class="container">
|
||
|
||
<h1 id="quick-start-with-a-demo-setup">Quick Start with a Demo Setup</h1>
|
||
|
||
<p>The ‘Demo’ is a quick and easy way to see the user interface for a virtual home and examples of the different widget types that exist.</p>
|
||
|
||
<h2 id="prerequisites">Prerequisites</h2>
|
||
|
||
<p>Make sure that you have a <a href="/v2.1/installation/index.html#prerequisites">JDK 8</a> installed.</p>
|
||
|
||
<h2 id="installation">Installation</h2>
|
||
|
||
<p>openHAB comes as a <a href="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab-offline/target/openhab-offline-2.0.0-SNAPSHOT.zip">platform independent zip file</a>, which you only need to extract to some folder.</p>
|
||
|
||
<p>You will find the following folders:</p>
|
||
|
||
<ul>
|
||
<li><code class="highlighter-rouge">conf</code>: This contains all your user specific configuration files.</li>
|
||
<li><code class="highlighter-rouge">runtime</code>: This contains the openHAB binaries, there should normally be no need to touch anything in here - the whole folder can be considered to be read-only.</li>
|
||
<li><code class="highlighter-rouge">userdata</code>: Here you will find all the data that is generated during runtime: log files, database files, etc. In theory this should be the only folder where openHAB needs write permission on.</li>
|
||
<li><code class="highlighter-rouge">addons</code>: Here you can drop add-ons (or any other OSGi bundles) that you want to be deployed in your instance. These can be add-ons for openHAB 1.x and 2.x likewise. Note that all “normal” add-ons are already included in the openHAB distribution and all you need is to name them in your ‘addons.cfg’ file (see below). Hence the <code class="highlighter-rouge">addons</code> folder is mainly useful if you have received jars from other sources and want to install and test them.</li>
|
||
</ul>
|
||
|
||
<h2 id="choosing-demo-as-a-base-package-and-further-add-ons-to-be-installed">Choosing Demo as a Base Package and Further Add-ons to be Installed</h2>
|
||
|
||
<p>The demo package consists of example configuration files and samples of add-ons and UIs. In order to install the demo, you must edit the file ‘conf/services/addons.cfg’.
|
||
Uncomment the line <code class="highlighter-rouge">package=</code> and set it to <code class="highlighter-rouge">demo</code> as shown below:</p>
|
||
|
||
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">#</span> <span class="n">The</span> <span class="n">base</span> <span class="n">installation</span> <span class="k">package</span> <span class="k">of</span> <span class="n">this</span> <span class="n">openHAB</span> <span class="n">instance</span> <span class="p">(</span><span class="n">default</span> <span class="n">is</span> <span class="s2">"standard"</span><span class="p">)</span>
|
||
<span class="p">#</span> <span class="n">Valid</span> <span class="k">options</span><span class="p">:</span>
|
||
<span class="p">#</span> <span class="p">-</span> <span class="n">minimal</span> <span class="p">:</span> <span class="n">Installation</span> <span class="n">only</span> <span class="k">with</span> <span class="n">dashboard</span><span class="p">,</span> <span class="n">but</span> <span class="n">no</span> <span class="n">UIs</span> <span class="k">or</span> <span class="n">other</span> <span class="n">addons</span>
|
||
<span class="p">#</span> <span class="p">-</span> <span class="n">simple</span> <span class="p">:</span> <span class="n">Setup</span> <span class="n">for</span> <span class="n">using</span> <span class="n">openHAB</span> <span class="n">purely</span> <span class="n">through</span> <span class="n">UIs</span> <span class="p">-</span> <span class="n">you</span> <span class="n">need</span> <span class="k">to</span> <span class="n">expect</span> <span class="n">MANY</span> <span class="n">constraints</span> <span class="k">in</span> <span class="n">functionality</span><span class="c1">!
|
||
</span><span class="p">#</span> <span class="p">-</span> <span class="n">standard</span> <span class="p">:</span> <span class="n">Default</span> <span class="n">setup</span> <span class="n">for</span> <span class="n">normal</span> <span class="n">users</span><span class="p">,</span> <span class="n">best</span> <span class="n">for</span> <span class="n">textual</span> <span class="n">setup</span>
|
||
<span class="p">#</span> <span class="p">-</span> <span class="n">expert</span> <span class="p">:</span> <span class="n">Setup</span> <span class="n">for</span> <span class="n">expert</span> <span class="n">users</span><span class="p">,</span> <span class="n">especially</span> <span class="n">for</span> <span class="n">people</span> <span class="n">migrating</span> <span class="k">from</span> <span class="n">openHAB</span> <span class="m">1.</span><span class="n">x</span>
|
||
<span class="p">#</span> <span class="p">-</span> <span class="n">demo</span> <span class="p">:</span> <span class="n">A</span> <span class="n">demo</span> <span class="n">setup</span> <span class="n">which</span> <span class="n">includes</span> <span class="n">UIs</span><span class="p">,</span> <span class="n">a</span> <span class="n">few</span> <span class="n">bindings</span><span class="p">,</span> <span class="n">config</span> <span class="n">files</span> <span class="n">etc</span><span class="p">.</span>
|
||
<span class="p">#</span>
|
||
<span class="k">package</span> <span class="p">=</span> <span class="n">demo</span>
|
||
<span class="p">...</span>
|
||
</code></pre></div></div>
|
||
|
||
<h2 id="starting-the-runtime">Starting the Runtime</h2>
|
||
|
||
<p>Once you have configured your runtime as above, start the openHAB runtime from the terminal by calling <code class="highlighter-rouge">./start.sh</code> (<code class="highlighter-rouge">start.bat</code> on Windows):</p>
|
||
|
||
<p><img src="images/demo_console.png" alt="console" /></p>
|
||
|
||
<p>Point your browser to <code class="highlighter-rouge">http://<hostname>:8080</code> (allow the runtime some time to start before the HTTP server is available, especially on the very first start) and you will be welcomed by the openHAB Dashboard, which is the entry point to the different web UIs:</p>
|
||
|
||
<p><img src="images/demo_dashboard.png" alt="dashboard" /></p>
|
||
|
||
<p>Selecting the <em>Basic UI</em> will give you a virtual home and examples of the different widget types that exist:</p>
|
||
|
||
<p><img src="images/demo_basicui.png" alt="basicui" /></p>
|
||
|
||
<p>The files that are used by these demo setup are available in the <code class="highlighter-rouge">conf</code> folder.
|
||
To understand their meaning and how you can tweak them all, please refer to our <a href="beginner">beginner tutorial</a>.</p>
|
||
|
||
<h2 id="using-the-shell">Using the Shell</h2>
|
||
|
||
<p>openHAB uses Apache Karaf and thus comes with a very powerful shell for managing the installation. Please check the <a href="https://karaf.apache.org/manual/latest/#_commands">Karaf command reference</a> for details. Useful commands e.g. include:</p>
|
||
|
||
<ul>
|
||
<li><code class="highlighter-rouge">log:tail</code>: Show the live logging output, end it by pressing ctrl+c.</li>
|
||
<li><code class="highlighter-rouge">log:exception-display</code>: Show the last exception of the log file.</li>
|
||
<li><code class="highlighter-rouge">log:set DEBUG org.openhab.binding.sonos</code>: Enables debug logging for a certain binding.</li>
|
||
<li><code class="highlighter-rouge">feature:list</code>: Lists all features available and shows there status. openHAB add-ons are made available as such Karaf features.</li>
|
||
<li><code class="highlighter-rouge">feature:install openhab-binding-knx</code>: Installs a certain add-on (here KNX).</li>
|
||
<li><code class="highlighter-rouge">bundle:list -s</code>: Lists all installed bundles with their symbolic name.</li>
|
||
<li><code class="highlighter-rouge">logout</code>: Shuts down openHAB.</li>
|
||
</ul>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<footer>
|
||
<div class="container">
|
||
<div class="row">
|
||
<div class="col s12 m7">
|
||
Copyright © 2017 by the <a href="https://github.com/openhab">openHAB Community</a> and the <a href="http://www.openhabfoundation.org/">openHAB Foundation e.V.</a>
|
||
</div>
|
||
<div class="col s12 m5">
|
||
<ul class="list-inline right-align">
|
||
<li><a href="/imprint.html">Imprint</a></li>
|
||
<li><a href="/privacy.html">Privacy Policy</a></li>
|
||
<li><a href="http://www.openhab.org">openHAB Website</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
<script src="/v2.1/js/jquery.min.js"></script>
|
||
<script src="/v2.1/js/jquery.scrollme.min.js"></script>
|
||
<script src="/v2.1/js/jquery.sticky.js"></script>
|
||
<script src="/v2.1/js/materialize.min.js"></script>
|
||
<script src="/v2.1/js/init.js"></script>
|
||
|
||
<script>
|
||
$(document).ready(function () {
|
||
|
||
$('#oh2-checkbox').change(function () {
|
||
if (this.checked) $('.since-2x').show('slow');
|
||
else $('.source-oh2').hide('slow');
|
||
});
|
||
|
||
$('#oh1-checkbox').change(function () {
|
||
if (this.checked) $('.since-1x').show('slow');
|
||
else $('.source-oh1').hide('slow');
|
||
});
|
||
|
||
$('#legacy-checkbox').change(function () {
|
||
if (this.checked) $('.install-legacy').show('slow');
|
||
else $('.install-legacy').hide('slow');
|
||
});
|
||
|
||
$('#manual-checkbox').change(function () {
|
||
if (this.checked) $('.install-manual').show('slow');
|
||
else $('.install-manual').hide('slow');
|
||
});
|
||
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|
||
|