Push data to cloud table

Home Forums NodeLua firmware Web IDE discussions Push data to cloud table

This topic contains 1 reply, has 2 voices, and was last updated by  Harold L. 4 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #447


    I think I figured out how to go about fetching cloud data from the node, but what’s unclear is how I put data there in the first place.

    Is it possible to “set” cloud data from anything other than the node itself? For example, is there a curl command I can run on a Linux box to set a value that will be read by the node?


    – Jason


    Harold L.

    The short answer is YES.

    The Cloud data pipe is bidirectional by design, but I’m still working on the http APIs to put values/commands to Node.

    If you like, I’d like to give you a temporarily API for testing, but since it’s under heavy development, APIs may be changed in the future.

    Here is the http API:

    get: fetch value from Node
    set: set value to Node

    node_id: your Node ID

    cloud_id: create from the side panel of the WebIDE

    v0: the value to set to the Node

    auth_opt: this is the temporarily auth method, you can get it this way: open the source of the WebIDE in your browser, search for window.auth_for_nodeapi


    On the Node side, you should register a callback function to run when receiving your value:
    cloud:onrpc(function(action, v0)
    return 1

    If you met any problem with this API, I’ll answer ASAP, good luck!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.