API questions

Home Forums Conduit: AEP Model API questions

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30619
    Arnaud CESBRON
    Participant

    Hello,

    i need help.

    Wtih API on Conduit product, is there a way to know firmware and device version with out logging ?

    Is thera a way to setup de first user / password with API when is’t the first start ?

    Thanks for your reply.

    #30620
    Jeff Hatch
    Keymaster

    Amaud,

    In api/system there is a firmware field that contains the firmware version and a productId field that contains the type of device.

    Jeff

    #30621
    Arnaud CESBRON
    Participant

    Jeff, yes i see it after. But i need to be logging.

    Have you an answer for my second part on my question. We made application to configure gateway with API. She works fine on 1.x firmware, but don’t work with 5.x. The problem is on the first connection on new device, before the default admin password is admin. But now, on 5.x, it’s changed. At this time i don’t know how to initiate it by API. I you know a way to do this, I’m interested.

    thanks

    #30624
    Jeff Hatch
    Keymaster

    Amaud,

    The following info should help in doing commissioning through the API.

    // Execute this command to check that the device is in the commissioning mode
    
    andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k "https://192.168.2.1/api/commissioning"
    {
       "code" : 200,
       "status" : "success"
    }
    
    // Execute this command to set the username. In the example the username is "admin"
    
    andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "", "aasAnswer":""}' https://192.168.2.1:443/api/commissioning
    {
       "code" : 200,
       "result" : {
          "aasDone" : false,
          "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9",
          "aasMsg" : "New password: ",
          "aasType" : "question; input hide"
       },
       "status" : "success"
    }
    
    // Execute this command to set the password. Use the aasID value that is received in the previous response.
    
    andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "5EC7E7C8FE2A6E3584D2A124A10E9", "aasAnswer":"Admin123"}' https://192.168.2.1:443/api/commissioning
    {
       "code" : 200,
       "result" : {
          "aasDone" : false,
          "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9",
          "aasMsg" : "Retype new password: ",
          "aasType" : "question; input hide"
       },
       "status" : "success"
    }
    
    // Execute this command to confirm the password. If you get a response to the command "Change password success!", it means that the commissioning mode has been completed successfully.
    
    andrey@andrey-HP-ProBook-640-G1:~/Downloads$ curl -k -X POST -H "Content-Type: json/application" -d '{"username":"admin", "aasID": "5EC7E7C8FE2A6E3584D2A124A10E9", "aasAnswer":"Admin123"}' https://192.168.2.1:443/api/commissioning
    {
       "code" : 200,
       "result" : {
          "aasDone" : true,
          "aasID" : "5EC7E7C8FE2A6E3584D2A124A10E9",
          "aasMsg" : "Change password success!",
          "aasType" : "info"
       },
       "status" : "success"
    }
    
    *****************************************************************************************************************************************************************
    

    Jeff

    #30625
    Arnaud CESBRON
    Participant

    Jeff thanks for your help.

    I will work in this way.

    Arnaud

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.