UNPKG

node-red-contrib-netbeast

Version:
59 lines (52 loc) 2.08 kB
<!-- Copyright 2016 Netbeast. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <script type="text/javascript"> RED.nodes.registerType('netbeast',{ category: 'IoT', color: '#3FADB5', defaults: { name: { value: '' } }, inputs: 1, outputs:1, icon: 'arrow-in.png', align: 'right', label: function() { return this.name || 'Netbeast' }, labelStyle: function() { return this.name ? 'node_label_italic' : '' } }) </script> <script type="text/x-red" data-template-name="netbeast"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="netbeast"> <p>A node for Netbeast Dashboard API. This node needs an <b>inject</b> node as input and a <b>debug</b> node as output, so you can check what you are sending. It expects a <b>JSON msg.payload</b> with the complete JSON object including the actions you want to do and <b>msg.topic</b> with the topic where you want to make that actions. You can choose your topic and what action you want to do on that topic. <br/><br/> For example, you can choose the topic <b>lights</b> and use this arguments: <pre>{"power": "on", "color": "#FF0080"}</pre> <br/> For full info about topics and arguments, have a look at <a href="//docs.netbeast.co">Netbeast API docs</a>. </p> </script>