Math node and display result on gauge

I’m doing a difference between two payload values( value4 - value3) using the math node.
I got that difference as dif.
The payload is displaying this value but it cannot be displayed on the gauge block.
On the device, dif is set as a string.


As it can be seen, the values value0 to value8 are correctly displayed.
According to the payload dif es a number.
Which can be a workaround for this ?
Thank you

Hi @Tron7,

The number will be cast as a string automatically when you update the state. However, it looks as though the state of your dif attribute is never being set. You will need to use your Device State Node to update the dif value in order to see it in a Gauge Block, like so:

Let me know how else I can help,
Julia

Thanks Julia
It does work !!!
Regards,

1 Like

Hi Julia

Can you help me to set a couple of trigger button at the dashboard ?
I have 6 slider and 6 button button operating nicely but when I trying to set up!
the 6th I do no get the corresponding slider in the drop down menu.
Please see attache pics
Pic%201|690x459

Thank you for some help.

Hi @Tron7,

It looks as though your default workflow version is set as 1.2.2. Thus, the changes you made to your develop version will not be reflected in your Input Control dropdown.

If you were to change your default version to develop, you would see your new Virtual Buttons in the dropdown.

Thanks!
Julia

Hi Julia

No matter what change I’m doing between default and develop versions, the Sliders 6 and 7 do not appear when I’m trying to set up the indicator 6 and 7 .
Currently the default Version was copied to develop and what I said above is happening.:sweat_smile:
Thank you.

Hi @Tron7,

Just took a look at your workflow and you are so close! I am still seeing that your default version is set to 1.2.2. You can change this by clicking the arrow next to your workflow name.

50%20AM

Thanks!
Julia

Hi Julia

I was trying to set to 0 the value displayed for a certain gauge based on the condition
of other payload’s data .
For example I would like to set 0, the gauge that render the data.value0 if the value
of data.value9 < 3.

What I did you is to use a mutate node but with no success.

Please see attached pictures;

Pic%204%20%207-26-19
Thank you for your help:smile:

Hi @Tron7,

The Mutate Node does not support operators, so your configuration would need to look like so to set value0 to 0:

Thanks!
Julia

1 Like

Hi there

Julia, even setting to zero the value template in the mutate node, it doesn’t set the data.value0 or data.value1 to zero in the payload.
I do can change the messages on two indicator blocks when data.value9 < 3.
Thank you.

Hi @Tron7,

I took a look at your workflow and your default workflow looks to be a version from July 21st. You will not see any changes unless you switch your default workflow to develop:

Thanks!
Julia

Hi Julia
I would need you valuable help again.
I’ve implemented with the same workflow other Dashboard using Image Overlay.
The function are the same that those implemented for the dashboard called Data Display.
The point is that when I’m adding set block and slider like those at the first dashboard and click on the set button, a red pop up comes up telling " Payload template did not render to valid JSON.
The setting for the set button and slider are the same that those running OK in the first dashboard
.

Thank you very much in advance.

Hi @Tron7,

You are getting this error as your {{range-0}} and {{range-1}} values are empty strings since the buttons don’t have access to these variables. You will only be able to access these variables if they are configured together in one Input Control Block.

Since all of these are in four separate blocks, they do not have access to each other’s values. I would recommend putting them in two separate blocks instead of four, so that the “Set Trigger Value” buttons have access to their respective sliders.

Thanks!
Julia

Thank you Julia:slightly_smiling_face:

I have another question.
Is there some possibility to create a one shot timer?
I mean the following:

  1. As per one “X” event the timer trigger for “Y” seconds.
  2. When the timer trigger a message or pop up is displayed.
  3. When timeout, the message or pop up disappear.
    That’s it.
    Thank you.

Hi @Tron7,

Currently, the only way to configure the Timer Node is on an interval or schedule, so no conditionals are accepted. You would not be able to use the Timer and Event Trigger simultaneously.

I don’t know how much this would help your use case (I believe you are using only a dashboard) but you could put a boolean attribute on a device and have a message appear based on if it is true or false with an Indicator Block. The timer functionality you are looking for would have to be self made to fit your use case.

Thanks!
Julia

1 Like

Hi Julia !

I’m using the overlay feature and I would need to erase some of the 10 images stored.
I don’t found a way to do that.
Can you help me ?
Thanks in advance.

Hi @Tron7,

Are you looking for how to delete a file? If you stored images in Losant, they are accessible in Files, which is in the Application menu under “Experiences.” If this is not what you were asking, could you please clarify the question? :smiley:

Thanks!
Julia

1 Like

Yes, you gave me the answer Thank you.:smile:

Hi Julia

So that an Email can be sent , which other conditions besides those included in the documentation should be met?

Thank you.

Hi @Tron7,

I’m not sure what your question is here? Could you provide more details?

It also looks like the question you have is a different topic than in this thread. Would you be able to start a new topic with you’re question please? It’s helpful for others searching for the same issues you may be facing. :slight_smile:

Thanks!