UNPKG

@runnane/node-red-contrib-easee

Version:

Module for streaming Easee data. Based on node-red-contrib-signalrcore

95 lines (83 loc) 3.24 kB
<!-- 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/x-red" data-template-name="easee-rest-client"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label> <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name" /> </div> <div class="form-row"> <label for="node-input-charger"><i class="fa fa-tag"></i> Charger</label> <input type="text" id="node-input-charger" data-i18n="[placeholder]node-red:common.label.name" /> </div> <div class="form-row"> <label for="node-input-site"><i class="fa fa-tag"></i> Site</label> <input type="text" id="node-input-site" data-i18n="[placeholder]node-red:common.label.name" /> </div> <div class="form-row"> <label for="node-input-circuit"><i class="fa fa-tag"></i> Circuit</label> <input type="text" id="node-input-circuit" data-i18n="[placeholder]node-red:common.label.name" /> </div> <div class="form-row"> <label for="node-input-configuration"><i class="fa fa-bookmark"></i> Account</label> <input type="text" id="node-input-configuration" /> </div> </script> <script type="text/javascript"> (function () { RED.nodes.registerType("easee-rest-client", { category: "network", defaults: { name: { value: "" }, charger: { required: false }, site: { required: false }, circuit: { required: false }, configuration: { type: "easee-configuration", required: true }, inputs: { value: 1 }, outputs: { value: 1 }, }, color: "#F3B567", inputs: 1, outputs: 1, icon: "feed.svg", label: function () { return ( this.name || (this.charger ? "Charger: " + this.charger : false) || (this.site ? "Site: " + this.site : false) || (this.circuit ? "Circuit: " + this.circuit : false) || "easee REST Client" ); }, paletteLabel: "easee REST Client", }); })(); </script> <script type="text/markdown" data-help-name="easee-rest-client"> Simple REST client for the easee public API ### Inputs : topic (string) : the command of the message to send (see below) ### Outputs 1. Command response : payload (object) : the response from the ### Details Configure the node with username/password and a Charger ID ("EH000000"). Send the your selected command as the topic into the node. Implemented commands that may be sent as topic, are: - `login` - `refresh_token` - `charger` - `charger_details` - `charger_state` - `charger_site` - `charger_session_latest` - `charger_session_ongoing` </script>