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


Visual Studio Code (vscode) for QuickApp development


jgab

Recommended Posts

  • Topic Author
  • 6 minutes ago, gurpal2000 said:

     

    3.11 worked Great!

    Yes aware of virtual envs in other langs too. It's all in VM at the moment so trash the whole thing (or restore to a base install) in case something goes wrong at least.

     

    Out of interest what level of permissions is required for the Visual Studio integration (as per the config.json)? I will try my existing user, but could it be best practice to create a separate user specifically for fibemu?

    To be honest I only run with admin...

    There may be issues as fibemu tries to sync the state of the hc3 to fibemu and if it can't get the data...

    On the other hand, fibemu is restrictive on changes synched back to hc3 and there is the --%%remote= directive to allow fibemu to update specific resources.

    Link to comment
    Share on other sites

    • 3 weeks later...

    @jgabJan i am trying to move to VsCode..(not too familiar with it..)

    So went throught the description from the video turotial, but when i press Run i get an error python3: can't open file '

    Please login or register to see this link.

    ': [Errno 2] No such file or directory

    Where, how to set something to get it work?

     

    Edited by Neo Andersson
    Link to comment
    Share on other sites

  • Topic Author
  • 18 hours ago, Neo Andersson said:

    @jgabJan i am trying to move to VsCode..(not too familiar with it..)

    So went throught the description from the video turotial, but when i press Run i get an error python3: can't open file '

    Please login or register to see this link.

    ': [Errno 2] No such file or directory

    Where, how to set something to get it work?

     

    Well, there are so many things that can be wrong that it's very difficult to say. If you have followed the video step by step you should at least get the test QA in the directory to run.

    Link to comment
    Share on other sites

    4 hours ago, jgab said:

     

    Well, there are so many things that can be wrong that it's very difficult to say. If you have followed the video step by step you should at least get the test QA in the directory to run.

    Yes, i am testing it only with test QA, and always this error...will try to google out some solutioins

    Link to comment
    Share on other sites

  • Topic Author
  • Msft has a decent intro to vscode 

    Please login or register to see this link.

    You need to stand in the right directory and use F5 (Run -> Start Debugging)  to run (not the arrow in the upper right corner)

    Link to comment
    Share on other sites

    4 hours ago, jgab said:

    Msft has a decent intro to vscode 

    Please login or register to see this link.

    You need to stand in the right directory and use F5 (Run -> Start Debugging)  to run (not the arrow in the upper right corner)

    Thanks, actually it is not working. I have tried everything i found on tutorials..

    If i press F5 i get

     

    Please login or register to see this attachment.

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • Looks like your .vscode is in examples/. ?
    It's important to have the top-level .vscode directory with the right launch.json and settings.json.

    Do you have a .vscode on top-level with the subdirectory emuiles/ and is it set as the working directory?
    My files look like

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    53 minutes ago, jgab said:

    Looks like your .vscode is in examples/. ?
    It's important to have the top-level .vscode directory with the right launch.json and settings.json.

    Do you have a .vscode on top-level with the subdirectory emuiles/ and is it set as the working directory?
    My files look like

    Please login or register to see this attachment.

    I reinstalled again everything according to the video.

    Now it seems that i have the same setup as you..

    I have run the pip installs, i have installed the local Lua interpreter, created the settings.json i have pressed F5

    I really want to get it working, as i had nightmare times finding typos and undefined variables in my code.

     

    Please login or register to see this attachment.

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • Is python correctly installed?
    Can you run python3 in the vscode terminal window (at the bottom)

    Link to comment
    Share on other sites

    10 minutes ago, jgab said:

    Is python correctly installed?
    Can you run python3 in the vscode terminal window (at the bottom)

    Please login or register to see this image.

    /monthly_2023_12/image.png.d3ed34cbf622f2a8ef558d7284369fc5.png" />

    Link to comment
    Share on other sites

    and this is my config.json in examle folder /as in video is instructed

     

    Please login or register to see this image.

    /monthly_2023_12/image.png.30055918b168de373794837ac77f18e1.png" />

    Edited by Neo Andersson
    Link to comment
    Share on other sites

  • Topic Author
  • Ok, could it be that you have a space in your username so the path contains "Kiss Zoltan" and some script barfs on that?

    Link to comment
    Share on other sites

    15 minutes ago, jgab said:

    Ok, could it be that you have a space in your username so the path contains "Kiss Zoltan" and some script barfs on that?

    Yeah i have space there...This is my Windows user name i think, i dont even know how to change it if needed

     

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, I pushed a new version of launch.json with relative paths - try it and see if it works?

    Link to comment
    Share on other sites

    8 minutes ago, Neo Andersson said:

    Yeah i have space there...This is my Windows user name i think, i dont even know how to change it if needed

     

    I dont think i can change it to any name wihtout spaces, as in windows account setting it asks for name and sureanem and windows creates this full name with a space in it

     

    9 minutes ago, Neo Andersson said:

    Yeah i have space there...This is my Windows user name i think, i dont even know how to change it if needed

     

     

    Link to comment
    Share on other sites

    25 minutes ago, jgab said:

    Ok, I pushed a new version of launch.json with relative paths - try it and see if it works?

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, thats progress. Now it's the python library parsing the command line args that don't like your spaces in the path.

     

    Can you open launch.json and change

    "${file}"

    to

    "${relativeFile}"

     

    It's a couple of places in the file. 

     

    See if it works...

     

     

     

    Link to comment
    Share on other sites

    7 minutes ago, jgab said:

    Ok, thats progress. Now it's the python library parsing the command line args that don't like your spaces in the path.

     

    Can you open launch.json and change

    "${file}"

    to

    "${relativeFile}"

     

    It's a couple of places in the file. 

     

    See if it works...

     

     

     

    Please login or register to see this image.

    /monthly_2023_12/image.png.50646a67bb485e7ceb72d51be64e03f1.png" />

    Link to comment
    Share on other sites

    6 minutes ago, Neo Andersson said:

    Please login or register to see this link.

    Please login or register to see this image.

    /monthly_2023_12/image.png.56c02ccbc6cc67cd5e869f213c66acc2.png" />

    Link to comment
    Share on other sites

  • Topic Author
  • Now it barfs on the config.json file - the json format is not correct - you cant't end with a ',' after "fibemuvar":true,

    json is more strict than Lua...

     

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