Site updated at 2017-03-18 17:12:07 UTC
This commit is contained in:
parent
7573fcba68
commit
67179bf8fe
994 changed files with 1768 additions and 68252 deletions
|
@ -3,17 +3,14 @@
|
|||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Running AppDaemon - Home Assistant</title>
|
||||
<meta name="author" content="Home Assistant">
|
||||
<meta name="description" content="Running AppDaemon">
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="canonical" href="https://home-assistant.io/docs/ecosystem/appdaemon/running/">
|
||||
|
||||
<meta property="fb:app_id" content="338291289691179">
|
||||
<meta property="og:title" content="Running AppDaemon">
|
||||
<meta property="og:site_name" content="Home Assistant">
|
||||
|
@ -21,39 +18,31 @@
|
|||
<meta property="og:type" content="article">
|
||||
<meta property="og:description" content="Running AppDaemon">
|
||||
<meta property="og:image" content="https://home-assistant.io/images/default-social.png">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@home_assistant">
|
||||
|
||||
<meta name="twitter:title" content="Running AppDaemon">
|
||||
<meta name="twitter:description" content="Running AppDaemon">
|
||||
<meta name="twitter:image" content="https://home-assistant.io/images/default-social.png">
|
||||
|
||||
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet">
|
||||
<link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml">
|
||||
<link rel='shortcut icon' href='/images/favicon.ico' />
|
||||
<link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' />
|
||||
</head>
|
||||
|
||||
<body >
|
||||
|
||||
<header>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title">
|
||||
<a href="/" class="site-title">
|
||||
<img width='40' src='/demo/favicon-192x192.png'>
|
||||
<span>Home Assistant</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid__item seven-tenths lap-four-sixths palm-one-whole">
|
||||
<nav>
|
||||
<input type="checkbox" id="toggle">
|
||||
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label>
|
||||
<ul class="menu pull-right">
|
||||
|
||||
<li><a href="/getting-started/">Getting started</a></li>
|
||||
<li><a href="/components/">Components</a></li>
|
||||
<li><a href="/docs/">Docs</a></li>
|
||||
|
@ -64,54 +53,32 @@
|
|||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid grid-center">
|
||||
|
||||
<div class="grid__item two-thirds lap-one-whole palm-one-whole">
|
||||
|
||||
|
||||
<article class="page">
|
||||
|
||||
|
||||
<div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_docs/ecosystem/appdaemon/running.markdown'>Edit this page on GitHub</a></div>
|
||||
|
||||
|
||||
|
||||
<header>
|
||||
<h1 class="title indent">
|
||||
Running AppDaemon
|
||||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
|
||||
|
||||
<p>As configured, <code class="highlighter-rouge">AppDaemon</code> comes with a single HelloWorld App that will send a greeting to the logfile to show that everything is working correctly.</p>
|
||||
|
||||
<h2><a class="title-link" name="docker" href="#docker"></a> Docker</h2>
|
||||
|
||||
<p>Assuming you have set the config up as described above for Docker, you can run it with the command:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>docker run -d -v <Path to Config>/conf:/conf --name appdaemon appdaemon:latest
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>In the example above you would use:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>docker run -d -v /Users/foo/ha-config:/conf --name appdaemon appdaemon:latest
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>Where you place the <code class="highlighter-rouge">conf</code> and <code class="highlighter-rouge">conf/apps</code> directory is up to you - it can be in downloaded repostory, or anywhere else on the host, as long as you use the correct mapping in the <code class="highlighter-rouge">docker run</code> command.</p>
|
||||
|
||||
<p>You can inspect the logs as follows:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>docker logs appdaemon
|
||||
2016-08-22 10:08:16,575 INFO Got initial state
|
||||
2016-08-22 10:08:16,576 INFO Loading Module: /export/hass/appdaemon_test/conf/apps/hello.py
|
||||
|
@ -120,19 +87,13 @@
|
|||
2016-08-22 10:08:16,584 INFO You are now ready to run Apps!
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>Note that for Docker, the error and regular logs are combined.</p>
|
||||
|
||||
<h2><a class="title-link" name="pip3" href="#pip3"></a> <code class="highlighter-rouge">pip3</code></h2>
|
||||
|
||||
<p>You can then run AppDaemon from the command line as follows:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>appdaemon -c conf/appdaemon.cfg
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>If all is well, you should see something like the following:</p>
|
||||
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>$ appdaemon -c conf/appdaemon.cfg
|
||||
2016-08-22 10:08:16,575 INFO Got initial state
|
||||
2016-08-22 10:08:16,576 INFO Loading Module: /export/hass/appdaemon_test/conf/apps/hello.py
|
||||
|
@ -141,9 +102,7 @@
|
|||
2016-08-22 10:08:16,584 INFO You are now ready to run Apps!
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<h2><a class="title-link" name="appdaemon-arguments" href="#appdaemon-arguments"></a> AppDaemon arguments</h2>
|
||||
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>usage: appdaemon [-h] [-c CONFIG] [-p PIDFILE] [-t TICK] [-s STARTTIME]
|
||||
[-e ENDTIME] [-i INTERVAL]
|
||||
[-D {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v] [-d]
|
||||
|
@ -167,26 +126,14 @@ optional arguments:
|
|||
-d, --daemon run as a background process
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>-c is the path to the configuration file. If not specified, AppDaemon will look for a file named <code class="highlighter-rouge">appdaemon.cfg</code> first in <code class="highlighter-rouge">~/.homeassistant</code> then in <code class="highlighter-rouge">/etc/appdaemon</code>. If the file is not specified and it is not found in either location, AppDaemon will raise an exception.</p>
|
||||
|
||||
<p>-d and -p are used by the init file to start the process as a daemon and are not required if running from the command line.</p>
|
||||
|
||||
<p>-D can be used to increase the debug level for internal AppDaemon operations as well as apps using the logging function.</p>
|
||||
|
||||
<p>The -s, -i, -t and -s options are for the Time Travel feature and should only be used for testing. They are described in more detail in the API documentation.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
<div class="grid">
|
||||
|
||||
|
||||
<section class="aside-module grid__item one-whole lap-one-half">
|
||||
<div class='section'>
|
||||
<h1 class="title delta">Topics</h1>
|
||||
|
@ -373,13 +320,10 @@ optional arguments:
|
|||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid">
|
||||
|
@ -389,7 +333,6 @@ optional arguments:
|
|||
<a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a>
|
||||
<a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a>
|
||||
<a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a>
|
||||
|
||||
<div class="credit">
|
||||
Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a>.<br>
|
||||
Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br />
|
||||
|
@ -401,7 +344,6 @@ optional arguments:
|
|||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
|
@ -409,4 +351,4 @@ optional arguments:
|
|||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue