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

JSON4LUA in next version ?


Krikroff
 Share

Question

Hi Krystian, is there a chance to have JSON library in the next version 3.xx ? Thx.

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • For exemple:

    i would like to parse data acquired by Netatmo Weather Stations (

    Please login or register to see this link.

    Please login or register to see this link.

    ), all HTTP responses are JSON encoded.

    Please login or register to see this code.

    I don't want use external script (on another server) to retrieve and use informations.

    JSON parser in Fibaro HC2 product could improve many interactions because more and more third API uses JSON in place of XML, support both would be great

    Please login or register to see this image.

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

    Link to comment
    Share on other sites

    • 0

    Krikroff, we will release such functionality but right now it is under construction.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Krikroff, we will release such functionality but right now it is under construction.

    this feature will it be present in v3.xx ? Thx

    Link to comment
    Share on other sites

    • 0

    Hi Krystian,

    You mention "in first beta". I thought we were getting a finalised V3 instead of V2.beta? I think we were also led to believe that this would be in december, is this not the case?

    Link to comment
    Share on other sites

    • 0
    Guest Futuretech
    Hi Krystian,

    You mention "in first beta". I thought we were getting a finalised V3 instead of V2.beta? I think we were also led to believe that this would be in december, is this not the case?

    +1

    Link to comment
    Share on other sites

    • 0
    Guest vayher
    Hi Krystian,

    You mention "in first beta". I thought we were getting a finalised V3 instead of V2.beta? I think we were also led to believe that this would be in december, is this not the case?

    +1

    We've released v3.311 beta version today and it's going to be finalised soon. Answering the question - we've just finished JSON parsing library for our Lua scripting and it will be added to our engine after testing.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I'am pleased to read that, thx for your investment, hope Hc2 will reveal its full potential.

    Regards.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi Cédric, you can find JSON specification at docs.fibaro.com

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" /> its custom fibaro LUA package as Net.*

    Link to comment
    Share on other sites

    • 0
    Guest deraaij
    Hi Cédric, you can find JSON specification at docs.fibaro.com

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" /> its custom fibaro LUA package as Net.*

    To avoid misunderstanding, these libraries are only available in virtual devices (for now).

    Link to comment
    Share on other sites

    • 0
    Guest cedriclocqueneu

    OK. With this, is it possible to catch a value from json and put it in a virtual device ? Per example to catch weather information from a weather station like Netatmo ?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • You can easily request netatmo JSON, parse results and store few value in global variable for use later in scene...

    I don't know if it possible to store LUA table or JSON object in fibaro global variable ?

    Link to comment
    Share on other sites

    • 0

    Yes you can use fibaro:getGlobalValue and fibaro:setGlobal to write in he variable.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Yes I know all that but my question was whether it is possible to save an object or a table directly in the variable to avoid creating too many variables :->

    edit: in fact I'm going to try it will be easier

    Link to comment
    Share on other sites

    • 0
    Guest jrkalf
    Yes I know all that but my question was whether it is possible to save an object or a table directly in the variable to avoid creating too many variables :->

    edit: in fact I'm going to try it will be easier

    During some tests, I haven't been able to do so

    Please login or register to see this image.

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

    It looks like the global variables are integers, not strings or tables.

    Can any1 elaborate on this?

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