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

QA variable and value


10der

Question

@A.Socha

hi!

 

ia any chance to have a custom variable and values for QA with device type?

 

Please login or register to see this image.

/monthly_2020_07/image.png.83cbfcd8239aa8019b56e111bc7823d0.png" />

 

image.png.7e7c4cfa4986c4cb6f431696b18873ac.png

 

 

with able to choose single / multi-devices.

 

thank you so much!

 

O.

 

 

 

 

 

 

 

 

 

Edited by 10der
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0
1 hour ago, 10der said:

@A.Socha

hi!

ia any chance to have a custom variable and values for QA with device type?

Please login or register to see this link.

 

Please login or register to see this link.

with able to choose single / multi-devices.

thank you so much!

O.

 

I think the point is that "we QA developers" have seen that quickAppVariables work well to allow users to configure our QAs. In. the best of worlds users would not need to touch the Lua code but just configure quickAppVariables to tailor the behaviours of the QAs.

The input for quickAppVariables could be a bit better, possibly allowing types or enumerations to guide the user what is allowed to be set/configured,

 

However, besides that, QA developers also would like to store specific/internal data associated to the QA but we don't want to expose it to end-users as quickAppVariables.

Now we try to hide data in property fields but it's a hack (some of us stuff data in the customDescription property now) and we can't create custom properties as devices are defined by schemas is seems. 

So, maybe "device variables" as @10der suggests - at least something that isn't easily mixed up with quickAppVariables and accidentally deleted by a user trying to configure the QA.


oh and I forgot. Custom device properties could also be accessible with fibaro.getValue 

Edited by jgab
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 0

As @jgab described I uses description.

I store device information in the description.

7 minutes ago, jgab said:

However, besides that, QA developers also would like to store specific/internal data associated to the QA but we don't want to expose it to end-users as quickAppVariables.

Now we try to hide data in property fields but it's a hack (some of us stuff data in the customDescription property now) and we can't create custom properties as devices are defined by schemas is seems.

 

Or you can do with it by make dummy child QA and use setVariable, getVariable.

