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

fibaro:getValue(selfId, "deviceIcon") issue


Question

Posted

 

Please login or register to see this code.

Please login or register to see this image.

 

 

benefit. I want to keep a status of my VD  in VD instead of Global params.

it's the bug.

 

O.

9 answers to this question

Recommended Posts

  • 0
Posted

Hi @10der

Does this also work with the HC3?

I would like to change the icon on a device.

Reading is possible with

a = fibaro.getValue (316," deviceIcon ")

For example, 32 comes out. The same as in the Swagger!

If I want to change that to 1054, I can do that with

fibaro.call (316, "setProperty", "currentIcon", 1054)?

I tried to be respectful of possible mistakes.

But it didn't work.

 

?

 

Greetings Frank

  • 0
  • Inquirer
  • Posted

    self:updateProperty("deviceIcon", 1044)

     

    NB: not all devices support this action. why? idk. it's open question without any answers

    • 0
    Posted (edited)

    Thank you for your prompt reply.

    I still have a stupid question, where is the device ID? I would like to change the device icon of device ID 316.

    So I can only change the QA icon, right?

     

    Or isn't that better? Although I am not sure if this is correct.

    api.put("/devices", ''id': 316,"properties': ''deviceIcon': 1054''")

     

    Greetings Frank

    Edited by FBerges
    • 0
  • Inquirer
  • Posted

    Frank, the best manual and FAQ how to use Fibaro API is file fibaroapiHC3.lua by @jgab 

    please download this file and use it for learning.

    • Like 2
    • 0
    Posted

    So far so good !

    That's nice that you point out my ignorance!

    I'm not going into that either!

    I know that I still have a lot to learn and I am hard at it.

     

    My question was not related to a QA but a normal scene in the HC3.

    Probably came across incorrectly or was translated (Google)

     

    Explained again!

    I would like to change the icon of any device in a normal scene (HC3) using a command.

     

    The example above of @10der is exactly that.

    But with this I change the own (from the QA) icon in a QA.

    I understood it like that.?

     

    With the json I am still at war and try to get used to complex things.

     

    Greetings Frank

    • 0
    Posted

    I think it is: fibaro.call(ID, "setProperty", "currentIcon", iconID)

     

    (Haven't tried it)

    • 0
    Posted

    @SmartHomeEddy

    Thank you very much

    That true the way a typo on my part was true the cause of not working.

     

    The correct command is: fibaro.call (Device-ID, "setProperty", "deviceIcon", Icon-ID)

     

    SUPER thanks again!

     

    Greetings Frank

    • Like 1
    • 0
  • Inquirer
  • Posted
    16 hours ago, FBerges said:

    That's nice that you point out my ignorance!

    Give a man a fish and you feed him for a day;
    teach a man to fish and you feed him for a lifetime.

    • 0
    Posted
    23 hours ago, 10der said:

    the best manual and FAQ how to use Fibaro API is file fibaroapiHC3.lua by @jgab 

     

    Is indeed a nice roman to reed in the weekends ?

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