Dashboard switch widget doesn´t update the cloud varaible

I hope, that someone has experience and the possibility to help me overcome my missunderstandings with the Arduino cloud API.
I created a dashboard with a switch, which is connected to a thing´s read and write boolean variable. When I update this variable on my API device (RasPi with node red), this update becomes visible in the cloud (but only when I reload the dashboard site manually in the browser to see the change in the dashboard).
When I change the state in the dashboard, the change is even not visible in the cloud interface "Cloud Variables". As if the dashboard can not change this variable. Unsurprisingly this change is not coming back to the API device as well.

So there are two problems:

  1. An API device updates successfully variables (I can see in the cloud). But the dashboard does not automatically refreshed the view. The change becomes only visible, when I reload the dashboard manually.

  2. The other way around seems not to work at all. I can change the optical representation of the switch in the dashboard by clicking the switch, but the variable (in the cloud variable view) is not following this state.

Hi all,

am I the only one facing such a behaviour?

How it is working for the other ones? If you update a cloud variable with your Arduino or API device (Raspi in this case), is the dashboard representation of this variable automatically updated?

Slowly, getting a bit closer. With this overwelming response to my posts here, I assume, that nearly no one is using the cloud.

What is a bit better now:

  • Some problem with the Node Red Plugin was solved by the develpers of this plugin. My best regards to them!
  • The cloud dashboard is communcating in both directions, updating states in the cloud and at the api device. Only that I still need to pull these updates on both sides (the api device and the dashboard).
    There I am a bit wandering, how often I can pull for updates, without provoking other problems.

What is really a problem:

  • I need to reload the dashboard to get updates (from the api device) shown at the dashboard. This is a very disturbing behaviour of the Arduino cloud dashboard and brings it close to unusable. This is specially annoying, because this cloud service costs money and for that, the experience is poor!

With the current stage of this cloud service, I will soon cancel my plan.

It is extremely dificult to help with any Cloud problems due to the nature of it. Most of the time what I see is folks who start with the cloud but then 'fiddle' with parts and try to add their own code but not in a way that does not break the cloud code.

Thank you for your reply!

The thing is, that I din´t fidle so far at all. I simply used the node-red-contrib-arduino-iot-cloud to transmit some data collected from different sensors in the surroudning. The Node Red plugin is registered as API device in the arduino cloud.
Till this point everything seems to work mainly properly, as far as I can see. Looking on the varibles in the cloud frontend, I see, that they are updated with the transmitted data at expected times.

The problem is, that the arduino cloud dashboard doesn´t update accordingly. Only when I reload the whole dashboard (broser reload button), the widgets represent the values correctly. Maybe this behaviour is even correct, but not meeting my expectations.
My expectaion is, that the values in the dashboard will be updated nearly immideately (max 1 or 2 seconds delay to the registering of a new value in a variable) without a full reload of the page.

I am happy about any feedback, helping me to understand better.

AFAIK the only way to cause a browser update requires two things, the cloud variable must be set to onChange and your browser must be set to auto-update.
I do NOT use a browser on my phone, I use the IoT Remote app. Maybe that is your problem.

The variable is configured "on change".
I am testing both, the webbrowser dashboard and the app. Both are behaving the same. Only manual updates are coming to show the actual state of a variable changed by the IoT device.
Interesting is, that widgets, wich refer to the same variable are interacting in real time on the dashboard, but only local on the same dashboard device. An other representation of the same dashboard browserer or app, is not reacting on theses changes, even if the far away iot API device is getting the change.

Sounds like it is working and maybe you are not understanfing something, but in any case I think I have helped all I can. Good luck.

Is there a magic function like "updateCloudStatus()", which is normally automatically called, when there is a value updated by an arduino iot device?

Because my values are so far not coming from an arduino device, only from this node red plugin as an API device.

Thank you for your support!

After the maintenance yesterday it´s getting worse!

Befor I was able on all representations of the dashboard to control with a dashboard switch my API device.

After the maintenance yesterday only the switch widget in the app controls my device, the one in the browser dashboard doesn´t have any effect any more.

Where can I push official issues with the dashboard?

Hi @fiso42 , is there any code you can share?
I'm not familiar with the Node Red integration; anyway, since real time updates (both on mobile and web apps) happen via MQTT protocol, I would say that probably something must be configured in Node Red to add MQTT support?

Can you please check if this tutorial can be of any help?
https://docs.arduino.cc/tutorials/projects/control-your-iot-cloud-kit-via-mqtt-and-node-red/

1 Like

Hi @fiso42, I believe this happens because you don't have a real device connected to the Cloud and you're trying to use node-red to emulate a change in a variable. For your use case, we've added an option in the output node called "send as device"


This is available in the last version we released on NPM (1.1.0) so be sure to update your plugin. Let me know if this solves your issue.

1 Like

Thank you for looking into this.

The tutorial in your link is unfortunately not ralated to anything, what I am doing.

I am following to some extend this:
https://docs.arduino.cc/arduino-cloud/guides/node-red/

The problem is not the connection between Node Red and the cloud, this is working!

The problem is the arduino cloud dashboard, which is behaving very unsufficient.

The data is coming successfully into the cloud - I can see it in the variable values in the cloud frontend - but the arduino dashboard is not updating the correspondig widget (until I reload the whole dashboard). And there is no code from me involved, it´s cloud frontend code!

What´s worse, after the last maintenance, the webbrowser based arduino cloud dashboard didn´t change the variables any more at all. I could have switched, wrote, slided in the dashboard, but the connected variables in the cloud was again not influenced.
But the app based arduino cloud dashboard did. In the meanwhile, this problem disappeared by itself again.

What stayes is the extreme unfortunate behavior, that already cloud hosted variable are updated, but not the connected arduino cloud dashboard widgets. I can not believe, that this is intended and that you need to reload the whole browser page to finally see the real state behind. This was already better solved in the 90s!

Of course it can be, that I did something wrong, but it´s fully intransparent for me, why the dashboards are so bumpy communicating with the cloud hosted variables, which are succesfully communicating with my device (RasPi with Node Red as API device on premis).

My communication from local Node Red to this cloud based variables is working!

Ok, sounds like an aproach!
The only thing is, that I need to create then a dummy device, which is not really there.

... just a sec ...

It seems, that this strange feature is doing it.

Thank you for that option and that hint! It´s for me still not completely understandable, but it´s now behaving in the dashboard right.

Many, many thanks!

Can you give a bit background, why this "as a device" is needed? What is the other option (not as a device) for?

Thank you again, that you started to investigate it. In the meanwhile mirkocurtolo came up with the helping hint.

The background is: the node red client has been designed to work with a real device connected, so when you publish a message with the output node you actually send a message in a topic that act as input to your device. Then if you have a real device connected it will send an echo message to the output topic and update the dashboard. But if a real device isn't connected, the message is written only in the input topic for your device and read by anyone. But since your use case is more common than what we expected, we added the possibility to make the node to act "as a device" and send message to the output topic to be read by the dashboard

Ok, understandable.
Maybe it´s already explained somewhere, what I have then overseen. If not, it would be probably good, if there would be a hint in the Node Red plugin, easy to find, that this option is needed for such a usecase.

Thank you again!
:+1:

Hi mirkocurtolo,
it was shortly behaving like expected, but since weeks the browser version is again not updating without a reload of the whole dashboard site. Whats worst: To control from the webbrowser based dashboard is not working at all!

In the arduino app it´s working all fine!

It was working in the browser as well after our last discussion! But already long time no more.