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

Where do I find LUA library and HTML API?


Question

Posted

Hi!

Just wandering where I can find the specs for the LUA libraries supported in HC2, as well as the HTML API?

Best regards,

Jens

16 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this link.

  • 0
Posted

Documentation is Fibaros weakest link according to me and many others. Your best resource is this forum.

The only official documentation is partly outdated and very incomplete:

docs.fibaro.com

What we need is an official wiki as relevant forum threads is often a big hassle to find.

  • 0
Posted
Your best resource is this forum.

And it gets more and more fragmented all the time, same things are partially in several threads. Wiki would be nice, but would need also much work.

  • 0
Posted

Please login or register to see this link.

Pretty useless as although google translation work well enough for the document, all the screen scrapes stay in Polish.

  • 0
Posted

This thread also has some nice info.

Please login or register to see this link.

  • 0
Posted

Please login or register to see this link.

Pretty useless as although google translation work well enough for the document, all the screen scrapes stay in Polish.

It may also be adressed in English directly. Pics will most likely still be in Polish though:

Please login or register to see this link.

en/?page_id=861

  • 0
  • Inquirer
  • Posted

    Thanks guys, it sure seems to need some improvement like you say, but at least it's a start!

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted
    Wiki would be nice, but would need also much work.

    someone tries to make wiki

    Please login or register to see this link.

    • 0
  • Inquirer
  • Posted

    Hi again!

    Now that I've taken a quick look I'm almost amazed at how little info there is. I'm very used to program LUA, but getting started on the HC2 is close to impossible.

    Things I wonder are:

    - What standard libraries are installed?

    - How do I address the global table? Usually it's _G but that doesn't exist

    - If I want to create a TCP connection, what library would I use?

    - Running HTTP calls, is the only way to do it via an os.execute cURL?

    many more questions, but if someone can help me with these first I'd be a happy chap!

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    //Jens

    • 0
    Posted
    someone tries to make wiki

    Cool ... that's quite fresh, just few days old.

    • 0
    Posted

    Too bad such a crap-filled and horrible to navigate site as wikia has been used. I don't even understand to read the content and I'm super smart

    Please login or register to see this image.

    /emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

    • 0
    Posted

    maybe Wikidot.com ?

    Please login or register to see this link.

    • 0
    Posted

    Hi, you can find a lot of information with my Toolkit application for Home Center (

    Please login or register to see this link.

    ). See log window and built-in LUA editor (API, docs, etc)

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    • 0
    Posted
    Hi again!

    Now that I've taken a quick look I'm almost amazed at how little info there is. I'm very used to program LUA, but getting started on the HC2 is close to impossible.

    Things I wonder are:

    - What standard libraries are installed?

    - How do I address the global table? Usually it's _G but that doesn't exist

    - If I want to create a TCP connection, what library would I use?

    - Running HTTP calls, is the only way to do it via an os.execute cURL?

    many more questions, but if someone can help me with these first I'd be a happy chap!

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    //Jens

    HC2 has a sandbox and a lot is blocked including setmetatable, loading from text etc

    How do I address the global table? Usually it's _G but that doesn't exist blocked

    Running HTTP calls, is the only way to do it via an os.execute cURL? curl blocked

    Fibaro has wrapped a net library but only from Virtual Devices

    • 0
    Posted

    - If you want to create a TCP connection you must use Net.FTcpSocket (

    Please login or register to see this link.

    )

    - For HTTP calls, you must use Net.FHttp (

    Please login or register to see this link.

    ) but you can't request https, unable to add custom header (but you can with FTcpSocket

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" /> ) etc.

    Today the only thing I can not do is HTTPS request, everything else is possible...

    edit: hope we can access setmetatable in V4,

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

    • 0
    Posted
    edit: hope we can access setmetatable in V4

    +1

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