(because child device's QAvars not appears!)

Link to comment
Share on other sites

  • 0
30 minutes ago, rangee said:

As @jgab described I uses description.

I store device information in the description.

 

Or you can do with it by make dummy child QA and use setVariable, getVariable.

(because child device's QAvars not appears!)

Yes that works - but no help for QAs that can’t have children.

Can we hide child devices? Possible to set visible=false ?

Link to comment
Share on other sites

  • 0
  • Inquirer
  • @rangee you can't catch my idea.

    i want setip my device with UI! i am not saying now how and where i can stotes id's!

    i am asking about nice setuping device.

    please click here:

    Please login or register to see this image.

    /monthly_2020_07/image.png.2569998dd8bed1a072439d30ba2b29bc.png" />

     

    image.png.4b4450cacd6b23e3d1be79e88b028d8f.png

     

    than 

    i want to setup my devices:

    like a

    image.png.5bfeca2df5633de2d5bd3ebc127076f4.png

     

    image.png.872f404081503cc21991c77c5833768e.png

     

     

     

    for clearing undestading i am asking abou UI

    Link to comment
    Share on other sites

    • 0
    32 minutes ago, jgab said:

    Yes that works - but no help for QAs that can’t have children.

    Can we hide child devices? Possible to set visible=false ?

    @jgab Yes. we can make child devices  visible to false.

    But it's not good because we should make 2QA(1 main QA and 1 dummy QA)..

    If QA(A) can't have children then, is it possible to  make main QA with deviceController and make QA(A) as children?

    Edited by rangee
    Add
    Link to comment
    Share on other sites

    • 0

    @10der plz calm down. I know what u saying.  I just comment jgab's reply.

    If you don't have time until fibaro update the firmware(what u suggest)

    Make QA for it.

    UI - select(single or multi) or label with button

    Variables - input vars which you want to change

     

    Please calm down.

    Please login or register to see this attachment.

     

    -------- add -------

     

    oh. linked device.  thats what i questioned before. you told me   its possible by edit lua code and you gave me a example fqa.

    it looks like same question  you and me.

     

    in this case,  same as above

    just make qa for it.  select sensors or switch by user defined interfaces  like image which i uploaded.

     

    Edited by rangee
    add
    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @rangee you still not catch something ;) 

    ok. Example 

    you decide to develop QA

    qa working wit 1..N temperature sensors 

    1..N humidity 

    1..n relay 

    you what to public own QA to ppl

    question how you can configure own QA?

    ok you have 2 variants 

    1st - old school 

    readme.txt 

    please open QA and change at the top blA bla bla 

    2nd - most elegant 

    create 3 local var and asking user to fill this values separated by comma 

    question about UI/AX it’s out fo scope ;) and how user will provide this value plus fill thing this input lines....

    so, why I asking to make nice UI for building and filling of list sensors or actors 

     

    ok.... maybe I want more than Fibaro devs can ;) 

    Link to comment
    Share on other sites

    • 0

    @10der  Yes. I explain exactly.

    Theres 2 way.

    wait for f/w update

    or make QA looks like above.

    Its same. User just select the device by click.

    But this way... Developer need to write a code a lot×100000

    what a hassle...

    Best way is  Fibaro update it  at next release...

    ps. Im not good at English.  understand plz :)

     

     

     

    Heres my QA... refer to it.

    user just need click and use it.

     

    Please login or register to see this attachment.

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @rangee

    Quote

    user just need click and use it.

     

    is not clear how this names populated in your QA ? 

    please share your QA forme ? I whant clicking also +) 

    Link to comment
    Share on other sites

    • 0

    @10der I got device information from HomeAssistant so my QA populate names via API call.

    It could be with fibaro api.. (fibaro.getDevice with filter(eg. temperatureSesnor, humiditySensor etc...))

     

    This is just example with personal opinion.

    And this code has lots of logical error because I wrote this just to show you.

     

     

     

    local device_list = {}  -- fibaro.getDeviceIds() with filter

    local selected_device = {}

    local label_show_i = 1

    -- Let total number of label is 5.

    function QuickApp:btnBeforeClicked()

    if #device_list < 5 then  return end

    label_show_i  = label_show_i  - 5 < 0 and label_show_i  - 5 + #device_list or label_show_i  -  5

    changeLabelText(label_show_i )

    end

    function QuickApp:btnAfterClicked()

     -- same as above.   but label_show_i increases.

    end

    function changeLabelText(i)

    for i = i, i + 4 do

    quickapp:updateView("label" .. i, "text", device_list.i.name)

    quickapp:updateView("btnSelect" .. i, "text", isSelected(i) and "remove" or "select")

    end

    end

     

    function QuickApp:btnSelect1Clicked()

    if device_list[tostring(label_show_i )] and not selected_device[tostring(label_show_i )] then

      addDevices(label_show_i , device_list[tostring(label_show_i )] )

     -- something else

    end

    end

    function addDevices(i, d)

    selected_device[tostring(i)] = d

    -- something else

    end

     

     

    Edited by rangee
    edit
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Crazy.... but it’s ok

    nice workaround....

    I have ~100 real zwave device and ~20 ZigBee device in HC (via zigbee2mqrr + QA) 

    just look to you pr code and thinking how users will be clicking and finding device ;) 

    Link to comment
    Share on other sites

    • 0
    6 minutes ago, 10der said:

    Crazy.... but it’s ok

    nice workaround....

    I have ~100 real zwave device and ~20 ZigBee device in HC (via zigbee2mqrr + QA) 

    just look to you pr code and thinking how users will be clicking and finding device ;) 

     

    ya... it require a great deal of care... it's very hassle.

    I'm using this with zigbee2mqtt too.

    Image which I uploaded... is z2m QA. ( 79 zigbee devices )

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    On 7/7/2020 at 6:26 PM, rangee said:

     

     

    -------- add -------

     

    select sensors or switch by user defined interfaces  like image which i uploaded.

     

    Hi, you mention, you upload images to the HC. Is it HC3? If so how do you upload them? I am searching this already for a long time and would be very much helped if you could explain.

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