New API


Set the time period and mode

<p><strong>Brief Description:</strong> </p> <ul> <li>Set the time period and machine mode of the device based on the device type noah and the SN of the device, and the data returned by the interface only returns the device setting result that the key token has permission to access, and the device without permission will not be set and will not return the result</li> <li>'Device Type' is the deviceType parameter in the API for obtaining the device list. `</li> <li>'Current interface frequency 5S once'</li> <li>Note: Currently, only the time period and machine mode settings of the NOAH device type machine are supported. `</li> </ul> <p><strong>Request URL:</strong> </p> <ul> <li><code>http(s)://openapi.growatt.com/v4/new-api/setTimeSegment</code></li> </ul> <p><strong>Request method:</strong></p> <ul> <li>POST </li> </ul> <p><strong>Content-Type:</strong></p> <ul> <li>application/x-www-form-urlencoded </li> </ul> <p>Http Header Parameters and Description: </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;">token</td> <td style="text-align: left;">Yes</td> <td style="text-align: left;">String</td> <td>keytoken</td> </tr> </tbody> </table> <p>Http body parameters and description: </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;">deviceSn</td> <td style="text-align: left;">is</td> <td style="text-align: left;">string</td> <td>device SN, example: xxxxxxx</td> </tr> <tr> <td style="text-align: left;">deviceType</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>[Equipment type](<a href="https://www.showdoc.com.cn/p/e9f6e73f251e6364fe1d43e9d4cc1eec">https://www.showdoc.com.cn/p/e9f6e73f251e6364fe1d43e9d4cc1eec</a> &quot;Equipment type&quot;)</td> </tr> <tr> <td style="text-align: left;">type</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>time period (1~9), example: 1</td> </tr> <tr> <td style="text-align: left;">startTime</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>start time (hours:minutes), Example: 01:06</td> </tr> <tr> <td style="text-align: left;">endTime</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>end time (hours:minutes), Example: 02:05</td> </tr> <tr> <td style="text-align: left;">mode</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>machine mode (0: load priority, 1: battery priority), example: 0</td> </tr> <tr> <td style="text-align: left;">power</td> <td style="text-align: left;">is</td> <td style="text-align: left;">string</td> <td>output power (range 0-800 in w), example: 150</td> </tr> <tr> <td style="text-align: left;">enable</td> <td style="text-align: left;">yes</td> <td style="text-align: left;">string</td> <td>time period switch (0: off, 1: on), example: 0</td> </tr> </tbody> </table> <p><strong>Call Example</strong></p> <pre><code>{ &amp;quot;deviceSn&amp;quot;: &amp;quot;FDCJQ00003&amp;quot;, &amp;quot;deviceType&amp;quot;: &amp;quot;noah&amp;quot;, &amp;quot;startTime&amp;quot;: &amp;quot;01:06&amp;quot;, &amp;quot;endTime&amp;quot;: &amp;quot;02:05&amp;quot;, &amp;quot;mode&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;power&amp;quot;: &amp;quot;150&amp;quot;, &amp;quot;enable&amp;quot;: &amp;quot;0&amp;quot; }</code></pre> <p><strong>Example of Return</strong> succeed</p> <pre><code> {     &amp;quot;code&amp;quot;: 0,     &amp;quot;data&amp;quot;: null,     &amp;quot;message&amp;quot;: &amp;quot;PARAMETER_SETTING_SUCCESSFUL&amp;quot; }</code></pre> <p>Permission denied No token specified or token exception</p> <pre><code>{     &amp;quot;code&amp;quot;: 101,     &amp;quot;message&amp;quot;: &amp;quot;PERMISSION_DENIED&amp;quot; }</code></pre> <p>Failed to set the parameters</p> <pre><code>{     &amp;quot;code&amp;quot;: 6,     &amp;quot;data&amp;quot;: null,     &amp;quot;message&amp;quot;: &amp;quot;PARAMETER_SETTING_FAILED&amp;quot; }</code></pre>

页面列表

ITEM_HTML