• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    SOAP request

    Scheduled Pinned Locked Moved Official API - Evok
    2 Posts 2 Posters 1.5k Views
    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.
    • P
      Patrik
      last edited by

      Hello,
      I am new here and I am trying to SOAP communication using soapUI. I use latest evok, uni pi 1.1 and my point is, how do I know what parameters should I pass as parameters in soap request in soapUI? image

      1 Reply Last reply
      Reply Quote 0
      • T
        TomasKnot
        last edited by TomasKnot

        Device types come from the following list (and otherwise correspond to the device path in the Rest API):

        'relay',
        'input',
        'ai',
        'ao',
        'ee',
        'sensor',
        'i2cbus',
        'adchip',
        'owbus',
        'mcp',
        'gpiobus',
        'pca9685',
        'ds2408',
        'unipi2',
        'uart',
        'neuron',
        'board',
        'misc_output',
        'led',
        'watchdog',
        'register',
        'wifi',
        'light_channel',
        'light_device'
        

        and the "circuit" is the device name as specified in the configuration file.

        As an example for UniPi 1.1:

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:unip="http://192.168.1.146:8081/UniPiQueryService">
           <soapenv:Header/>
           <soapenv:Body>
              <unip1:SoapQueryInputList xmlns:unip1="http://127.0.1.1:8081/UniPiQueryService">
                 <!--1 or more repetitions:-->
                 <single_query>
                    <device_circuit>1</device_circuit>
                    <device_type>relay</device_type>
                 </single_query>
              </unip1:SoapQueryInputList>
           </soapenv:Body>
        </soapenv:Envelope>
        

        An example for setting relays:

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:unip="http://127.0.1.1:8081/UniPiCommandService">
           <soapenv:Header/>
           <soapenv:Body>
              <unip:SoapCommandInputList>
                 <!--1 or more repetitions:-->
                 <single_command>
                    <device_circuit>1</device_circuit>
                    <device_type>relay</device_type>
                    <!--1 or more repetitions:-->
                    <property_item>
                       <property_name>value</property_name>
                       <property_value>"0"</property_value>
                    </property_item>
                 </single_command>
                 <single_command>
                    <device_circuit>2</device_circuit>
                    <device_type>relay</device_type>
                    <!--1 or more repetitions:-->
                    <property_item>
                       <property_name>value</property_name>
                       <property_value>"1"</property_value>
                    </property_item>
                 </single_command>
                 <single_command>
                    <device_circuit>3</device_circuit>
                    <device_type>relay</device_type>
                    <!--1 or more repetitions:-->
                    <property_item>
                       <property_name>value</property_name>
                       <property_value>"1"</property_value>
                    </property_item>
                 </single_command>
              </unip:SoapCommandInputList>
           </soapenv:Body>
        </soapenv:Envelope>
        

        We'll try to provide the examples in the documentation in the next EVOK release.

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post