Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use this thing? #6

Open
jacksonlancaster opened this issue Oct 15, 2024 · 11 comments
Open

How do I use this thing? #6

jacksonlancaster opened this issue Oct 15, 2024 · 11 comments

Comments

@jacksonlancaster
Copy link

Seems cool. But how do I use it exactly?

I opened my downloaded project in VS Code, after unzipping it.

Where do I go from here?

@keith-gamble
Copy link
Owner

If you download the extension in the VS Code marketplace first, not the zip,

https://marketplace.visualstudio.com/items?itemName=Keith-gamble.ignition-flint

Then you should able to open your project in a VS Code workspace, and it should attempt to auto-identify the gateway, enabling each of the various features.

@jacksonlancaster
Copy link
Author

Yes I installed the extension via the marketplace.

I was referring to the project backup file that I downloaded from the gateway.
I unzipped it into a folder then opened that folder in VS Code.

Is that the right way?

@GilRomero4
Copy link

I would like to add that I am not sure how to even start using this tool. A more extensive/detailed walkthrough would be greatly appreciated. Perhaps you could give an example use in a video.

@GilRomero4
Copy link

GilRomero4 commented Oct 21, 2024

I think I did not understand the instructions at first, nor did I provide sufficient information in my previous request for help.

I see the "Ignition Project Scripts" workspace, but I when I expand it, I see "No Ignition project scripts found in the current workspace." What steps do I take to set up scripts in this workspace?

I am also receiving the following error when booting VS Code:

Ignition Flint failed to activate: TypeError: Cannot read properties of undefined (reading 'uri')

Note: I have Ignition installed in C:\Program Files\Inductive Automation\Ignition. Does it need to be installed in the AppData\Roaming folder?

I appreciate your assistance. I would love to use this tool as it seems quite powerful.

@acorneliusatqs
Copy link

@GilRomero4 - a few questions for you:

  1. are you using project inheritance, and if so how many levels does it go?
  2. do you have any Sepasoft modules installed, and if so do you have a project called MESGateway?
  3. what version of the module is loading in VSCode?

In my case my answers were Yes/3 and Yes/Yes. When I used version 0.0.28 I did not see any of my projects listed. The 0.0.29 update now shows my projects (I have ~70).

@GilRomero4
Copy link

@acorneliusatqs thanks for the response.

  1. are you using project inheritance, and if so how many levels does it go?

No.

  1. do you have any Sepasoft modules installed, and if so do you have a project called MESGateway?

No.

  1. what version of the module is loading in VSCode?

Version 0.0.29

In my case my answers were Yes/3 and Yes/Yes. When I used version 0.0.28 I did not see any of my projects listed. The 0.0.29 update now shows my projects (I have ~70).

I see no projects listed and receive the error upon starting up VSCode:

Ignition Flint failed to activate: TypeError: Cannot read properties of undefined (reading 'uri')

Do I need to configure the gateway in the settings.json?

{
    "github.copilot.editor.enableAutoCompletions": true,
    "workbench.colorTheme": "Copilot Theme",
    "workbench.activityBar.location": "top",
    "ignitionFlint.ignitionGateways": [
    
    ]
}

@GilRomero4
Copy link

GilRomero4 commented Oct 23, 2024

I am no longer getting this error:

Ignition Flint failed to activate: TypeError: Cannot read properties of undefined (reading 'uri')

But the Ignition Project Scripts view remains empty, as shown in the figure. Any suggestions on how to sync this up with my local project scripts? I tried specifying my gateway on the settings.json file for VSCode, but that did not produce any results.

It is mentioned that this extension "integrates with Kindling". I have opened a Gateway backup on Kindling, but am unsure if any additional steps are needed.

Pls help!

image

@acorneliusatqs
Copy link

acorneliusatqs commented Oct 23, 2024

I do know that the extension is looking for the project.json files that are present in every Ignition project. From there is parses those folders for their content.

In my system I have all of the projects cloned locally to a folder. Your screenshot shows 'No Folder Opened'.
Also on my system I just opened the folder containing my projects. I did not edit my config file.

Also I noticed in the current version that the project scan only happens on startup. There is a refresh button in the Ignition Project Scripts explorer but it's not working for me. V0.0.29.

As for Kindling, I get the impression the extension simply provides right-click capability to launch Kindling for the selected backup. I don't think there's any additional functionality there.

@GilRomero4
Copy link

Thanks @acorneliusatqs . I created a local clone and now the Project Scripts view is showing my project scripts. I am now facing other less significant obstacles, but at least I can experiment with the extension for now.

Thanks for the additional information.

@Jeff-Krol
Copy link

If you download the extension in the VS Code marketplace first, not the zip,

https://marketplace.visualstudio.com/items?itemName=Keith-gamble.ignition-flint

Then you should able to open your project in a VS Code workspace, and it should attempt to auto-identify the gateway, enabling each of the various features.

I just installed this extension today and I'm trying to figure out how to use it. I think I've opened my project correctly (opening a project folder in VSCode located at C:\Program Files\Inductive Automation\Ignition\data\projects). I can see the scripts down in the "Ignition Project Scripts" Explorer view. However, when I try to do something like add a new script module via the Explorer view, I get an error like this:

Screenshot_20241101_124139

I went to the extension settings and opened the settings.json file to try and update "ignitionFlint.ignitionGateways" with localhost:8088 and http://localhost:8088 but neither seemed to do the trick. Am I missing something in the process or do you have any ideas what might be causing this error? The fact that you mentioned auto-identifying the Gateway makes me think that there is either something on my machine preventing this from happening or I've got a PEBKAC error.

Please advise how to resolve/troubleshoot this. I'm very excited about using this extension!

@nburnet1
Copy link

@Jeff-Krol

ignitionFlint.ignitionGateways is a list of objects. The object can be found here.

I had to dig through the code to get the full use of the extension.

This is what I did:

  1. Create a vscode workspace and open it. From there you should see your IGNITION PROJECT SCRIPTS and IGNITION GATEWAYS in your explorer
  2. In your settings, specify your ignitionFlint.ignitionGateways or I believe it can auto create the config if you are using docker compose
  3. If you want automatic rescans while editing you need to make sure the project scan module is installed.
  4. Refresh the IGNITIONS GATEWAYS tab
  5. Everything should work and you should no longer see that error

Example of ignitionFlint.ignitionGateways

    "ignitionFlint.ignitionGateways": [

        {
            "label": "localhost",
            "address": "http://localhost:8088",
            "projectPaths": [
                "/var/ignition-poc/ignition/global"
            ],
            "forceUpdateDesigner": true,
            "updateDesignerOnSave": true,
            "supportsProjectScanEndpoint": true,
        }
    ]

Example of vscode Explorer

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants