Help with dashboard/widget

I have an arduino setup with three temperature sensors. This works fine for well over a year.
I made a couple of refinements last Feb.
Still works no problem.
I now track the Min and Max values and if greater upload the data to dashboard using deprecate channels.
I have a trigger set in dashboard to reset min and max values at midnight each day.
This works no problem.
What I would like to see in the app is a widget or display of the time that reading was uploaded.
i.e. if the minimum temp is updated to -6.4 (as it was last night) what time was that?
At the moment I have to login and look at the raw data uploads.
There must be a simpler solution!
Thanks guys.

We don’t have a timestamp widget on the dashboard, you can check the timestamp in the data tab.
if you want a timestamp then you can create two separate widgets (Hrs: Min) which sends the time to cayenne.

Thanks Shramik.
Yes logging in and looking at data tab is way I do it. Was looking for a quicker in IOS app. The two widgets would work but I would need to add a Real Time Clock to my ESP setup
Thanks

I had the same thought! :grinning:
I have got that working thanks.
Its a bit of a pain having to have 2 widgets, 1 for Hour, 1 for Minute.
Thought?
Any way of combining these into 1.
i.e. 12Hour & 24Min, make it into a float 2 decimal places and upload as 12.24
OR combine them into a string “12” + “:” + “24” then show in dashboard as a string
Thanks again

Solved this…
CODE BASICS (adapt to your own)
Set variables as float for HOUR, MINUTES, TIME
Get hours from NTP input into hour
Get minutes from NTP input into minutes
time = (hour + (minutes/100));

Cayenne.virtualWrite(0, time, “counter”, “null”);
In dashboard change widget type to Value, analogue, 2 dec places and icon to date/time

you then have one widget that shows
22.59

Thank You

Awesome workaround @dc.web it would be great if you can share a screenshot and the code for it so that other community members can have a look at it.

Here is the basic (very!) test code (adapt to your own sketch).
And screen shot.
After uploading change the widget the dashboard creates to
VALUE, Counter, icon to date/time, 2 decimal places.

// Basic Test Code to get NTP TIME. Upload Time to Cayenne as single widget

#if !( defined(ESP8266) || defined(ESP32) )
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#include <NTPClient_Generic.h>
#include <CayenneMQTTESP8266.h>

#if (ESP32)
#include <WiFi.h>
#elif (ESP8266)
#include <ESP8266WiFi.h>
#endif

#include <WiFiUdp.h>

char ssid = “xxx”; // your network SSID (name)
char wifiPassword = “xxx”; // your network password

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “xxx”;
char password = “xxx”;
char clientID = “xxx”;

WiFiUDP ntpUDP;
#define CAYENNE_PRINT Serial

#define TIME_ZONE_OFFSET_HRS (-4)

int chk;
// Define variables for storing Hour and Minutes for Max Temp, and combined Hour.Min
float MaxTempHour = 0;
float MaxTempMin = 0;
float MaxTempTime = 0.0;

NTPClient timeClient(ntpUDP);

void setup()
{
Serial.begin(115200);
// Connect to Cayenne and WiFi
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
delay (500);

Serial.print(F("\nESP_NTPClient_Basic started @ IP address: "));
Serial.println(WiFi.localIP());

timeClient.begin();
timeClient.setTimeOffset(3600 * TIME_ZONE_OFFSET_HRS);
// default 60000 => 60s. Set to once per hour
timeClient.setUpdateInterval(SECS_IN_HR);

Serial.println("Using NTP Server " + timeClient.getPoolServerName());
}

void loop()
{
Cayenne.loop();

timeClient.update();
// sensors.requestTemperatures();

if (timeClient.updated())
Serial.println(“UPDATED”);
else
Serial.println(“NOT UPDATED”);

Serial.println("UTC : " + timeClient.getFormattedUTCTime());

MaxTempHour = timeClient.getUTCHours();
MaxTempMin = timeClient.getUTCMinutes();
Serial.println(String("UTC :Hr ") + MaxTempHour) ;
Serial.println(String("UTC :Min ") + MaxTempMin) ;

MaxTempTime = (MaxTempHour + (MaxTempMin/100));

Serial.println(MaxTempTime); // check correct output

// upload to Cayenne on channel 0, replace with your virtual channel to suit existing/dashboard
Cayenne.virtualWrite(0, MaxTempTime, “counter”, “null”);

delay(20000);

}

Any idea on this quirk Shramik.
The times widgets I have setup for my temperature sensors are working fine in the dashboard. 2 decimal places.
When I look on my phone IOS app they are only 1 decimal place so 23.59 shows as 23.6

we don’t support the cayenne app anymore. we have deprecated the service.

That is very disappointing for most people they access via phone apps.