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


How to extract product info from module ?


samuel

Recommended Posts

How to extract information from the module into the debug screen?

 

i tried this: no return, empty fields

 

model1 = fibaro:getValue(238, "model");
manufacturer1 = fibaro:getValue(238, "manufacturer");
productinfo1 = fibaro:getValue(238, "productInfo");
serial1 = fibaro:getValue(238, "serialNumber");

 

fibaro:debug("model1 = " ..model1);
fibaro:debug("manufacturer1 = " ..manufacturer1);
fibaro:debug("productinfo1 = " ..productinfo1);
fibaro:debug("serial1 = " ..serial1);

 

Edited by samuel
Link to comment
Share on other sites

Hi @samuel,

 

this is because those fields are usually empty!

 

If you go with your browser to this address http://<YOUR_HC_IP>/docs/#!/devices/getDevice

 

there you can see everything that you can get from one device. Here is example for my Vision siren:

 

Please login or register to see this code.

As you can see from above example, information that you was trying to get is for most devices set to empty string.

Link to comment
Share on other sites

If you want to know what brand/make/model a device is, you'll have to retrieve "productInfo", using the API, then decode that. Sometimes that's enough, but to detect variants you'll also need the firmware version.

 

Before going in to more detail, what are you trying to achieve?

Link to comment
Share on other sites

  • Topic Author
  • getting the serial number from the device, that's all i need for now. thanks for your help

     

    Actually, i was looking in other values, like productinfo, model, if i could find the serial number, but all returned nil

    Edited by samuel
    Link to comment
    Share on other sites

    41 minutes ago, samuel said:

    getting the serial number from the device, that's all i need for now. thanks for your help

     

    Actually, i was looking in other values, like productinfo, model, if i could find the serial number, but all returned nil

     

    Use the api, like:

     

    http://your_ip/api/devices/your_device_id

     

    All devices have productInfo. Only recent Z-Wave Plus devices have serial number. Some devices, like MultiSensor 6 from Aeon have sometimes bogus serial number.

     

    What are you trying to do?

    Link to comment
    Share on other sites

  • Topic Author
  • to extract the serial number, if not possible, it just have to open the dinrail case and look at the label on the module~ i was just trying to find an easier way :( 

    Link to comment
    Share on other sites

    6 hours ago, samuel said:

    to extract the serial number, if not possible, it just have to open the dinrail case and look at the label on the module~ i was just trying to find an easier way :( 

     

    OK. Did you try what I said in a previous post?

     

    http://your_ip/api/devices/your_device_id

     

    So get the ID from the master device (device properties page) and go to that URL.

     

    You'll get a JSON human readable summary of device properties (though it can look pretty unreadable :-) ).

     

    Search for "serial"

    Link to comment
    Share on other sites

    BTW what I say is a variant of what mr @Sankotronic said. What he did was "prettify" the result.

     

    Here is a part of the result of one of my devices, a Fibaro "Dimmer 2". This one does have a serial number:

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • ok, i got it~ i wasn't home when i post the message... ok thanks problem solved~

    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
    Reply to this topic...

    ×   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...