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


Regarding for Lua Programming


ankitdixit

Recommended Posts

Hello Everyone, I am working on some projects that seeks help in finding the appropriate tutorials for lua programming. I want to learn lua right from the basics and take it step by step. Where can I get these tutorials?

Link to comment
Share on other sites

Lua basic programming

    -Lua tutorial 

Please login or register to see this link.

      Only the basic part. Skip Modules, Metatables, Coroutines, File I/O, Error Handling

    - Lua 5.3 reference - Standard Library 

Please login or register to see this link.

      Look at string, table and math library functions

 

Download

Please login or register to see this link.

that is a free (and good) Lua IDE to practice Lua coding

 

Fibaro Scene and QA coding

    Fibaro provides a lot of Lua functions to interactive with the HC2 and HC3 platforms.

    - HC2 - 

Please login or register to see this link.

    - HC2 -

Please login or register to see this link.

    - HC3 Scenes - 

Please login or register to see this link.

    - HC3 QuickApps - 

Please login or register to see this link.

    

Engage in this forum, look at users posts and example code (ex. the

Please login or register to see this link.

)

Look at best practices like how to store configuration data in Fibaro global variables (

Please login or register to see this link.

)

...and how to work with timers (

Please login or register to see this link.

)

 

Optional, install my

Please login or register to see this link.

that run in ZeroBrane studio (and VS) and start coding...

  • Like 3
Link to comment
Share on other sites

These are enough tutorial list which are curated by the community member but still I would suggest you to go to

Please login or register to see this link.

and check the best one for you which are curated by the lua experts.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

Dear All!

 

Is anybody aware that if there is a LUA coding best practices or something like that?

I could have read in a lot of streams that the bad coding could cause for example high memory or CPU consumption.

 

What could be the best considerations we should take into account to do nice, efficent coding in LUA (i.e. avoid CPU consuming function like DELAY, etc.)?

 

Thank you!

Link to comment
Share on other sites

5 minutes ago, krizso said:

Dear All!

 

Is anybody aware that if there is a LUA coding best practices or something like that?

I could have read in a lot of streams that the bad coding could cause for example high memory or CPU consumption.

 

What could be the best considerations we should take into account to do nice, efficent coding in LUA (i.e. avoid CPU consuming function like DELAY, etc.)?

 

Thank you!

 

read the posts of @jgab

Link to comment
Share on other sites

8 hours ago, SmartHomeEddy said:

 

read the posts of @jgab

Well, there is efficient coding in Lua that's... that could be much better if Fibaro let us have more of standard  Lua (coroutines, metatables)

Then there is efficient coding on the HC3... that tends to vary with FW release (avoiding bugs du jour etc) ;-)

Then there is nice coding :-) 

 

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
Reply to this topic...

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