# Nicedevil's Starting Questions

**URL:** <https://discourse.nodered.org/t/nicedevils-starting-questions/14454>\
**Category:** General\
**Created:** [18 August 2019 15:39 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454 "2019-08-18T15:39:49Z")\
**Posts on this page:** 17\
**Page:** 5

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 09:36 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/81 "2019-08-25T09:36:35Z")

</div>

mhhh, looks like this

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8800b55cccc7f90147b9584e5bcba431ee7810a8.png)

first function determines if harmony set's devices on or off (status = 1 or status = 3).  
if I turn devices on the shelly plug is turned on immediatly (that's the way to function on top)  
this function only sets the msg.payload = "on" for the switch (that is connected to this link)

the normal msg.object.... is sent to the lower line over delay (7 sec) and so on

if I turn devices off the first function set the msg.payload to off and the switch is turned off after the delay of 7 sec as well (so harmony got enough time to first turn devices soft off with the programmed activity).

will give your suggestion a try 🙂 will report back when I'm done.

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 09:51 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/82 "2019-08-25T09:51:09Z")

</div>

is there an option to just put out a value without decimals on gauge?

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e7a368dd3041be1f4bb13d17ee72fb6e7c50cc38.png)

I'm startpaging around for gauge valueformat for node-red and I'm just finding guys that descibe hwo to get a gauge 😕

I can do it with a function that round everything mathematicaly correct but I would like to get the flow as clean as possible... so maybe it is even possible with just this part of gauge?

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c86132b1f9b382239ce1ed31dfe42b3df6755007.png)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 August 2019 09:54 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/83 "2019-08-25T09:54:34Z")

</div>

Yes, as described in the info panel for the gauge node

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 09:56 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/84 "2019-08-25T09:56:24Z")

</div>

ahahahah.... how stupid I am... got the debug window on all the time xD

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 10:21 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/85 "2019-08-25T10:21:32Z")

</div>

hey @cymplecy I noticed that I was wrong with those messages...

the debug node was set to msg.payload and not the whole message... that's why I didn't see everything 🙂  
So I was able to send the whole object with all those different messages in one object (with payload).  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8a22ffb9a6220c13e76b9dcc8e847e3f08dc2e50.png)

Now I just want to check if the switch for my homecinema is already turned on, if tho I don't have to send the activity over node-red. Is it possible to check this inside a javascript function?

EDIT: One solution would be to just activate those Harmony Activities when the switch is pressed directly attached to the switch 😃

EDIT2: Oh no that won't work ☹ because the switch won't send the activities 😕

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 10:55 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/86 "2019-08-25T10:55:47Z")

</div>

Mhhh maybe I have a solution for that but I can't find out how to access a flow or even global variable?  
I was able to set this variable in function A but not able to get it in function B

function A:

```auto
if (msg.payload == "on") {
    flow.set("HKswitch", "on");
} else {
    flow.set("HKswitch", "off");
}

```

Result:  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7e4bed03df8407c185bd96303fd9fd75cc58b4e8.png)

function B:

```auto
var text = flow.get(HKswitch);
msg.payload = "text";
return msg;

```

Result after injection:  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/086a1dc027453f126902a93c37b631ec7699cb89.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 August 2019 11:43 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/87 "2019-08-25T11:43:41Z")

</div>

> [@nicedevil](#):
>
> ```auto
> var text = flow.get(HKswitch);
> 
> ```

You are missing the quotes around `HKswitch`.

```auto
var text = flow.get("HKswitch")

```

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 14:10 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/88 "2019-08-25T14:10:49Z")

</div>

Ok I'm done now with the harmony 🙂

one less node for this

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/14b9146f8ac33cd9a20bf8b4ad7c4b7396c0aca0.png)

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [25 August 2019 15:37 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/89 "2019-08-25T15:37:01Z")

</div>

I've found the awesome averagebars node but it needs a bit (not a bit, think 3-4 times) wider widget size then I'm able to setup manually.

is there a way to hardcode the widgetsize for just the dashboard templates?

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [27 August 2019 15:41 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/90 "2019-08-27T15:41:05Z")

</div>

Mhhh guys,

the problem with crashed browser is back after a few hours of running charts on my dashboard.

If found something ([https://github.com/node-red/node-red-dashboard/issues/38](https://github.com/node-red/node-red-dashboard/issues/38)) that other guys got the same issue but I don't know how to solve it. The guys are telling that the values that are needed to fill a chart are all saved on the machine also if they are not needed anymore for displaying the whole graph (f.e. last 24 hours).

So my first question is: Is it possibile to only send one value every 1 minute to the chart instead of every time they change?  
And is it possible to clear the cache of values that are not needed anymore?

I have a join node with this f.e.:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/4e72c3c462da969dac31fa32d4b5f7c02902aea8.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 August 2019 17:16 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/91 "2019-08-27T17:16:20Z")

</div>

You can use a delay node set to rate limit mode and ignore intermediate messages.

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [28 August 2019 07:03 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/92 "2019-08-28T07:03:42Z")

</div>

Gave this a try, will report back if it won't fix it.

What could be the problem if a switch won't show the correct status after 1-2hours?  
The MQTT Device is connected.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/65b4be94f5b2a6f248f253e3f74a1522d8152bca.png)

EDIT: nevermind, fixed it while rebooting the mqtt switch 🙂

EDIT2: Problem still exists, after redeploying the flow the device status won't be shown anymore and keeps at that state. all other switches works like a charm.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 August 2019 18:37 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/93 "2019-08-28T18:37:47Z")

</div>

the switch expects the input type to match the output - so 0 (number) is not the same as "0" (string) - etc... so unless they match the input will have no effect.

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [27 September 2019 20:19 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/94 "2019-09-27T20:19:53Z")

</div>

Hey guys, I'm back with new questions 🙂

I managed to get a PIN pad on my dashboard. I have one switch that should not accidentialy pressed while doing finger stuff on my smartphone 😛

So my idea was to enter a PIN on my new PIN pad and if the PIN is correct the switch that could be activated will be shown on the dashboard. After a given period of time the button will be hide again.

Is that possible ?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [27 September 2019 20:25 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/95 "2019-09-27T20:25:12Z")

</div>

As this is a new question, please open a new thread. That way if someone has a similar issue they are more likely to find a thread that’s relevant to them

---

<div class="post-metadata">

**Author:** ![nicedevil](https://avatars.discourse-cdn.com/v4/letter/n/858c86/32.png) [@nicedevil](https://discourse.nodered.org/u/nicedevil)\
**Post date:** [27 September 2019 20:26 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/96 "2019-09-27T20:26:02Z")

</div>

> [@nicedevil](#):
>
> Hey guys, I'm back with new questions 🙂
> 
> I managed to get a PIN pad on my dashboard. I have one switch that should not accidentialy pressed while doing finger stuff on my smartphone 😛
> 
> So my idea was to enter a PIN on my new PIN pad and if the PIN is correct the switch that could be activated will be shown on the dashboard. After a given period of time the button will be hide again.
> 
> Is that possible ?

kk will do so 🙂

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [6 June 2020 19:00 UTC](https://discourse.nodered.org/t/nicedevils-starting-questions/14454/97 "2020-06-06T19:00:16Z")

</div>

Closed on 6 June 2020 19:00 UTC



[Previous page](https://discourse.nodered.org/t/nicedevils-starting-questions/14454.md?page=4)
