[Solved] Gauge not display data

particle
gauge

#1

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

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.


#2

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 set up and you are correctly reporting voltage data to your device via a Particle trigger in a workflow.

Application B has a workflow with a webhook trigger - 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.


#3

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









CODE

/**
 * 
 * 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


#4

Hi there !
Can expect some help with that ?
Thanks


#5

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


#6

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.


#7

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:


#8

Thank you.
I will correct my errors.


#9

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.


#10

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 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:

{
  "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 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. You can then compare the current value to the ranges specified by the sliders to determine if an alert should be generated.


Retrieve value from slider
#11

Thanks, I will try you suggestion.!!!