-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from riclolsen/master
Project IDX
- Loading branch information
Showing
10 changed files
with
2,010 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Project IDX Setup | ||
|
||
Start a free instance for dev/test on Google's Project IDX platform with just a Google account. | ||
|
||
1. Access the Project IDX platform, click on the "Get Started" button. Connect your Google account if asked. | ||
|
||
[https://idx.dev](https://idx.dev) | ||
|
||
2. Create a new Workspace importing a GitHub repository. | ||
|
||
* URL: https://github.com/riclolsen/json-scada | ||
* Name: json-scada | ||
|
||
Alternatively, you can fork the repo on Github and import it from there. | ||
|
||
3. Wait for the workspace to be imported and built. This will take a while, do not click the recover button. When started, some terminals will open to initialize and build the project. Wait until all the tasks are finished and the workspace is ready. This will take some minutes. | ||
|
||
4. Click the Project IDX button on left sidebar and select "Backend Ports". Click the "Open New Window" action for port 8080. This will give access to the web UI for the project. Login with admin/jsonscada credentials. | ||
|
||
5. On the VSCode's terminal, control JSON-SCADA processes with the "supervisorctl" command. | ||
|
||
```bash | ||
supervisorctl status | ||
supervisorctl start all | ||
supervisorctl stop all | ||
supervisorctl restart all | ||
supervisorctl stop iec104client | ||
supervisorctl start iec104client | ||
supervisorctl tail -f iec104client | ||
``` | ||
|
||
Open the Gemini chat with Ctrl+Shift+Space. | ||
|
||
Notice that the provided free VM is a constrained environment with limited resources: 8GB RAM, 1-core CPUs, 10GB Disk. | ||
|
||
More info for Project IDX [here](https://developers.google.com/idx). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
#!/bin/bash | ||
|
||
# Required tools: | ||
# Dotnet SDK 8.0+ | ||
# Golang 1.21+ | ||
# Node.js 20+ | ||
|
||
# call with argument linux-arm64 for ARM architecture | ||
|
||
ARG1=${1:-linux-x64} | ||
|
||
cd .. | ||
mkdir bin | ||
mkdir bin-wine | ||
|
||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
|
||
# Dnp3Client is Windows-only (must run under Wine on Linux) | ||
#cp src/dnp3/Dnp3Client/Dependencies/OpenSSL/*.dll bin-wine/ | ||
#cd src/dnp3/Dnp3Client | ||
#dotnet publish --self-contained --runtime win-x64 -p:PublishReadyToRun=true -c Release -o ../../../bin-wine/ Dnp3Client.csproj | ||
|
||
cd src/libiec61850 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
cp src/libiec61850.so src/libiec61850.so.1.6.0 ../../../bin/ | ||
cd ../dotnet/core/2.0/IEC61850.NET.core.2.0 | ||
dotnet publish --no-self-contained --runtime $ARG1 -c Release | ||
cd ../../../../../iec61850_client | ||
dotnet publish --no-self-contained --runtime $ARG1 -p:PublishReadyToRun=true -c Release -o ../../bin/ | ||
|
||
cd ../lib60870.netcore | ||
dotnet publish --no-self-contained --runtime $ARG1 -p:PublishReadyToRun=true -c Release -o ../../bin/ | ||
|
||
cd ../OPC-UA-Client | ||
dotnet restore | ||
dotnet publish --no-self-contained --runtime $ARG1 -p:PublishReadyToRun=true -c Release -o ../../bin/ | ||
|
||
#cd ../opcdaaehda-client-solution-net | ||
#dotnet build -f net8.0-windows DaAeHdaNetStandard.sln | ||
|
||
#cd ../OPC-DA-Client | ||
#dotnet restore | ||
#dotnet publish --no-self-contained --runtime win-x64 -p:PublishReadyToRun=true -f net8.0-windows -c Release -o ../../bin-wine/ OPC-DA-Client.csproj | ||
|
||
export GOBIN=~/json-scada/bin | ||
go env -w GO111MODULE=auto | ||
|
||
cd ../calculations | ||
go mod tidy | ||
go build | ||
cp calculations ../../bin/ | ||
|
||
#cd ../i104m | ||
#go mod tidy | ||
#go build | ||
#cp i104m ../../bin/ | ||
|
||
cd ../plc4x-client | ||
go mod tidy | ||
go build | ||
cp plc4x-client ../../bin/ | ||
|
||
# release some disk space | ||
rm -rf ~/.cache | ||
rm -rf ~/.nuget | ||
|
||
cd ../cs_data_processor | ||
npm install | ||
cd ../cs_custom_processor | ||
npm install | ||
cd ../grafana_alert2event | ||
npm install | ||
cd ../demo_simul | ||
npm install | ||
cd ../server_realtime_auth | ||
npm install | ||
cd ../updateUser | ||
npm install | ||
cd ../oshmi2json | ||
npm install | ||
cd ../oshmi_sync | ||
npm install | ||
cd ../shell-api | ||
npm install | ||
cd ../alarm_beep | ||
npm install | ||
cd ../telegraf-listener | ||
npm install | ||
cd ../mqtt-sparkplug | ||
npm install | ||
cd ../OPC-UA-Server | ||
npm install | ||
cd ../carbone-reports | ||
npm install | ||
cd ../backup-mongo | ||
npm install | ||
cd ../mongofw | ||
npm install | ||
cd ../mongowr | ||
npm install | ||
|
||
cd ../AdminUI | ||
npm install | ||
npm run build | ||
rm -rf ~/json-scada/src/AdminUI/node_modules | ||
|
||
#cd ../log-io/ui | ||
#npm install | ||
#npm run build | ||
#cd ../server | ||
#npm install | ||
#npm run build | ||
#cd ../inputs/file | ||
#npm install | ||
#npm run build | ||
|
||
export NODE_OPTIONS=--max-old-space-size=10000 | ||
|
||
cd ../custom-developments/basic_bargraph | ||
npm install | ||
npm run build | ||
|
||
# release some disk space | ||
rm -rf ~/json-scada/src/custom-developments/basic_bargraph/node_modules | ||
|
||
cd ../../custom-developments/advanced_dashboard | ||
npm install | ||
npm run build | ||
|
||
# release some disk space | ||
rm -rf ~/json-scada/src/custom-developments/advanced_dashboard/node_modules | ||
|
||
cd ../../custom-developments/transformer_with_command | ||
npm install | ||
npm run build | ||
|
||
# release some disk space | ||
rm -rf ~/json-scada/src/custom-developments/transformer_with_commands/node_modules | ||
|
||
cd ~/json-scada/platform-nix-idx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"_id":{"$oid":"5ff3512268d80d68205b403f"},"protocolDriver":"OPC-UA","protocolDriverInstanceNumber":1,"protocolConnectionNumber":1003,"name":"OPCClient1","description":"OPC Client 1","enabled":true,"commandsEnabled":true,"endpointURLs":["opc.tcp://opcua.demo-this.com:51210/UA/SampleServer"],"configFileName":"/home/user/json-scada/conf/Opc.Ua.DefaultClient.Config.xml","autoCreateTags":true,"useSecurity":false,"stats":null} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.