UNPKG

victron-vrm-api

Version:
45 lines (44 loc) 2.25 kB
<script type="text/javascript"> RED.nodes.registerType('config-vrm-api',{ category: 'config', credentials: { token: { type: 'password', validateChanged: RED.validators.regex(/^[a-z0-9]{64}$/) }, }, defaults: { name: { value: "" }, forceIpv4: { value: false }, useBetaApi: { value: false } }, label: function() { return this.name || 'VRM API'; } }); </script> <script type="text/html" data-template-name="config-vrm-api"> <div class="form-row"> <label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-config-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-config-input-token"><i class="fa fa-user-secret"></i> VRM token</label> <input type="password" id="node-config-input-token" placeholder="VRM token" required> </div> <div class="form-row" style="margin-bottom:0px;"> <input type="checkbox" id="node-config-input-forceIpv4" style="display:inline-block; margin-left:8px; width:auto; vertical-align:top;"> <label style="min-width:390px" for="node-config-input-forceIpv4"> Force IPv4 connections</label> <div style="margin-left: 30px; margin-top: 5px; color: #666; font-size: 0.9em; max-width: 380px;"> Enable this if you experience connection issues. Forces the API client to use IPv4 instead of IPv6. </div> </div> <div class="form-row" style="margin-bottom:0px; margin-top: 12px;"> <input type="checkbox" id="node-config-input-useBetaApi" style="display:inline-block; margin-left:8px; width:auto; vertical-align:top;"> <label style="min-width:390px" for="node-config-input-useBetaApi"> Use beta API environment</label> <div style="margin-left: 30px; margin-top: 5px; color: #666; font-size: 0.9em; max-width: 380px;"> Enables access to endpoints and attributes marked <em>(beta)</em> that are not yet available on the production API. All other endpoints continue to use the production API regardless of this setting. </div> </div> </script>