Custom widget save to blueprint variables

Hi Everybody,
I want use a custom widget in a blueprint dashboard to save some variables into the selected device bucket.
Anybody have example for it?

Thanks

Hi @9550development

Welcome to our community! We’re glad to have you here. :partying_face:

Soon our team or a user will help you with this query.

Best regards!

Phil Gutierre
Customer Support

Hi @9550development

Yes we do,

Follow the link with a basic tutorial →

-Guilherme

I believe the only change required to use window.TagoIO.sendData when using blueprints, is that you’re required to send the parameter origin, with the value being your device ID, and maybe the paramete bucket.

In the documentation Guilherme sent you, it work as follow:

So you want to change to

function sendData() {
  var data = {
    "variable": "my_variable2",
    "value": Math.random(),
    "origin": "61435c6db7e1ab00180de865", // or you can get dynamically from what TagoIO did sent to your widget.
    "bucket": "61435c6db7e1ab00180de866" // or you can get dynamically from what TagoIO did sent to your widget.
  }
  window.TagoIO.sendData(data)
}
2 Likes

Thanks, its working.
Added the variables into an array and must gave they in the ‘Data from’ widget settings.

1 Like