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


Recommended Posts

  • Topic Author
  • Posted
    3 minutes ago, rangee said:

     

    Um... I can't remember exactly because I edited this couple of month ago...

    If don't do that, it makes problem with slider.

     

    And without edit, code results different with original viewLayout...

     

    If there are multi element in row,  there's no problem.

    it looks like this

    { "components": [ { "components": [ { "name": "button2_1",

     

    If there are one element in row,  there are some differces.

    it looks like this without change

    { "components": [ { "components": [ { "name": "button1",

    it looks like this with change and this is original code when you make ui at fibaro editor.

    { "components": [ { "name": "button1",
     

    Ok, I will fix it in next release (any hour now :-) ). I'm also making some more changes to the UI creation code so let me know if you spot some more issues/incompatibilities.

  • Topic Author
  • Posted

    Pushed v0.130.

    Updated handling of UI elements.Fix from @rangee also.

    Now we can declare UIlements in the UI=.. header like in this example.

    At least laying out labels and buttons/sliders on the same row is useful.

    Note also that slider takes extra arguments

    Please login or register to see this code.

    will make the slider return values 0-50 and move the value in steps of 5.

    Posted
    4 minutes ago, jgab said:

    Pushed v0.130.

    Updated handling of UI elements.Fix from @rangee also.

    Now we can declare UIlements in the UI=.. header like in this example.

    At least laying out labels and buttons/sliders on the same row is useful.

    Note also that slider takes extra arguments

    Please login or register to see this code.

    will make the slider return values 0-50 and move the value in steps of 5.

     

    Note that.. when we declare slider or button with label on the same row,

    eg)  {slider, label}  or {button, label}

    When edit script via hc3 editor, UI will broken up.

  • Topic Author
  • Posted
    Just now, rangee said:

     

    Note that.. when we declare slider or button with label on the same row,

    eg)  {slider, label}  or {button, label}

    When edit script via hc3 editor, UI will broken up.

    Yes, the alternative layouts is not supported by the UI editor.

    • 3 weeks later...
    Posted

    Please login or register to see this attachment.

     

    I'm trying to use the SDK - but the QA is not being generated in HC3 - I'm using MAC - could this be an issue ? 

  • Topic Author
  • Posted
    12 hours ago, ChristianSogaard said:

    I'm trying to use the SDK - but the QA is not being generated in HC3 - I'm using MAC - could this be an issue ? 

    I'm developing everything on a Macbook Pro so that's not the issue.

    It's a nice screen shot but it doesn't show what happens when you run.

     

    (ZBS stops at the first line (the little green triangle to the left on line 1) and you need to press > or F5 to start running the code. I hope it's nothing as simple as that :-) )

     

    Your settings from the screen shot shows that it's set to create a proxy on the HC3 (proxy=true). It does not happen? You would get a error message at least.

     

    Then when you are ready with the QA and want to deploy the real QA on the HC3 you can either set deploy=true and run once, or install the ZBS plugin to get a menu option to deploy the QA (Project -> Deploy QuickApp)

     

     

    Posted
    53 minutes ago, jgab said:

    I'm developing everything on a Macbook Pro so that's not the issue.

    It's a nice screen shot but it doesn't show what happens when you run.

     

    (ZBS stops at the first line (the little green triangle to the left on line 1) and you need to press > or F5 to start running the code. I hope it's nothing as simple as that :-) )

     

    Your settings from the screen shot shows that it's set to create a proxy on the HC3 (proxy=true). It does not happen? You would get a error message at least.

     

    Then when you are ready with the QA and want to deploy the real QA on the HC3 you can either set deploy=true and run once, or install the ZBS plugin to get a menu option to deploy the QA (Project -> Deploy QuickApp)

     

     

    I'm trying to set it up - I followed the Guide and the youtube video :-)

    Every second time  run F5 I am getting

    Program starting as '"/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua" -e "io.stdout:setvbuf('no')" "/var/folders/ky/rhpk780x1cn7cpwp9mh59hb4bv22t8/T/.tTnaoj"'.
    Program 'lua' started in '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms' (pid: 46281).
    Debugging session started in '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/'.
    Program completed in 2.08 seconds (pid: 46281).
    cannot open fibaro: No such file or directory
    stack traceback:
        [C]: in function 'dofile'
        firstTry.lua:24: in main chunk
    Debugging session completed (traced 0 instructions).

     

  • Topic Author
  • Posted

    Ah, I saw that you do dofile("fibaro")

    That won't work. Put 

    Please login or register to see this link.

      in your working directory

    /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/

    (btw, maybe not optimal to run in the ZBS Contents directory)

    Keep the name 

    Please login or register to see this link.

     also and do

    dofile("fibaroapiHC3.lua")

     

    Install the plugin also - you get tooltips and completions for fibaro commands.

    • Like 1
    Posted (edited)
    1 hour ago, ChristianSogaard said:

    cannot open fibaro: No such file or directory

    your creds you can provide in credentials.lua 

     

    Please login or register to see this code.

     

    Edited by 10der
    • Like 1
    Posted
    2 hours ago, jgab said:

    Ah, I saw that you do dofile("fibaro")

    That won't work. Put 

    Please login or register to see this link.

      in your working directory

    /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/

    (btw, maybe not optimal to run in the ZBS Contents directory)

    Keep the name 

    Please login or register to see this link.

     also and do

    dofile("fibaroapiHC3.lua")

     

    Install the plugin also - you get tooltips and completions for fibaro commands.

    I already put 

    Please login or register to see this attachment.

    And the plugin here

     

    Please login or register to see this image.

    /monthly_2020_11/image.png.52c96e92213b814ad60285462601dffd.png" />

     

    1 hour ago, 10der said:

    your creds you can provide in credentials.lua 

     

    Please login or register to see this code.

     

     

     in my working directory

    /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/

    ?

  • Topic Author
  • Posted
    52 minutes ago, ChristianSogaard said:

    I already put 

    Please login or register to see this attachment.

    And the plugin here

     in my working directory

    /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/

    ?

    Yes, 

    credentials.lua in same directory as fibaroapiHC3.lua and your working files

     

    and in ZBS set working directory to ../myprograms/

     

    You still have issues?

    Posted
    3 hours ago, jgab said:

    Yes, 

    credentials.lua in same directory as fibaroapiHC3.lua and your working files

     

    and in ZBS set working directory to ../myprograms/

     

    You still have issues?

    Yes - i have issues .

    In myprograms is have fibaroapiHC3.lua and credentials.lua

    and in packages I have fibaroapiHC3plug.lua

     

    The QA is not being created when running (F5) - should be 961

     

    Same screenshot as before

    Program starting as '"/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua" -e "io.stdout:setvbuf('no')" "/var/folders/ky/rhpk780x1cn7cpwp9mh59hb4bv22t8/T/.ZedPlR"'.
    Program 'lua' started in '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms' (pid: 52385).
    Debugging session started in '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/'.
    Debugging session completed (traced 0 instructions).
    Program completed in 5.21 seconds (pid: 52385).

     

    Please login or register to see this attachment.

  • Topic Author
  • Posted

    Can you PM me the QA code you have? Something is strange...

    Posted

    Hi

     

    On This post there is an example/quick app to send a sms using Nexmo/Vonage API.

    Is possible to instead of sent a sms to make a phone call using this service?

     

    Thank you

    Posted

    Hi there,

     

    any plans to enable the SDK to run over https?

     

    If the answer is 'no' I do understand - just asking.

     

    Cheers,

    jayrock

  • Topic Author
  • Posted
    9 minutes ago, jayrock said:

    Hi there,

    any plans to enable the SDK to run over https?

    If the answer is 'no' I do understand - just asking.

    Cheers,

    jayrock

    If you set hc3_emulator.apiHTTPS=true it will make https calls to the HC3 api

    No support for user provided certificates. If someone wants to hack it feel free to do it.

    40 minutes ago, joaoartur said:

    Hi

    On This post there is an example/quick app to send a sms using Nexmo/Vonage API.

    Is possible to instead of sent a sms to make a phone call using this service?

    Thank you

    Probably, but you need to adapt the API calls to do what you want.

    I guess it uses the same api_key and secret for calls.

    • Like 1
    Posted
    17 minutes ago, jgab said:

    If you set hc3_emulator.apiHTTPS=true it will make https calls to the HC3 api

    No support for user provided certificates. If someone wants to hack it feel free to do it.

     

    Thanks, got it. Maybe you want to add the property to post #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
    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...