Site updated at 2017-04-22 19:16:50 UTC

This commit is contained in:
Travis CI 2017-04-22 19:16:50 +00:00
parent 7ab6214755
commit 392dc03f67
26 changed files with 121 additions and 40 deletions

View file

@ -107,6 +107,85 @@
</li>
</ul>
<p>To use notifications, please see the <a href="/getting-started/automation/">getting started with automation page</a>.</p>
<h2><a class="title-link" name="services" href="#services"></a> Services</h2>
<h3><a class="title-link" name="media-control-services" href="#media-control-services"></a> Media control services</h3>
<p>Available services: <code class="highlighter-rouge">kodi_add_to_playlist</code>, <code class="highlighter-rouge">kodi_set_shuffle</code></p>
<table>
<thead>
<tr>
<th>Service data attribute</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="highlighter-rouge">entity_id</code></td>
<td>yes</td>
<td>Target a specific media player. Defaults to all.</td>
</tr>
</tbody>
</table>
<h4><a class="title-link" name="service-media_playerkodi_set_shuffle" href="#service-media_playerkodi_set_shuffle"></a> Service <code class="highlighter-rouge">media_player/kodi_set_shuffle</code></h4>
<table>
<thead>
<tr>
<th>Service data attribute</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="highlighter-rouge">entity_id</code></td>
<td>yes</td>
<td>Target a specific media player. It must be of type kodi.</td>
</tr>
<tr>
<td><code class="highlighter-rouge">shuffle_on </code></td>
<td>no</td>
<td>True/false for shuffle on/off</td>
</tr>
</tbody>
</table>
<h4><a class="title-link" name="service-media_playerkodi_add_to_playlist" href="#service-media_playerkodi_add_to_playlist"></a> Service <code class="highlighter-rouge">media_player/kodi_add_to_playlist</code></h4>
<p>Add a song or an entire album to the default playlist (i.e. playlist id 0).</p>
<table>
<thead>
<tr>
<th>Service data attribute</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code class="highlighter-rouge">entity_id</code></td>
<td>yes</td>
<td>Target a specific media player. It must be of type kodi.</td>
</tr>
<tr>
<td><code class="highlighter-rouge">media_type </code></td>
<td>no</td>
<td>either SONG or ALBUM</td>
</tr>
<tr>
<td>media_id</td>
<td>yes</td>
<td>id of the media as defined in kodi</td>
</tr>
<tr>
<td>media_name</td>
<td>yes</td>
<td>name of the media, HA will search for the media with name closer to this. If ALL add all albums, if artist_name is provided adds all albums of that artist.</td>
</tr>
<tr>
<td>artist_name</td>
<td>yes</td>
<td>name of the artist, HA will search for the artist with name closer to this.</td>
</tr>
</tbody>
</table>
</article>
</div>
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">

View file

@ -67,12 +67,14 @@
</header>
<hr class="divider">
<p>The <code class="highlighter-rouge">glances</code> sensor platform is consuming the system information provided by the <a href="https://github.com/nicolargo/glances">Glances</a> API. This enables one to track remote host and display their stats in Home Assistant.</p>
<p>This sensors needs a running instance of <code class="highlighter-rouge">glances</code> on the host. The minimal supported version of <code class="highlighter-rouge">glances</code> is 2.3:</p>
<p>This sensors needs a running instance of <code class="highlighter-rouge">glances</code> on the host. The minimal supported version of <code class="highlighter-rouge">glances</code> is 2.3.
To start a Glances RESTful API server on its default port 61208, the a test the following command can be used:</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo glances -w
Glances web server started on http://0.0.0.0:61208/
</code></pre>
</div>
<p>Check if you are able to access the API located at <code class="highlighter-rouge">http://IP_ADRRESS:61208/api/2</code>. The details about your memory usage is provided as a JSON response. If so, you are good to proceed.</p>
<p>Check if you are able to access the API located at <code class="highlighter-rouge">http://IP_ADRRESS:61208/api/2</code>. Dont use <code class="highlighter-rouge">-s</code> as this will start the XMLRPC server on port 61209. Home Assistant only supports the REST API of GLANCES.</p>
<p>The details about your memory usage is provided as a JSON response. If so, you are good to proceed.</p>
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>curl -X GET http://IP_ADDRESS:61208/api/2/mem/free
<span class="o">{</span><span class="s2">"free"</span>: 203943936<span class="o">}</span>
</code></pre>