# \[Solved\] Gauge not display data

**URL:** <https://forums.losant.com/t/solved-gauge-not-display-data/1448>\
**Category:** Help\
**Tags:** particle, gauge\
**Created:** [January 16, 2019, 5:16am UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448 "2019-01-16T05:16:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 16, 2019, 5:16am UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/1 "2019-01-16T05:16:19Z")

</div>

I am using the following example as reference to build my code.

> **[How to Integrate Particle with Losant](https://www.losant.com/blog/how-to-integrate-particle-with-losant)**
>
> This is a quick reference on how to connect Particle, a maker of inexpensive IoT hardware, with the Losant IoT Platform.

The point is that I have data at the debug node, I mean particle photon sends data but nothing is displayed on the gauge. The gauge just shows " Connected waiting for data…"  
Thank for help.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [January 16, 2019, 12:22pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/2 "2019-01-16T12:22:43Z")

</div>

I took a look in your account; you have two applications (we’ll call them Application A and Application B here in this public forum). Application A has the [Particle integration](https://docs.losant.com/applications/integrations/#particle) set up and you are correctly reporting `voltage` data to your device via a [Particle trigger](https://docs.losant.com/workflows/triggers/particle/) in a workflow.

Application B has a workflow with a [webhook trigger](https://docs.losant.com/workflows/triggers/webhook/) - the name of which suggests it is used in conjunction with Particle - and in that workflow you are using the request body to set state data on a different device. It is this device whose data you are attempting to graph on a dashboard. It also appears that this device has never had its state data reported.

So I’m not sure if you have your dashboard block configured incorrectly in that it’s pointing at the wrong device; if it’s pointing at the right device but you’re not setting state data in your workflow correctly (I can’t help much there without knowing what the body of your webhook request looks like); or if there is a different issue altogether. But if you can provide more information to us in light of the explanations above, we would be happy to help further.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 17, 2019, 4:18am UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/3 "2019-01-17T04:18:28Z")

</div>

Please see attached pics.  
Debug node on workflow shows values OK

The Dashboard has 3 gauges, the pics show just one but anyone doesn’t display data.  
Pic1 shows weird info

 ![Application1](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/cd9cb87be1600d8b63281f6a4b5118dac401eb1f.png)  
 ![Dashboard1](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/480d9579b12ecd91068839627a7ea28b4e9a1607.png)  
 ![Dashboard2](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/dfe2379c2bcf9cb0eb820110a9860a95d5d2c3fe.png)  
 ![Device1](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/5d04d6e770e2b14a137f02ea66bce783346f7abf.png)  
 ![Device2](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/cca6b43bd20d0808fc8e49ba354b87c6f5851676.png)  
 ![Pic%201](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/d0845e6c98798dc2b551d309da67bd0d4237b3f1.png)  
 ![Workflow%20Function](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/7474179884894e3a25284b7aec7c2ae8eb73a84d.png)  
 ![Workflow%20Device%20State](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/1d0b06c8d4b260f942922a44d6ee91ae2054ca6e.png)  
 ![Workflow%20Device%20get](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/887ab05a1cca7d917e1a228507000e942d8a534e.png)

CODE

```auto
/**
 * 
 * Copyright (c) 2016 Losant IoT. All rights reserved.
 * https://www.losant.com
 */
 int value0 = 0;
 int value1 =4;
 int value2 = 7;

/**
 * Called automatically by Photon once when the device
 * is powered on.
 */
void setup() {
    
    Serial1.begin(56700);
  
        
   
     
}

 
void loop() {
     value0++;
     value1++;
     value2++;
  
   
   Particle.publish("Photon_test1", (String)value0 + ":" + (String)value1 + ":" + (String)value2 );
   
   
   Serial1.println(value0);
   Serial1.println(value1);
   Serial1.println(value2);
   
   
    delay(10000);
}

```

Hope you can help me  
Thanks

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 17, 2019, 10:25pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/4 "2019-01-17T22:25:21Z")

</div>

Hi there !  
Can expect some help with that ?  
Thanks

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 18, 2019, 10:26pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/5 "2019-01-18T22:26:34Z")

</div>

@Dylan_Schuster  
Hi Dylan how long I would need to wait for some help 😅

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [January 18, 2019, 10:52pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/6 "2019-01-18T22:52:15Z")

</div>

From a high-level, it looks as though your workflow is attempting to report the attributes `Data0`, `Data1`, and `data2`, but those are not defined on your device. The device has attributes `value0`, `value1`, and `value2`.

You’ll need to change the workflow to report the correct attributes using the Device State node. Once those are reported, you can then visualize those on the dashboard.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [January 18, 2019, 10:55pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/7 "2019-01-18T22:55:49Z")

</div>

You can see in the Application Communication Log whether or not attributes are being reported correctly. In your provided screenshot, you can see the log is indicating the supplied attributes are not defined on the device:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/3ddc5dc5437e423d0bfaf5b79391ad98925ee430.jpeg)

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 18, 2019, 11:39pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/8 "2019-01-18T23:39:01Z")

</div>

Thank you.  
I will correct my errors.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 20, 2019, 7:40pm UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/9 "2019-01-20T19:40:44Z")

</div>

Thanks, I fix my issue I have the gauges display the values.  
I am wondering if you can give me some tips for the following:  
My project is about reading sensors, I am planing to set up 6 slider  
so that the customer can choose a value on each slider .  
Those values should be limits for healthy sensor reading and eventually send alarm messages.  
I would need to retrieve those sliders values to make comparatives  
with the sensor reading.  
How can I do that?  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [January 23, 2019, 4:24am UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/10 "2019-01-23T04:24:29Z")

</div>

I would recommend invoking a workflow with the data to store the slider values either on the device’s tags or in a Data Table. If you’re using a [Context Variable](https://docs.losant.com/dashboards/context-variables/) for the device ID, that is available when building the button payload for the Input Controls block. For example, the payload could look something like this:

```nohighlight
{
  "limit1" : {{range-0}},
  "limit2" : {{range-1}},
  ...
  "deviceId": "{{ctx.deviceId}}"
}

```

This will allow you to pass the current device ID (`ctx.deviceId`) into the workflow so you can properly associate the range values with the device.

In the workflow, I would recommend [updating the device](https://docs.losant.com/workflows/data/update-device/) based on that ID and setting tags for each value. The device tags work well because they will automatically be provided by the [Device State Trigger](https://docs.losant.com/workflows/triggers/device/). You can then compare the current value to the ranges specified by the sliders to determine if an alert should be generated.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 24, 2019, 2:36am UTC](https://forums.losant.com/t/solved-gauge-not-display-data/1448/11 "2019-01-24T02:36:48Z")

</div>

Thanks, I will try you suggestion.!!!
