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

[Help request] mac2vendor scene


Question

Posted (edited)

Greeting,

I try to get vendor name by MAC address on a scene. I get invalid arguments error without any results.

here is the code. Please help

 

Please login or register to see this code.

 

Edited by FSE

10 answers to this question

Recommended Posts

  • 0
Posted

Is it not just the typo finaro:debug instead of fibaro:debug

  • 0
  • Inquirer
  • Posted
    27 minutes ago, Alex de Bruin said:

    Is it not just the typo finaro:debug instead of fibaro:debug

     I'm afraid it is not the problem. I fixed and I get invalid argument error on connection

    • 0
  • Inquirer
  • Posted

    I see that the error is repeating in cloudflare served APIs. I suppose something is missing on Header section. Using Postman, responses are OK. even I tried another API to get vendor name from MAC (

    Please login or register to see this link.

     ). which is not https.

    Still help is needed @10der @jgab

    • 0
    Posted
    46 minutes ago, FSE said:

    I see that the error is repeating in cloudflare served APIs. I suppose something is missing on Header section. Using Postman, responses are OK. even I tried another API to get vendor name from MAC (

    Please login or register to see this link.

     ). which is not https.

    Still help is needed @10der @jgab

     

    https is tricky on the HC2.

    This gives you the vendor name

    Please login or register to see this code.

     

    • 0
  • Inquirer
  • Posted
    35 minutes ago, jgab said:

     

    https is tricky on the HC2.

    This gives you the vendor name

    Please login or register to see this code.

     

    Still no response from macvendors.co API. Sir, did you checked on your HC?

    • 0
    Posted
    12 minutes ago, FSE said:

    Still no response from macvendors.co API. Sir, did you checked on your HC?

    Yes, sir.

    Please login or register to see this attachment.

    • 0
  • Inquirer
  • Posted

    hmm...it is strange. I double checked code. Still no response....the only thing may think is that I use 4.543beta . Fibaro Broken library?

    • 0
    Posted
    18 minutes ago, FSE said:

    hmm...it is strange. I double checked code. Still no response....the only thing may think is that I use 4.543beta . Fibaro Broken library?

    Upgraded to 4.543beta and it still works.

    function macvendor(macaddr)
    local http = net.HTTPClient();
          http:request("http://macvendors.co/api/vendorname/"..macaddr, {
          success = function(res)
              fibaro:debug('OK')
              fibaro:debug(res.data)
          end,
              error = function(err)
              fibaro:debug('Error : '..err) end
            });

    end

    macvendor("002248FF76B0")

    • 0
  • Inquirer
  • Posted

    that is BAD news for me.... :(

    using curl from a linux box on same network, I get response so no issue with Cloudflare. Fibaro HC2 still no answer. 

    2 minutes ago, jgab said:

    Upgraded to 4.543beta and it still works.

    function macvendor(macaddr)
    local http = net.HTTPClient();
          http:request("http://macvendors.co/api/vendorname/"..macaddr, {
          success = function(res)
              fibaro:debug('OK')
              fibaro:debug(res.data)
          end,
              error = function(err)
              fibaro:debug('Error : '..err) end
            });

    end

    macvendor("002248FF76B0")

    • 0
  • Inquirer
  • Posted

    I downgrade to 4.530 and is working, from backup. When I upgrade to 4.540 +, there is no response :(

    Something looks broken on my HC2....

     

    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.

    ×
    ×
    • Create New...