• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Complete HTTP receiver or HTTP JSON receiver example... anywhere??

    User help
    3
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ceremona
      last edited by

      Hi. I am new to this product but have looked around the forum in many places and only see disjointed fragments of examples around how one goes about setting up an HTTP receiver or HTTP JSON receiver or TCP/IP receiver?

      I am looking to import arduino data real-time into Mango, ideally using a TCP/IP or higher stack method. I can structure the data in whatever format but I need clear instructions on how the various UI parameters in the data source match to what is sent via a script, etc. Does something like that exist somewhere?

      1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox
        last edited by MattFox

        Hi Ceremona, welcome to the forum!

        If you look at the '?' there is a full blown user help for how to utilise these sources.
        0_1557966258052_8d9b2c7d-6af9-4c33-9e0d-e8661cde99c8-image.png

        As can be read, the url you need to post to is http://[mangodomain|localhost]/httpds

        Anyway, you see that set point url I'm pointing to?
        EDIT: Sorry I meant to mean device white list, I was pointing at the wrong textbox!
        You set that as your reference so it will land (the data) in this datasource.
        the parameter being __device

        Here's a snippet:

        var _URL="http://ipAddressHere/httpds?__device=DEMO&QUANTUMM1="+pt*.value+'@'+pt*.time;
               httpReq(_URL,"post",res,{'Content-Type':'application/x-www-form-urlencoded'},{});
        

        Where in this case QUANTUMM1 is my point identifier in the data point in the data source itself.
        0_1557966635843_58b8e4cc-a686-46da-801d-508e2afb5c6a-image.png

        The format as you can see in the code (1 of the allowed formats at least, read the datasource help for the others) is "+pt*.value+'@'+pt*.time
        So value first, separated by an '@' then a timestamp. NOTE This format I believe is the publisher set format for the set format option of this datasource so you can use a mango publisher to flick data via an http publisher to a mango http receiver datasource.

        So as a recap:

        params: __device=[setPointUrl]
        &httpParameterName=[value]@[Timestamp]

        url: mangoUrl/httpds

        You can test by clicking on the 'Listen for HTTP data' button to ascertain if your values are coming through.
        Any further confusion, we're all here to help

        Fox

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • phildunlapP
          phildunlap
          last edited by

          Hi Ceremona, welcome to the forum!

          I often link people to this post for the format of the publisher's output, which is what the HTTP Receiver is made to work with (though any client could send such HTTP messages, of course):
          https://forum.infiniteautomation.com/topic/2187/how-to-use-publishers-http-sender/3

          Outgoing HTTP receiver messages are not quite the same formatting, as was discussed in this thread:
          https://forum.infiniteautomation.com/topic/2854/http-receiver-set-point-name

          For the HTTP JSON receiver, you may find the last post in this thread answers the question:
          https://forum.infiniteautomation.com/topic/4057/how-to-set-a-value-using-http/9

          The HTTP JSON receiver does not currently support settable points, so perhaps there is a useful feature to be added there.

          1 Reply Last reply Reply Quote 1
          • MattFoxM
            MattFox
            last edited by

            Thanks Phil, I'll keep these in mind also

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 0
            • First post
              Last post