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

[SOLVED]LUA Command to obtain name of rooms from ID devices


Question

Posted

       Hi everybody,

 

       I am looking for a LUA command to obtain the name of the rooms knowing the FIBARO ID devices, similar to fibaro:getName(ID_Device) that return the name of the device. Somebody could help me? Thanks in advance! 

 

                          Hernán

8 answers to this question

Recommended Posts

  • 0
Posted

fibaro.getRoomNameByDeviceID(deviceID)

  • Like 3
  • 0
Posted

Or get a roomId from the device and then pull the name from /api/rooms ;)

  • 0
  • Inquirer
  • Posted
    On 7/19/2024 at 3:29 AM, SmartHomeEddy said:

    fibaro.getRoomNameByDeviceID(deviceID)

     

    Thanks so much @SmartHomeEddy I have tried with it and was successful. Do you know if there is any FIBARO System LUA API document to download? Because i have only the document that share below but it has only some commands of FIBARO. I think that the document isn´t complete.

    Please login or register to see this attachment.

    • Thanks 1
    • 0
  • Inquirer
  • Posted
    On 7/19/2024 at 3:56 PM, m.roszak said:

    Or get a roomId from the device and then pull the name from /api/rooms ;)

     

              Hi @m.roszak, thank you for the response. Ok, this is another way (REST API not?). Could you explain me with more detail about REST API? Perhaps, there is another  document about REST API to i learn more. Thanks in advance. :) 

    • 0
    Posted
    8 hours ago, Herni said:

    Do you know if there is any FIBARO System LUA API document to download?

     

    Most of the time I use the documentation over here: 

    Please login or register to see this link.

    For the API I use Swagger itself. I find that more handy than a document. 

     

    For the room name, some time ago I was also looking for a short way to get the name, and I got the answer on the Dutch Fibaro Discord channel. So help of other user is also Priceless. 

     

    I believe Fibaro is busy with new documentation @m.roszak (?)

     

    • Like 2
    • 0
  • Inquirer
  • Posted
    On 7/24/2024 at 3:12 AM, SmartHomeEddy said:

     

    Most of the time I use the documentation over here: 

    Please login or register to see this link.

    For the API I use Swagger itself. I find that more handy than a document. 

     

    For the room name, some time ago I was also looking for a short way to get the name, and I got the answer on the Dutch Fibaro Discord channel. So help of other user is also Priceless. 

     

    I believe Fibaro is busy with new documentation @m.roszak (?)

     

               Hi @SmartHomeEddy, this link is just to i was looked for. Thank you so much!!   I´m doing a home table with all home devices, parameteres and values to access all data more effectively from my scenes and QA´s. So this document is exactly that i needed.
    I don´t know to use the API REST information yet. But I think that the learning curve will be more easily using this document.

    • 0
    Posted

    Ah, a home table. Did you see this source?

     

    Please login or register to see this link.

     

    • Thanks 1
    • 0
  • Inquirer
  • Posted
    On 7/25/2024 at 11:15 AM, SmartHomeEddy said:

    Ah, a home table. Did you see this source?

     

    Please login or register to see this link.

     


    Hi @SmartHomeEddy ,

    No I didn’t see this source. Is exactly the same thing that I want to do. Thank you so much!! 😊 

    Perhaps I will add 2 or 3 fields or attributes to the home table to save different values of brightness to lights, or  values of position to blinds to use in different scene. But this scene to fill the home table is great for me. Thank you again!!

    • Like 1

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