Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Search device by IP via API [Solved]


FSE
 Share

Question

I try to build a scene that can search by the ip address of VD and return the device id. 

I have the following code just to display all the VDs that have IP but I do get nothing.... any help?

Please login or register to see this code.

 

Edited by FSE
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

local devs = api.get('/devices')
for k,v in ipairs (devs) do
    local v2 =api.get("/devices/"..v.id)
    if v2.type == "virtual_device" and v2.properties.ip ~= "" then
        fibaro:debug((v2.name).." "..(v2.properties.ip))
    end
end

  • Thanks 1
Link to comment
Share on other sites

  • 0

IMHO you want 

Please login or register to see this code.

POST {}

 

Please login or register to see this image.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • @10der thank you sir for this answer. my concept is that I have a number of same/identical devices (for example Google Home devices) that I like to get their properties and populate them on a same table so after that I can manipulate this table.

    ARP discovery is one step further. It could be great IF HC2 had the ability to build custom wizards (wishlish), discover the devices, add to rooms, and assign custom scenes.....(I think I nailed it! :) )

    • Thanks 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...