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

Child Devices for Quickapp


ppeterr

Question

So, i have a quickapp (credits to @SDeath)

 

This app takes a number of values from my thermostat. This works well, and provides a nice overview in variables within the quickapp itself.

Now I want to separate a number of values from this quickapp. I figured it would work by bringing it up as a child device.

I could also use the variables in follow-up scenes. But to visualize it and then also be able to export it to an influxDB. I think it would be useful to have it as a child device. Is my idea about this correct? And how would i do this.

 

This is the code. Where "lblGeleverdHuidig" i would like as a childdevice.

 

 

 

Please login or register to see this code.

 

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
7 minutes ago, ppeterr said:

I think it would be useful to have it as a child device. Is my idea about this correct?

yes

7 minutes ago, ppeterr said:

And how would i do this.

 

1) simple - just create from UI 

Please login or register to see this image.

/monthly_2021_09/image.png.52bff27059081a685c3df4bec3f431d0.png" />

2) little bit difficult - search by forum post(s) from jgab

Link to comment
Share on other sites

  • 0
1 hour ago, ppeterr said:

So, i have a quickapp (credits to @SDeath)

 

This app takes a number of values from my thermostat. This works well, and provides a nice overview in variables within the quickapp itself.

Now I want to separate a number of values from this quickapp. I figured it would work by bringing it up as a child device.

I could also use the variables in follow-up scenes. But to visualize it and then also be able to export it to an influxDB. I think it would be useful to have it as a child device. Is my idea about this correct? And how would i do this.

 

The structure would look something like this using my

Please login or register to see this link.

This is a mother QA and 2 children. The mother polls a web service and sends the data to the children.

The children select the data they need and do whatever - update labels and/or properties.

The type of the child (and interfaces) will decide what they can display in the UI..

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks. @10derand @jgab

     

    I must admit this is to advanced for me :) Been working with some code now for some weeks.

    And yeah the simple things i can get to work. But a little more advanced, i just cant get my head around it.

     

    So maybe another approach would work better for me. And  i think that might include what you posted there @jgab

     

    I can acces the API from the rooted thermosthat. http://192.168.1.50/hdrv_zwave?action=getDevices.json

    That outputs in a strange way as follow (this only one "device" out of about 20):

     

    "dev_2.4": {"uuid": "f665213b-87ae-4faa-accb-03fd863138d8", "name": "HAE_METER_v3_4", "internalAddress": "2.4", "type": "HAE_METER_v3_4", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "WARNING", "DeviceName": "HAE_METER_v3_4", "CurrentElectricityFlow": "2465.00", "CurrentElectricityQuantity": "2322989.00"}

     

    So, if i would use something like the script above. The mother QA could poll this url. How would the children filter out the value for  "CurrentElectricityFlow": "2465.00",

     

     

    Link to comment
    Share on other sites

    • 0
    16 minutes ago, ppeterr said:

    Thanks. @10derand @jgab

     

    I must admit this is to advanced for me :) Been working with some code now for some weeks.

    And yeah the simple things i can get to work. But a little more advanced, i just cant get my head around it.

     

    So maybe another approach would work better for me. And  i think that might include what you posted there @jgab

     

    I can acces the API from the rooted thermosthat. http://192.168.1.50/hdrv_zwave?action=getDevices.json

    That outputs in a strange way as follow (this only one "device" out of about 20):

     

    "dev_2.4": {"uuid": "f665213b-87ae-4faa-accb-03fd863138d8", "name": "HAE_METER_v3_4", "internalAddress": "2.4", "type": "HAE_METER_v3_4", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "WARNING", "DeviceName": "HAE_METER_v3_4", "CurrentElectricityFlow": "2465.00", "CurrentElectricityQuantity": "2322989.00"}

     

    So, if i would use something like the script above. The mother QA could poll this url. How would the children filter out the value for  "CurrentElectricityFlow": "2465.00",

     

     

     

    function ChildA:update(data)

         local val = data['dev_2.4'].CurrentElectricityFlow

         self:updateProperty("...",val)

    end

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