Documentation update

This commit is contained in:
Ross Stewart
2022-11-19 16:25:26 +00:00
parent e8cfb966d7
commit 7b76a6b11a
5 changed files with 92 additions and 63 deletions

View File

@@ -327,8 +327,9 @@ python3 app.py
</section>
<section id="run-inside-a-docker-container">
<h4>Run inside a Docker container<a class="headerlink" href="#run-inside-a-docker-container" title="Permalink to this heading"></a></h4>
<p>A Dockerfile has been provided and a prebuilt container is hosted on github.com. You can configure the service by passing environment variables to
the <em>docker run</em> command.</p>
<p>A Dockerfile has been provided and a prebuilt container is hosted on github.com. <strong>Please note that the prebuilt container was created on an amd64 platform</strong>. If you
require a different architecture such as arm for a Raspberry Pi, you will need to build a new image using the Dockerfile provided with the repository.</p>
<p>You can configure the service by passing environment variables to the <em>docker run</em> command.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>docker run -p <span class="m">5000</span>:5000 <span class="se">\</span>
-e <span class="nv">NAVI_SKILL_ID</span><span class="o">=</span>&lt;your-skill-id&gt; <span class="se">\</span>
-e <span class="nv">NAVI_SONG_COUNT</span><span class="o">=</span><span class="m">50</span> <span class="se">\</span>
@@ -395,7 +396,7 @@ using Navidrome and havent changed anything</p></td>
<td><p>1.16.1</p></td>
</tr>
<tr class="row-even"><td><p>NAVI_DEBUG</p></td>
<td><p>Enable debugging, to disable to not set this variable</p></td>
<td><p>Enable debugging, by setting this variable to 1, or 3.</p></td>
<td><p>1</p></td>
</tr>
</tbody>
@@ -419,7 +420,7 @@ want to make some changes though.</p></li>
</ul>
</li>
<li><p>Enable debugging and look at the logs generated by the web service.</p></li>
<li><p>When debugging is enabled the following web pages are available from the web service</p>
<li><p>When level 3 debugging is enabled the following web pages are available from the web service</p>
<ul class="simple">
<li><p>url-to-web-service/queue</p>
<ul>
@@ -453,6 +454,45 @@ the entries will contain any errors that were thrown.</p></li>
</ul>
</li>
</ol>
<section id="debug-options">
<h3>Debug Options<a class="headerlink" href="#debug-options" title="Permalink to this heading"></a></h3>
<p>You can enable the following debug options by setting the NAVI_DEBUG environment variable.</p>
<ul class="simple">
<li><p>0 = Logging set to WARNING and higher.</p></li>
<li><p>1 = Logging set to INFO and higher.</p></li>
<li><p>2 = Logging set to DEBUG and higher and request / response
interceptors are enabled.</p></li>
<li><p>3 = All features of level 2 and the web ui. Note the UI
will be <strong>publicly</strong> available while this is enabled.</p></li>
</ul>
</section>
<section id="known-issues">
<h3>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this heading"></a></h3>
<ol class="arabic">
<li><p>The skill appears to work but no music is played. Errors similar to below appear in the web service log</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="m">2022</span>-11-19 <span class="m">13</span>:16:45,478 - root - DEBUG - In PlaybackFailedHandler
<span class="m">2022</span>-11-19 <span class="m">13</span>:16:45,479 - root - ERROR - Playback Failed: <span class="o">{</span><span class="s1">&#39;message&#39;</span>: <span class="s1">&#39;Device playback error&#39;</span>, <span class="s1">&#39;object_type&#39;</span>: <span class="s1">&#39;MEDIA_ERROR_UNKNOWN&#39;</span><span class="o">}</span>
<span class="m">2022</span>-11-19 <span class="m">13</span>:16:45,480 - werkzeug - INFO - <span class="m">10</span>.44.17.62 - - <span class="o">[</span><span class="m">19</span>/Nov/2022 <span class="m">13</span>:16:45<span class="o">]</span> <span class="s2">&quot;POST / HTTP/1.1&quot;</span> <span class="m">200</span> -
<span class="m">2022</span>-11-19 <span class="m">13</span>:16:48,599 - root - DEBUG - In PlaybackFailedHandler
<span class="m">2022</span>-11-19 <span class="m">13</span>:16:48,600 - root - ERROR - Playback Failed: <span class="o">{</span><span class="s1">&#39;message&#39;</span>: <span class="s1">&#39;Device playback error&#39;</span>,<span class="s1">&#39;object_type&#39;</span>: <span class="s1">&#39;MEDIA_ERROR_INTERNAL_DEVICE_ERROR&#39;</span><span class="o">}</span>
</pre></div>
</div>
<ul class="simple">
<li><p>I have not found a reason as to why this happens from time to time, however it can be resolved by doing a hard reboot of your Echo device.
Disconnect the power for a minute and plug it back in then try again and music should play</p></li>
</ul>
</li>
<li><p>The following error is displayed when you try to run the Docker container</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">exec</span> /opt/env/bin/python3: <span class="nb">exec</span> format error
</pre></div>
</div>
<ul class="simple">
<li><p>You are using the prebuilt container on a non amd64 based system. You will need to build your own Docker image using the Dockerfile included
with the repository.</p></li>
</ul>
</li>
</ol>
</section>
</section>
<section id="code-documentation">
<h2>Code Documentation<a class="headerlink" href="#code-documentation" title="Permalink to this heading"></a></h2>
@@ -549,20 +589,6 @@ the entries will contain any errors that were thrown.</p></li>
</tr>
</tbody>
</table>
<p><strong>Functions:</strong></p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#app.view_buffer" title="app.view_buffer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view_buffer</span></code></a>()</p></td>
<td><p>View the contents of play_queue.buffer</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#app.view_history" title="app.view_history"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view_history</span></code></a>()</p></td>
<td><p>View the contents of play_queue.history</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#app.view_queue" title="app.view_queue"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view_queue</span></code></a>()</p></td>
<td><p>View the contents of play_queue.queue</p></td>
</tr>
</tbody>
</table>
<dl class="py class">
<dt class="sig sig-object py" id="app.CheckAudioInterfaceHandler">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">app.</span></span><span class="sig-name descname"><span class="pre">CheckAudioInterfaceHandler</span></span><a class="headerlink" href="#app.CheckAudioInterfaceHandler" title="Permalink to this definition"></a></dt>
@@ -2116,27 +2142,6 @@ during dispatch.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="app.view_buffer">
<span class="sig-prename descclassname"><span class="pre">app.</span></span><span class="sig-name descname"><span class="pre">view_buffer</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#app.view_buffer" title="Permalink to this definition"></a></dt>
<dd><p>View the contents of play_queue.buffer</p>
<p>Creates a tabulated page contining the contents of the play_queue.buffer deque.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="app.view_history">
<span class="sig-prename descclassname"><span class="pre">app.</span></span><span class="sig-name descname"><span class="pre">view_history</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#app.view_history" title="Permalink to this definition"></a></dt>
<dd><p>View the contents of play_queue.history</p>
<p>Creates a tabulated page contining the contents of the play_queue.history deque.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="app.view_queue">
<span class="sig-prename descclassname"><span class="pre">app.</span></span><span class="sig-name descname"><span class="pre">view_queue</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#app.view_queue" title="Permalink to this definition"></a></dt>
<dd><p>View the contents of play_queue.queue</p>
<p>Creates a tabulated page contining the contents of the play_queue.queue deque.</p>
</dd></dl>
</section>
<section id="module-asknavidrome.controller">
<span id="asknavidrome-controller"></span><h3>AskNavidrome controller<a class="headerlink" href="#module-asknavidrome.controller" title="Permalink to this heading"></a></h3>
@@ -2883,7 +2888,11 @@ is working</p>
</li>
</ul>
</li>
<li><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
<li><a class="reference internal" href="#troubleshooting">Troubleshooting</a><ul>
<li><a class="reference internal" href="#debug-options">Debug Options</a></li>
<li><a class="reference internal" href="#known-issues">Known Issues</a></li>
</ul>
</li>
<li><a class="reference internal" href="#code-documentation">Code Documentation</a><ul>
<li><a class="reference internal" href="#module-app">AskNavidrome main</a><ul>
<li><a class="reference internal" href="#app.CheckAudioInterfaceHandler"><code class="docutils literal notranslate"><span class="pre">CheckAudioInterfaceHandler</span></code></a><ul>
@@ -3024,9 +3033,6 @@ is working</p>
<li><a class="reference internal" href="#app.SystemExceptionHandler.handle"><code class="docutils literal notranslate"><span class="pre">SystemExceptionHandler.handle()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#app.view_buffer"><code class="docutils literal notranslate"><span class="pre">view_buffer()</span></code></a></li>
<li><a class="reference internal" href="#app.view_history"><code class="docutils literal notranslate"><span class="pre">view_history()</span></code></a></li>
<li><a class="reference internal" href="#app.view_queue"><code class="docutils literal notranslate"><span class="pre">view_queue()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-asknavidrome.controller">AskNavidrome controller</a><ul>