Graph Data not appearing with Mongoose-OS program

Hi, I have an esp8266 connected and I am using mongoose-os. I have created a project on Blynk and created a button that controls on LED and a Graph to display esp8266 memory usage. I am able to connect and switch the led with the button. However, the ram memory data is not being displayed. Mongoose-os have confirmed that the program is fine and that it must be a configuration problem with Blynk. The console data is confiming that the virtual pin 1 is being used and that data is being sent. However I am not seeing any data on the graph. Is there any way to check why? See program below;

load('api_gpio.js');
load('api_blynk.js');
load('api_sys.js');

Blynk.setHandler(function(conn, cmd, pin, val) {
  let ram = Sys.free_ram() / 1024;
  if (cmd === 'vr') {
  	// When reading any virtual pin, report free RAM in KB
    Blynk.virtualWrite(conn, pin, ram);
  } else if (cmd === 'vw' && pin === 2) {
  	// Writing to virtual pin translate to writing to physical pin
    GPIO.set_mode(16, GPIO.MODE_OUTPUT);
    GPIO.write(16, val);
  }
  print('BLYNK JS handler, ram', ram, cmd, pin, val);
}, null);

I am not familiar with Mongoose-OS, however I don’t see any virtual pin number in your program… the server needs to have the data referenced to an actual vpin (i.e. Blynk.virtualWrite(V1, ram);) before the graph can display it.

http://docs.blynk.cc/#widgets-displays-history-graph

If it is History Graph, it’s better for you to push data using a timer (setInterval) or similar method.

Also, most probably you need to wait for some 15 minutes for data to appear in history graph.

Why 15? Just 1 minute.

Hi, I am not passing data to history graph, just the graph. There should not be any delay and there is a video demo video that exemplifies this, unforntunetly not working for me. In the program the pin number recieved from blynk is vr 1. This is correct because I set the input for the graph to VR 1. If I change it then the relevant pin number is recieved. The command should then send/write the contents of ram to the graph, but I do not seethe data displayed on the graph. Here is the video that shows it working, but I can not get the graph to work, https://www.youtube.com/watch?v=9lTIN_WRWMs. The button is working fine. Any advice would be gratefully received.

if (cmd === 'vr') {
  	// When reading any virtual pin, report free RAM in KB
    Blynk.virtualWrite(conn, pin, ram);
  } 

Kind Regards
Anwar

Hi, Actually here is a better link for the video and details of the function… https://mongoose-os.com/docs/libraries/cloud_integrations/blynk.html

Again, I am unfamiliar with Mongoose OS, however trying to compare what you have shown with what is briefly shown in the video (i couldn’t find any actual listing of the sketch), I am seeing something strange… In all your posted code, you are using triple === for your comparator, but in the video screenshot I only ever see the “normal” double ==

Are you sure you are using the correct syntax?

Perhaps post your entire sketch instead of just little bits.

Hi, the entire code is available here, https://github.com/mongoose-os-apps/blynk/commit/33c391a2a1f7dea4a9d287124957ecc9369f829d, I just posted the part that was relavant to the graph for clarity. I tried double == but this just gives me a comiltion error.