LED Widget vs. Status Widget

The LED Widget in my dashboard is constantly "pale". It is linked to a boolean variable, that toggles between 0 and 1 periodically (which I verified in the variable window). I would expect the LED widget to toggle between intensive green and red.

On the other hand the Status Widget works as expected linked to the same bool variable.

What could be the problem??

Browsers: Firefox 91.7.0esr, Chromium 99.x, Linux.

You forgot to show us your code?

Hm, isn't it enough, that I have a Thing with a variable, that changes periodically (each 2 seconds)? This boolean variable (0/1) is enough to toggle the color of the "Status widget" in the same IoT dashboard. Why does the same fail with the "LED widget"?

I have no own Arduino code in my Thing, so I can't show anything, sorry

... so, nobody else has a problem with a non-updating LED-widget in the Arduino IoT Cloud?

No, I´havn´t. I have no "Led widget", what ever this is :nerd:

The left in the screenshot is a LED widget. It is linked to the same Boolean Variable as the right STATUS widget. So in this snapshot the green LED should be ON and not the red.

BTW, in the meantime I tested another browser (Chrome on Android 12) without success.
LED-widget-and-STATUS-widget-IoT-cloud

... tried to find help in the technical-reference, but to me it reads both widgets visualize "the status of something":


The LED widget is a virtual LED that can signal the status of something. Can either be set to ON or OFF.

Can be linked with a boolean variable.

An example of how it is used in a sketch:

ledVariable = true;

//or

ledVariable = false;


The status widget is great for checking the state of something: green is positive, red is negative!

Can be linked to a boolean variable.

An example of how it is used in a sketch:

statusVariable = true;

//or

statusVariable = false;


Assuming the LED widget is not having a grave bug at the moment, this "something" is not only the status of the boolean variable (else it would work). What more then? Is the LED widget trying to communicate with the remote device or the Arduino Agent websocket and is waiting for a state change from there?

Sorry for speculating, probably I just don't understand the widget concept.

@Arduino-Team
Or is it simply a known bug, that your LED Widget does not visualize the status of a linked boolean IoT cloud variable?

Okay, I give up. In my opinion based on this thread the Arduino LED widget can't signal just the state of a bool IoT Cloud Variable.

It would be nice to see a new widget in the future of your project, that works identically to the Status widget, but would have a non-quadratic, round lamp/LED shape. I propose the name "StatusLED widget" for example.

Cheers

Hey @signuptoarduino, I just had a quick round of tests of the LED widget, it works for me.
Can you please share the sketch?

@eclipse1985 Please see my answer on Mar 15, sorry.
But your question seems to implicate, that the color of a LED widget depends on the sketch on the hardware device, and not only on the state of the corresponding Variable in your cloud. That wouldn't be good news :-(. But better than not knowing how the LED Widget concept works at all, thank you.

May I ask, if you tested linking the LED widget AND the Status widget to the same bool Variable?

The color of the LED widgets depends only on the variable state, so it's not strictly dependent on the sketch code. I have the two widget types (LED/Status) linked with the same variable, and it works, so it's really strange that it doesn't work for you. Can you write me an email (f.mirabito@arduino.cc) specifying your thing ID so I can have a deeper look?

@signuptoarduino I managed to find your data flow on our backend, I can reproduce the issue and we are working on a fix (looks like a bug on our side). Please keep the board connected, I'll let you know soon.

@signuptoarduino we have figured out the cause of the problem. Basically, you are sending 0 and 1 values instead of true and false, and this was causing the bad behavior of the LED widget. However, we have fixed the LED widget in order to accept 0 and 1 as well, so now everything should work as expected. Please check and let me know :pray: !

2 Likes

Excellent eclipse1985 !
The LED widget works in my dashboard now, both widget types (Status and LED) are blinking in sync!

Status-and-LED-widget-in-sync

Thank you so much for spending your time on this small, but very essential issue!

1 Like

Great! Thank you for the report!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.