Bladeren bron

Update README

Luigi Cisana 6 jaren geleden
bovenliggende
commit
1490f1469f
2 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 1 1
      README.md
  2. 4 0
      ramp-thermostat/ramp-thermostat.js

+ 1 - 1
README.md

@@ -25,7 +25,7 @@ The hysteresis is used to prevent osciliation. The `[+]` value is added to the t
 
 ## Usage
 
-This node expects a numeric msg.payload containing the current temperature (number). The msg.topic should be `empty` or set to `setCurrent`. It will calculate the target temperature depending on msg.payload at the current time and output 3 values:
+This node expects a `numeric` msg.payload containing the current temperature (number). The msg.topic should be set to `setCurrent`. It will calculate the target temperature depending on msg.payload at the current time and output 3 values:
 
 * state (boolean)
 * current temperature (number)

+ 4 - 0
ramp-thermostat/ramp-thermostat.js

@@ -63,6 +63,7 @@ module.exports = function(RED) {
       } else { 
         switch (msg.topic) {
           case "setCurrent":
+          case "setcurrent":
           case "":
           case undefined:
             if (typeof msg.payload === "string") {
@@ -86,6 +87,7 @@ module.exports = function(RED) {
             break;
             
           case "setTarget":
+          case "settarget":
             result = setTarget(msg.payload);
             
             if (result.isValid) {
@@ -97,6 +99,7 @@ module.exports = function(RED) {
             break;
           
           case "setProfile":
+          case "setprofile":
             //this.warn(JSON.stringify(msg.payload));
             result = setProfile(msg.payload);
             
@@ -124,6 +127,7 @@ module.exports = function(RED) {
             break;
             
           case "checkUpdate":
+          case "checkupdate":
             var version = readNodeVersion();
             var pck_name = "node-red-contrib-ramp-thermostat";