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

what determines "isLight" property?


ipsofacto

Question

com.fibaro.FGRGBW441M

 

Two installed controlling LED strips.   See the response from 

Please login or register to see this code.

for the two different devices.

 

One has isLight set to TRUE  ... one has isLight set to FALSE (first example)  but second example is TRUE.  Why and how?

 

WHY?   Can this be configured?   Both are used on RGBW and clearly lights -  programmatically inconvienient as the isLight boolean would be a good filter if this could be corrected.    It would also be good if you could set virtual_device to be represented as isLight TRUE

 

Anyone any ideas?

 

using the follow query to extract all devices with a light interface to store their state as a "preset" in a room that can be called up by VD or scenes e.g.  Morning,  Evening, Enteratining, Relaxing.  Plan is to incorporate these into "intelligence" but let the user (family) configure what the actual preset is using a VD to query current lights in a room storing this as the preset.

 

Please login or register to see this code.

The results of a simple get device API call shows the same module exposing different isLight on query.  Both are RGBW driving lights implemented physically as LED strips.

Please login or register to see this code.

Please login or register to see this code.

 

Edited by ipsofacto
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Please login or register to see this image.

 

xEL0L1HrPi.png

 

============================================================

 

cvUt6z6rCB.png

 

UIEDifag0P.png

 

 

====================================================================

 

M0pPvFiYtm.png

 

 

any questions?

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Many thanks - very clear.   I did not see the controlled light drop down for looking.  I will check this evening.

     

    thanks

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • So my two LED were inconsistently reporting - see the OP.    i.e. my system appeared to be inconsistent with one LED  / RGBW.  I have soft reset "Fireplace" and it now seems to report with light interface as "isLight TRUE".    All good now.

     

    Is there anyway to set these property for a VD so that they surface in a get devices query as above?

     

    Please login or register to see this code.

    It would be nice if that could return all devices and VD that control lighting ... no doubt I can work around.

     

    Thanks for the tips.

    Link to comment
    Share on other sites

    • 0
    11 minutes ago, ipsofacto said:

    Is there anyway to set these property for a VD so that they surface in a get devices query as above?

    2

     

    sorry. Your question is not clear to me.

     

     

    btw, I have checked.

    it's work properly in VD

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 10der

     

    My first problem,  inconsistency between the value of the isLight property for two identical RWBG modules was solved with a soft reconfigure of one device.  isLight went from FALSE to TRUE after the reconfigure i.e. all my RGBW modules are now correctly configured and, via API or getdevices(data) return isLight correctly as TRUE.   SOLVED -  thanks for your help that made me try the soft reset.

     

    The second question relates to my goal.  I want to read all the "devices" with a light interface in a room to save their settings (value, brightness, colour, program etc) as a "lighting preset" in a json encoded global variable.   A fairly simple VD in each room allows my family to tailor the lights for a set list of presets e.g. relax, entertain, evening, night etc.  A scene that accepts room and preset name can then switch between the different saved light settings.   That scene can be linked in on timers, through Alexa, etc so rather than "hard coding" light settings in rooms,  the family can tweak and tailor as they want.

     

    I can now easily get the list of devices with light interface and isLight as TRUE in any room (thanks for your help) but that doesn't work to filter / find our carefully crafted VDs that are "acting as light controllers".  I have VDs that control HUE and a cheap version MI-LIGHT/LimitlessLED.    So to get a full list of devices that are lights I need to query for isLight and then add known VD (or plugs which also don't have a light interface so will not appear in the getdevices query) that actually control lights.   It would be nice to treat all devices the same and be able to set a property on a VD or fibaro device isLight to TRUE i.e. tell it that it is indeed controlling a light..

     

    I am assuming this is not possible so I will  code a workaround to add VD and plugs or similar to my full list of lights.   It is all doable from now just not quite as generic as I would have liked.

     

    Hope makes more sense.

     

    edit - just checked.  you can set controller drop down to light for plugs.  one less special case.

    Edited by ipsofacto
    Link to comment
    Share on other sites

    • 0

    аааааа! got it!

     

    1) you can't add own properties to VD. it's not possible

    2) but you can check in all your VDs "magic" properties. for example, set in in all VDs port = 7777 and grab VDs like

     

    Please login or register to see this code.

    yes, look like crazy but it works. or set predefined VD icon (lol)

     

    Please login or register to see this code.

     

    notice: do not forget merge tables 

    for k, id in pairs(vd_table) do dev_table[k] = id end

     

     

    UPD: idk, how you will separate ids... cuz controlling physical device difference from controlling virtual device.  Render unto Caesar that which is Caesar's.

     

    Edited by 10der
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 10der

     

    thanks for sticking with me!  I was also thinking of a more brute force approach as well.   A hometable global entry something 

    like HUELights as table of ids to append to my table of device ids with is light true.  That metadata could be button ids etc as well for control purposes.  i guess I was keen to find a more generic way!

     

    Still ... it is a shame you cannot define VD as controlling a light.   Plugins I guess may have helped.

     

    thanks for guidance 

     

     

    Link to comment
    Share on other sites

    • 0
    8 hours ago, ipsofacto said:

    Still ... it is a shame you cannot define VD as controlling a light.   Plugins I guess may have helped.

     

    5 cents from my side. more than, for example, you cannot use VD as main room sensor, cannot handle events,  etc

    and last. plugins, according to information from @Sankotronic and link https://developer.fibaro.com/docs - now under construction. It's mean what your own plugin can stop running after update unexpectedly, for example.

    keep in mind it

     

    Please login or register to see this image.

     

    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.

    ×
    ×
    • Create New...