The use of the ESP8266 in the world of IoT

User avatar
By 4refr0nt
#55398 New beta 1.5.1 released (join to testing)
    UI redesign
    Color theme changer included 14 preinstalled color themes
    Refresh rate limiter against agressive brokers
    More documentations - see “Help” in main menu
    Dashboard “pull to refresh”
    Bug fix
Image
User avatar
By scargill
#55517 Looking good but I'm having a refresh issue. I've set this up in Node-Red - firing out setup info for 3 pages - some simple on off switches, some water level gauges on page 2 and a couple of temperature STEEL indicators on page 3.

On power up - without sending any values to anything... the on off switches appear normally, the water level meters don't appear at all and the thermometers show ok.

If I send values, the switches work - the level meters appear (why) and the thermometers fill up nicely.

But as I switch pages back and forth, the water level meters disappear again, the thermometers disappear and the only thing that stays put are the switches.

As I send more values to all, the switches continue to work, the water level meters re-appear, but the thermometers never re-appear.

Can someone tell me what I'm doing wrong.

msg.topic="/IoTmanager/bedrock/config";

var config1 = {"id":"1",
"page":"control",
"pageId":"1",
"descr":"pump 1",
"widget":"toggle",
"itemstyle" : "",
"itemclass" : "",
"topic":"/IoTmanager/bedrock/pump1",
"color":"orange",
"style":""
};

msg.payload=JSON.stringify(config1);
node.send(msg);

var config2 = {"id":"2",
"page":"control",
"pageId":"1",
"descr":"pump 2",
"widget":"toggle",
"style1" : "",
"class1" : "",
"topic":"/IoTmanager/bedrock/pump2",
"color":"blue",
"style":""
};

msg.payload=JSON.stringify(config2);
node.send(msg);

var config3 = {"id":"3",
page : "levels",
pageId : "2",
widget : "fillgauge",
class1 : "item no-border",
style1 : "",
descr : "Water level",
class2 : "light text-center",
style2 : "font-size:24px;font-weight:bold;padding-bottom:5px;",
topic : "/IoTmanager/bedrock/fillgauge3",
width : "150",
height : "150",
class3 : "text-center",
style3 : "",
widgetConfig : {
}
};

msg.payload=JSON.stringify(config3);
node.send(msg);

var config4 = {"id":"4",
page : "levels",
pageId : "2",
widget : "fillgauge",
class1 : "no-border text-center col-xs-4",
style1 : "",
descr : "Fuel level",
class2 : "assertive text-center",
style2 : "font-size:14px;padding-bottom:5px;",
topic : "/IoTmanager/bedrock/fillgauge4",
width : "70px",
height : "70px",
class3 : "text-center",
style3 : "",
widgetConfig : {
circleColor : "#FF7777",
textColor : "#FF4444",
waveTextColor : "#FFAAAA",
waveColor : "#FFDDDD",
circleThickness : 0.2,
textVertPosition : 0.2,
waveAnimateTime : 1000
}
};

msg.payload=JSON.stringify(config4);
node.send(msg);

var config5 = {
id : "5",
page : "levels",
pageId : "2",
widget : "fillgauge",
class1 : "no-border text-center col-xs-4",
style1 : "",
descr : "Water level",
class2 : "energized",
style2 : "font-size:14px;padding-bottom:5px;",
topic : "/IoTmanager/bedrock/fillgauge5",
width : "70px",
height : "70px",
class3 : "text-center",
style3 : "",
widgetConfig : {
circleColor : "#D4AB6A",
textColor : "#553300",
waveTextColor : "#805615",
waveColor : "#AA7D39",
circleThickness : 0.1,
circleFillGap : 0.2,
textVertPosition : 0.8,
waveAnimateTime : 2000,
waveHeight : 0.3,
waveCount : 1
}
};

msg.payload=JSON.stringify(config5);
node.send(msg);


var config6 = {
id :"6",
page : "therms",
pageId : "3",
descr :"Steel 1",
widget :"steel",
topic : "/IoTmanager/bedrock/fillgauge6",
widgetConfig : {
width : "auto",
height : 100,
type : "Linear",
titleString: "Thermometer 1",
unitString : "temp C",
threshold: 90
}
};
msg.payload=JSON.stringify(config6);
node.send(msg);

var config7 = {
id :"7",
page : "therms",
pageId : "3",
descr :"Steel 1",
widget :"steel",
topic : "/IoTmanager/bedrock/fillgauge7",
widgetConfig : {
width : "auto",
height : 100,
type : "Linear",
titleString: "Thermometer 1",
unitString : "temp C",
threshold: 90
}
};

msg.payload=JSON.stringify(config7);
node.send(msg);