BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

The Table Widget needs more values

I think the Table Widget needs a second value added as an option.

icon | name | value0
or maybe
name | value0 | value1

Even if you dont show value1, its still logged but will be hidden for reference later on.

BLYNK_WRITE(V1) {
String cmd = param[0].asStr();
   if (cmd == "select") {
       //row in table was selected. 
       int rowId = param[1].asInt();
       //value0 in table was recalled.
       int value0 = param[2].asInt();
       //value1 in table was recalled. 
       int value1 = param[3].asInt();
   }
}

What do you think?

1 Like

As a workaround, I have figured out that you can use a String as the IndexNumber so it acts as a value you can recall when you “select” a row.

EDIT: Spoke too soon… seems that as soon as it passes as a String, the table doesnt build.

Thanks!

We’d wait for more feedback. This widget appeared thankfully to one of our clients who agreed to share our custom development with the community.

1 Like

Even just adding the option to recall the name or value would be handy.

This way I could create a second table, use the same rowIndex on each to link the rows together, then store different values on each table.

Then using hte rowIndex when selecting a row would then be able to pull data from the name or value on the other table.

My main use-case for this is that I want to use the Table as FTP file browser but just lack the available value areas.

Also another great option would be to have the table rows deselected when they’re entered.
Or have the option to deselect a row via the index number

Example:

Blynk.virtualWrite(V1, "deselect", rowIndex);
Blynk.virtualWrite(V1, "select", rowIndex);
Blynk.virtualWrite(V1, "unpick", rowIndex);
2 Likes

Table is rarely used widget, so yeap, we will wait for more feedback :slight_smile: until any actions .

I believe it could be one of the most powerful widgets!
I should put out a challenge to the Blynk community to come up with new ideas with the table!

What use-case did your clients use it for?

Just a static holder for SD card content.

You could easily step it up with a few extra properties like i mentioned above and turn it in to a full on SD card file browser.

Combined with the Player widget, you could have a mobile SD card stored MP3 player with FS browser

2 Likes

Use for logging specific intervals?

the history graph, is missing some ways of showing stuff.

I want to see a summarized result for every day. Would this table be a good place to log it into?

At the moments I reset a variable every day, to see the max pr day in the history graph.

Just my two cents on an older topic. I have found the table widget to be very useful for easily logging sparse and intermittent data sets. As @tjohansen mentioned, it has some advantages over the history graph in certain applications. In my use case, it has been handy for logging and subsequent troubleshooting of relatively infrequent events. I worked up a cryptic set of compact status codes and concatenated them together with the uptime. This helped me isolate an intermittent problem with a connected sensor that turned out to just need a periodic reset.

Thanks for the great work, Blynkers.

Mitch

I just tried out the table for logging results of a day.

Its ok for that, but comes with some sacrifices:

  • It can only hold 100 posts
  • it resets when power off
  • there are not much control of formats like the labeled value field
  • I wanted to log two/three results in one post/line

In a perfect scenario, I could log date, and value1 and value2, because I want to log the date, the min/max temp of the day and the khw use of my heatpump.

At the moment I can only log min/max as on post and a second post with my kwh.

In my graphs I reset a variable every night for the temps.

My screens, sorry they are in danish.
And the graphs going crazy is power offs and testing.

Two posts per day, one with the kwh use and one withthe min/max temp, and the funny thing is that no matter how wide I make the table it cuts off the values to the right.
the Yellow numbers in the buttom is just testing a bmp180.

the bottom graph, green line, you can see I resets it every night.

1 Like

Thanks for the update. Beautiful work, thanks for sharing it.

My use case was much simpler, but I ran into the same limitations. In my case, I have a capacitative moisture sensor that delivers an analog value to a pin on my arduino yun. I am trying to save power, so do not want the sensor powered except when reading it. However, since the sensor is capacitative, not resistive, it needs time for the charge to build. I needed to empirically determine the minimum amount of time needed to turn on the digital pin that provides the power before taking a reading under a variety of soil moisture conditions.

Because of this, I only needed the table to work during my calibration tests, not log for long sessions. I agree that this widget has huge potential and needs just a few limitations removed to achieve it. I have also found the terminal widget useful for querying variable states but the table widget requires much less coding that distracts from the main task.

My two øre,

Mitch

This can be changed if running a local server. I set mine to 10,000 and it works just fine.

Remove the “clr” command from your setup().

1 Like

forgot about that, stupid me :slight_smile:

is it possible to delete single posts in a table with a button?

I think so. Check out the Table Advanced widget example.

Hi, how you add in the table widgey date stamp?

Hi @morfeas, you are posting after 2 years last comment in this post…

It would be better if you create a new topic…anyway, you can stamp “strings”… so, just do a string with the time and send it to the table…

You can see below an example:

BLYNK_WRITE(V6)//Alarm on/off
{  
  if (param.asInt()==1) {
  AlarmActive=1;  

         int gmthour = hour();
         if (gmthour == 24){gmthour = 0;}
         String displayhour = String(gmthour, DEC);
         int hourdigits = displayhour.length();
         if(hourdigits == 1){ displayhour = "0" + displayhour;}
  
         String displayminute = String(minute(), DEC);
         int minutedigits = displayminute.length();  
         if(minutedigits == 1){displayminute = "0" + displayminute;} 
   
         String displaysecond = String(second(), DEC);
         int seconddigits = displaysecond.length();  
         if(seconddigits == 1){displaysecond = "0" + displaysecond;}
  
         String displaytime_on = "ON-> " + displayhour + ":" + displayminute;

         String whatDayIsIt = String(day(), DEC);
         int daydigits = whatDayIsIt.length();
         if(daydigits == 1){whatDayIsIt = "0" + whatDayIsIt;}
         
         String whatMonthIsIt = String(month(), DEC);
         int monthdigits = whatMonthIsIt.length();
         if(monthdigits == 1){whatMonthIsIt = "0" + whatMonthIsIt;}
         
         String whatYearIsIt = String(year(), DEC);
         String displaycurrentdate = whatDayIsIt + "/" + whatMonthIsIt + "/" + whatYearIsIt;
  
         table.addRow(rowIndex,displaytime_on,displaycurrentdate);
         table.pickRow(rowIndex);//highlighting latest added row in table
         rowIndex++; 
         

  }

2 Likes

Hi @PeteKnight, can you close this post if you agree?

2 Likes