ShineServer_English version


3.1 Add collector

<p><strong>Brief description:</strong></p> <ul> <li>Add datalogger interface</li> </ul> <p><strong>Request URL:</strong></p> <ul> <li><code>http(s)://test.growatt.com/v1/device/datalogger/add</code></li> </ul> <p><strong>Request method:</strong></p> <ul> <li>post</li> </ul> <p><strong>Parameters:</strong></p> <table> <thead> <tr> <th style="text-align: left;">Parameter name</th> <th style="text-align: left;">Required</th> <th style="text-align: left;">Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">plant_id</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">int</td> <td>Power plant ID</td> </tr> <tr> <td style="text-align: left;">sn</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">string</td> <td>Datalogger SN</td> </tr> <tr> <td style="text-align: left;">c_user_id</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">int</td> <td>User ID</td> </tr> </tbody> </table> <p><strong>Call example</strong></p> <table> <thead> <tr> <th style="text-align: left;">Parameter name</th> <th style="text-align: left;">Required</th> <th style="text-align: left;">Value</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">plant_id</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">77</td> <td>Power plant ID</td> </tr> <tr> <td style="text-align: left;">sn</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">QXL0CGM00A</td> <td>Datalogger SN</td> </tr> <tr> <td style="text-align: left;">c_user_id</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">74</td> <td>User ID</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;plant_id&amp;quot;: &amp;quot;77&amp;quot;, &amp;quot;sn&amp;quot;: &amp;quot;QXL0CGM00A&amp;quot;, &amp;quot;c_user_id&amp;quot;: &amp;quot;74&amp;quot;, }</code></pre> <p><strong>Return example</strong></p> <pre><code>{ &amp;quot;error_code&amp;quot;: 0, &amp;quot;error_msg&amp;quot;: &amp;quot;&amp;quot; }</code></pre> <p><strong>Return parameter description</strong></p> <table> <thead> <tr> <th style="text-align: left;">Parameter name</th> <th style="text-align: left;">Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">error_code</td> <td style="text-align: left;">string</td> <td>Error code</td> </tr> <tr> <td style="text-align: left;">error_msg</td> <td style="text-align: left;">string</td> <td>Error message prompt</td> </tr> </tbody> </table> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">0</td> <td>Normal return</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_code&amp;quot;: 0, &amp;quot;error_msg&amp;quot;: &amp;quot;&amp;quot; }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10001</td> <td>System error</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_System error&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10001 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10002</td> <td>The power station ID is empty or the serial number of the collector is wrong</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_The power station ID is empty or the serial number of the collector is wrong&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10002 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10003</td> <td>The collector already exists</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_The collector already exists&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10003 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10004</td> <td>The power station does not exist</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_The power station does not exist&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10004 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10005</td> <td>The user does not exist</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_The user does not exist&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10005 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10006</td> <td>The user ID is empty</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_The user ID is empty&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10006 }</code></pre> <table> <thead> <tr> <th style="text-align: left;">error_code</th> <th>error_msg</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">10010</td> <td>When adding a collector failed</td> </tr> </tbody> </table> <pre><code>{ &amp;quot;error_msg&amp;quot;: &amp;quot;error_When adding a collector fail&amp;quot;, &amp;quot;data&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;error_code&amp;quot;: 10010 }</code></pre> <p><strong>Note</strong></p>

页面列表

ITEM_HTML