GroveStreams
pat private msg quote post Address this user
Hi,

What would be the best way to have on a dashboard a kind of button that would give an instruction to a component ? A clic on this button would do a GET on a website for instance with some parameters passed related to the component.
Post 1 IP   flag post
MikeMills private msg quote post Address this user
If you're trying to send information (or a command) to a component via a button, then see our YUN Command example.
Post 2 IP   flag post
pat private msg quote post Address this user
Yes that is close but this looks like an answer to a PUT from the component.
What if the component updates once day and I would like to send a command to a specific IP address at any time, is that possible, either using javascript/javascript in an html content or other?
Would that be on the roadmap ?
Post 3 IP   flag post
MikeMills private msg quote post Address this user
That is possible today. Do this:

1) Create a stream on your component and call it something like "Command Stream". It can be a Point or Regular stream.
2) Create a "Value "Arrival" event for that stream on the same component
2a) Have the Event reference an Action Package that has an HTTP action in it. Setup the HTTP action to do your PUT or POST.
3) Create a dashboard with a Stream Feed Form widget. Have the widget update the "Command Stream". The HTTP action will be executed when the "Command Stream" is updated from the form widget.

Another option would be to create a webpage outside of GS that has the button on it and then use our URL widget to embed that webpage into the widget (it does it via an IFrame).

Longer term, we do want to add a scripting language to the HTML widget (and other widgets). It's simple to do, but there is a lot of security issues that need to be resolved around the design first.
Post 4 IP   flag post
2965 4 4
Log in or sign up to compose a reply.