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

HC3 QuickApp LUA error: attempt to index a nil value (local 'child')


Gabor Varga
 Share

Question

Hi,

 

I am creating a custom QuickApp for Gree Air Conditioners on HC3, and I have the following issue when I would like to create the child device under my QuickApp:

./quickApp.lua:156: attempt to index a nil value (local 'child')

 

Did anyone faced such issue? quickApp.lua is internal file within the HC3, so I cannot touch it, also I cannot check what is inside this file.

Here is my code for child device creation:

Please login or register to see this image.

/monthly_2022_01/image.png.c4b7486ed77aed4b9eec290ac207cbcf.png" />

 

I also tried using api.post command for calling the api:

image.png.a34b26255145de82df6da92a39259ae1.png

 

In this case I have the following return:

{"reason":"","message":"","type":"ERROR"}

 

Luckily, it is not giving any better information what is the problem, what is missing etc.

 

Any idea, how can I check the details?

 

Thanks!

G

Edited by Gabor Varga
Added some more information
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Gabor Varga,

 

did you have a look at the child device manual from Fibaro?

 

Please login or register to see this link.

 

Summarised: In the QuickApp you need to define a new class. After defining all classes, you can create child devices. When the QuickApp starts it needs to initialise its child devices. 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 28 minutes ago, SmartHomeEddy said:

    Hi @Gabor Varga,

     

    did you have a look at the child device manual from Fibaro?

     

    Please login or register to see this link.

     

    Summarised: In the QuickApp you need to define a new class. After defining all classes, you can create child devices. When the QuickApp starts it needs to initialise its child devices. 

    Hi,

     

    Yes. I tried creating my solution based on this article, but I have the error message mentioned in my original post. However, it is not describing many options. E.g.: how 'uid' is generated for storing/restoring create child devices.

    It would be nice to see a complete example from begin to end how this looks like.

     

    Thanks!

    G

    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.

     Share

    ×
    ×
    • Create New...