LED colors displayed on phone do not match widget color selected

I have searched the forums with no luck at resolving this problem. The LEDs turn on and off as expected but the color does not match what is selected in the widget on my iphone.

If I view the property values of the DataStream’s online with the Blynk Console for the 3 LEDs the color values appear to match what is being displayed but again not what was selected in the widget.

Any help would be appreciated.

Regards,

Roger

  /***************************************************************************************/
  /* Controlling LEDs                                                                    */
  /*                                                                                     */
  /* This will avoid lots of outgoing messages to the Blynk server when lighting the     */
  /* LEDs.  It only sends the virtualWrite when there is a change in the state of the    */
  /* the fan relay, heat relay, or the ac relay; (off-to-on or on-to-off).               */
  /*                                                                                     */
  /***************************************************************************************/ 
  if (fan_LED_control != previous_fan_LED_control)
  {
    if(fan_LED_control)
    { 
      Blynk.virtualWrite(V7,255);    //Turn ON the Fan Relay Energized LED
    }//End of if(fan_LED_control)
    else
    {
      Blynk.virtualWrite(V7,0);      //Turn OFF the Fan Relay Energized LED
    }//End else
    //Set the previous state to the current state
    previous_fan_LED_control = fan_LED_control;
  }//End of if (fan_LED_control != previous_fan_LED_control)

  if (heat_LED_control != previous_heat_LED_control)
  {
    if(heat_LED_control)
    { 
      Blynk.virtualWrite(V9,255);    //Turn ON the Heat Relay Energized LED
    }//End of if(heat_LED_control)
    else
    {
      Blynk.virtualWrite(V9,0);      //Turn OFF the Heat Relay Energized LED
    }//End else
    //Set the previous state to the current state
    previous_heat_LED_control = heat_LED_control;
  }//End of if (heat_LED_control != previous_heat_LED_control)

  if (ac_LED_control != previous_ac_LED_control)
  {
    if(ac_LED_control)
    { 
      Blynk.virtualWrite(V8,255);    //Turn ON the AC Relay Energized LED
    }//End of if(ac_LED_control)
    else
    {
      Blynk.virtualWrite(V8,0);      //Turn OFF the AC Relay Energized LED
    }//End else
    //Set the previous state to the current state
    previous_ac_LED_control = ac_LED_control;
  }//End of if (ac_LED_control != previous_ac_LED_control)


I don’t follow what you’re saying here. Some screenshots might help, along with info about which version of the app you’re using.

Pete.

Hello Pete,

OK so I selected Red as the color of my Heat Relay Energized in the LED widget. Yet it shows up as white in the console data stream view and also when it is turned on it is white.

So instead of being red as selected it is white.
A similar thing is going on with the AC LED, it is suppose to be blue but is orange.
The fan LED is green as selected but I think this is just a fluke.

Hope this helps.

Regards,

Roger

It looks like you’ve use setProperty to set the colour of this LED.
In the Device Datastream view, click the three dots at the right hand side of the IntHeatRelayEnergised row and choose “x reset all properties”

Pete.

Thank you Pete. I found the same problem. I did set the properties in the code prior to this but it had no effect. Infact I had a comment in the code that indicated the Blynk.setProperty was not currently supported by BlynkIOT 2.0. So even though I had the code there it did nothing. It appears that an update may have made this a working property.

In any case I commented the code out in the program and did what you said and everything appears to work now.

Thanks and Regards,

Roger

1 Like