• 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

    Xml file as datasource

    How-To
    3
    10
    5.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.
    • S
      sprokkie
      last edited by

      Hi,

      i upgraded my old server (nagasaki ms2100) to a laptop with ubuntu
      Mango runs so smootly i realy love it.
      The pachube option is realy realy nice

      I want to import the live data from my solarpanels
      The logging program of the solarpanel sunnydatacontrol
      make's an xml file with live data.

      How do i use that file as a data source

      Kind regards
      Sprokkie

      http://qsolar.tecsun.nl

      1 Reply Last reply Reply Quote 0
      • M
        mlohbihler
        last edited by

        Hi Sprokkie,

        Well, you have a couple options:

        1. You can write a data source that finds (somehow) the xml files and loads the data in. Currently the creation of a data source is not trivial, but we (Serotonin) are seriously looking into how this can be simplified.

        2. You can write some utility that converts the data into something that Mango can already accept. For example, a process could locate the xml files, parse them, and then put the data into a HTTP POST request that sends to Mango's HTTP receiver data source.

        Best regards,
        Matthew

        1 Reply Last reply Reply Quote 0
        • S
          sprokkie
          last edited by

          Hi mlohbihler.

          The get and post ( option 2 ) is far out of my league.

          For displaying the live data,
          I made a staticcontent point in a view and put a simple xml to colum code in it and that did not work.

          The solarpanel has also a server that wil send the data to an java applet.
          this is how that works:
          In a static contens i place the code that loads a java applet from the tomcat root dir, that java applet connects to the server and displays the data
          So displaying is possible, but not from all computers, some computers don't display the java applet, or a firewall prevents the connection to the server.

          Maybe that server and java applet can be used for a datasource.

          The program i use for the solarpanels is sunnydatacontrol 3.9.3 and the SDCagent both programs are from sma.

          It would be a big help if you can give a big push in the right direction for the post and get option.

          cheers
          Sprokkie

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            It would be possible to create a data source that could connect to the server just like the Java applet does, but the protocol that is used would need to be known. Ideally SMA would make the source code of the applet available for refactoring.

            Regarding transforming and posting the xml data, if you need help with this you can get support from Serotonin. Use the Contact Us page.

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • M
              mhradom
              last edited by

              I am parsing XML from my TED (The Energy Detective) home energy monitor. A screen shot from my data source is attached. Basically, you need to know the structure of your XML and then have Mango go look for data using HTTP retriever and a little code that finds the data. Not complicated really.

              Attachment: download link

              1 Reply Last reply Reply Quote 0
              • S
                sprokkie
                last edited by

                Hi,

                i tried your example but that did not work for me.
                below is the xml file

                <OnlineData>
                <Date>28.09.2010</Date>
                <Time>08:51:30</Time>
                ?
                <Devices>
                ?
                <Device>
                <Name>WR11E-06 SN:673710652</Name>
                <SerNr>673710652</SerNr>
                <PositionX>0</PositionX>
                <PositionY>0</PositionY>
                <PerformChanName>Pac</PerformChanName>
                <Perform>0</Perform>
                <ColorCount>90</ColorCount>
                ?
                <Channels>
                ?
                <Channel>
                <Name>Vpv</Name>
                <Value>150</Value>
                <Unit>V</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Vpv-Setpoint</Name>
                <Value>439</Value>
                <Unit>V</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Iac</Name>
                <Value>0</Value>
                <Unit>mA</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Vac</Name>
                <Value>224</Value>
                <Unit>V</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Fac</Name>
                <Value>49.98</Value>
                <Unit>Hz</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Pac</Name>
                <Value>0</Value>
                <Unit>W</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Zac</Name>
                <Value>0.000</Value>
                <Unit>Ohm</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Riso</Name>
                <Value>0</Value>
                <Unit>kOhm</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Ipv</Name>
                <Value>23</Value>
                <Unit>mA</Unit>
                </Channel>
                ?
                <Channel>
                <Name>E-total</Name>
                <Value>830</Value>
                <Unit>kWh</Unit>
                </Channel>
                ?
                <Channel>
                <Name>h-total</Name>
                <Value>4698</Value>
                <Unit>h</Unit>
                </Channel>
                ?
                <Channel>
                <Name>Power On</Name>
                <Value>796</Value>
                <Unit/>
                </Channel>
                ?
                <Channel>
                <Name>Serial Number</Name>
                <Value>673710652</Value>
                <Unit/>
                </Channel>
                ?
                <Channel>
                <Name>Mode</Name>
                <Value>waiting</Value>
                <Unit/>
                </Channel>
                ?
                <Channel>
                <Name>Error</Name>
                <Value>Riso</Value>
                <Unit/>
                </Channel>
                </Channels>
                </Device>
                </Devices>
                </OnlineData>

                ill think ik need a differend code to find the data.

                regards
                Sprokkie

                1 Reply Last reply Reply Quote 0
                • M
                  mhradom
                  last edited by

                  Your XML is similar to mine with the exeption that I DO NOT have any duplicate lines. What I mean is the you have multiple things called <value>. Mine are all unique. Maybe someone else cold help you out with the code for that. I am not a code writer!

                  You MUST make sure your URL is correct or the HTTP receiver will not even be able to find your XML. It took me a while to figure mine out. I had to go digging deep in the TED documentation.

                  This definitely should put you on the right track though.

                  1 Reply Last reply Reply Quote 0
                  • S
                    sprokkie
                    last edited by

                    With your example i was able to get some value's
                    Only the nested value's did not work.

                    1 Reply Last reply Reply Quote 0
                    • S
                      sprokkie
                      last edited by

                      i found a csv file that had the same data
                      With the trick you showed me i get the data from that file.

                      thx for pushing me t he right direction.

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