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

Version 0.47-alpha #199

Merged
merged 5 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
- MongoDB as the real-time core database, persistence layer, config store, SOE historian.
- Event-based realtime async data processing with MongoDB Change Streams.
- Portability and modular interoperability over Linux, Windows, Mac OSX, x86/64, ARM.
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha).
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha).
- Unlimited tags, servers, and users.
- Horizontal scalability, from a single computer to big clusters (MongoDB-sharding), Docker containers, VMs, Kubernetes, cloud, or hybrid deployments.
- Modular distributed architecture. Lightweight redundant data acquisition nodes can connect securely over TLS to the database server. E.g. a Raspberry PI can be a data acquisition node.
Expand Down Expand Up @@ -90,7 +90,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
## Documentation

- [Generic Install Guide](https://github.com/riclolsen/json-scada/blob/master/docs/install.md)
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha)
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha)
- [RedHat/Rocky Linux Installer Script](https://github.com/riclolsen/json-scada/blob/master/docs/install.md#rhel94-and-compatible-systems-automated-installation)
- [Ubuntu Linux Installer Script](https://github.com/riclolsen/json-scada/blob/master/docs/install.md#ubuntu-2404-scripted-installation)
- [Generic Install Guide](https://github.com/riclolsen/json-scada/blob/master/docs/install.md)
Expand Down
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
- MongoDB as the real-time core database, persistence layer, config store, SOE historian.
- Event-based realtime async data processing with MongoDB Change Streams.
- Portability and modular interoperability over Linux, Windows, Mac OSX, x86/64, ARM.
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha).
- Windows installer available in the [releases section](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha).
- Unlimited tags, servers, and users.
- Horizontal scalability, from a single computer to big clusters (MongoDB-sharding), Docker containers, VMs, Kubernetes, cloud, or hybrid deployments.
- Modular distributed architecture. Lightweight redundant data acquisition nodes can connect securely over TLS to the database server. E.g. a Raspberry PI can be a data acquisition node.
Expand Down Expand Up @@ -90,7 +90,7 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
## Documentation

- [Generic Install Guide](docs/install.md)
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.46-alpha)
- [Windows Installer](https://github.com/riclolsen/json-scada/releases/tag/V0.47-alpha)
- [RedHat/Rocky Linux Installer Script](docs/install.md#rhel94-and-compatible-systems-automated-installation)
- [Ubuntu Linux Installer Script](docs/install.md#ubuntu-2404-scripted-installation)
- [Generic Install Guide](docs/install.md)
Expand Down
37 changes: 19 additions & 18 deletions platform-windows/json-scada.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RequestExecutionLevel admin

;--------------------------------

!define VERSION "v.0.46"
!define VERSION_ "0.46.0.0"
!define VERSION "v.0.47"
!define VERSION_ "0.47.0.0"

Function .onInit
System::Call 'keexrnel32::CreateMutexA(p0, i1, t "MutexJsonScadaInstall")?e'
Expand Down Expand Up @@ -509,22 +509,23 @@ SetRegView 64
CreateDirectory "$DESKTOP\JSON-SCADA"

; App shortcuts
CreateShortCut "$DESKTOP\JSON-SCADA\_Start_Services.lnk" "$INSTDIR\platform-windows\start_services.bat"
CreateShortCut "$DESKTOP\JSON-SCADA\_Stop_Services.lnk" "$INSTDIR\platform-windows\stop_services.bat"
CreateShortCut "$DESKTOP\JSON-SCADA\Windows Services.lnk" "services.msc"
CreateShortCut "$DESKTOP\JSON-SCADA\_JSON SCADA WEB.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVINDEX $NAVPOSOPT" "$INSTDIR\src\htdocs\images\j-s-256.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Chromium Browser.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT $NAVPOSOPT"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Display.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTEL $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tela.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Events.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISEVE $NAVPOSOPT" "$INSTDIR\src\htdocs\images\chrono.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Historical.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISHEV $NAVPOSOPT" "$INSTDIR\src\htdocs\images\calendar.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Tabular.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTAB $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tabular.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Alarms.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISANO $NAVPOSOPT" "$INSTDIR\src\htdocs\images\firstaid.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Grafana.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVGRAFAN $NAVPOSOPT" "$INSTDIR\src\htdocs\images\grafana.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Metabase.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVMETABA $NAVPOSOPT" "$INSTDIR\src\htdocs\images\metabase.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Excel Config Spreadsheet.lnk" "$INSTDIR\conf\json-scada-config.xlsm"
CreateShortCut "$DESKTOP\JSON-SCADA\Compass (Mongodb GUI Client).lnk" "$INSTDIR\platform-windows\mongodb-compass-runtime\MongoDBCompass.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\Inkscape SAGE (SVG Editor).lnk" "$INSTDIR\platform-windows\inkscape-runtime\bin\inkscape.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\Uninstall.lnk" "$INSTDIR\bt-uninst.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\_Start_Services.lnk" "$INSTDIR\platform-windows\start_services.bat"
CreateShortCut "$DESKTOP\JSON-SCADA\_Stop_Services.lnk" "$INSTDIR\platform-windows\stop_services.bat"
CreateShortCut "$DESKTOP\JSON-SCADA\Windows Services.lnk" "services.msc"
CreateShortCut "$DESKTOP\JSON-SCADA\_JSON SCADA WEB.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVINDEX $NAVPOSOPT" "$INSTDIR\src\htdocs\images\j-s-256.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Chromium Browser.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT $NAVPOSOPT"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Display.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTEL $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tela.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Events.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISEVE $NAVPOSOPT" "$INSTDIR\src\htdocs\images\chrono.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Historical.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISHEV $NAVPOSOPT" "$INSTDIR\src\htdocs\images\calendar.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Tabular.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISTAB $NAVPOSOPT" "$INSTDIR\src\htdocs\images\tabular.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Alarms.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVVISANO $NAVPOSOPT" "$INSTDIR\src\htdocs\images\firstaid.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Grafana.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVGRAFAN $NAVPOSOPT" "$INSTDIR\src\htdocs\images\grafana.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Viewer - Metabase.lnk" "$INSTDIR\$NAVWINCMD" " $NAVDATDIR $NAVPREOPT --app=$HTTPSRV$NAVMETABA $NAVPOSOPT" "$INSTDIR\src\htdocs\images\metabase.ico"
CreateShortCut "$DESKTOP\JSON-SCADA\Excel Config Spreadsheet.lnk" "$INSTDIR\conf\json-scada-config.xlsm"
CreateShortCut "$DESKTOP\JSON-SCADA\Compass (Mongodb GUI Client).lnk" "$INSTDIR\platform-windows\mongodb-compass-runtime\MongoDBCompass.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\pgAdmin4 (Postgres GUI Client).lnk" "$INSTDIR\platform-windows\postgresql-runtime\pgAdmin 4\runtime\pgAdmin4.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\Inkscape SAGE (SVG Editor).lnk" "$INSTDIR\platform-windows\inkscape-runtime\bin\inkscape.exe"
CreateShortCut "$DESKTOP\JSON-SCADA\Uninstall.lnk" "$INSTDIR\bt-uninst.exe"


; clear chromium cache
Expand Down
7 changes: 6 additions & 1 deletion platform-windows/mongodb-conf/mongod.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
net:
bindIp: 0.0.0.0
bindIp: 127.0.0.1 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses
port: 27017

# ssl:
# mode: requireSSL
# PEMKeyFile: c:\json-scada\conf\mongodb.pem
# CAFile: c:\json-scada\conf\rootCa.pem

# Where and how to store data. Add more memory if you have more than 4GB of RAM.
storage:
dbPath: c:\json-scada\platform-windows\mongodb-data
wiredTiger:
engineConfig:
cacheSizeGB: 1.5

# REPLICA IS REQUIRED FOR JSON-SCADA
replication:
Expand Down
25 changes: 25 additions & 0 deletions platform-windows/release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,31 @@ Inkscape+SAGE:

-------------------------------------------------------------------

Notes for version 0.47:

* cs_data_processor: fixes and improvements.
* PostgreSQL updated to 17.2.
* TimescaleDB updated to 2.17.2.

To quickly run the system after installed, open the JSON-SCADA desktop folder and:

* On the JSON-SCADA desktop folder: execute "_Start_Services".
* On the JSON-SCADA desktop folder: execute "_JSON SCADA WEB".
* Default login credentials: username=admin password=jsonscada.
* Metabase credentials: [email protected] password=jsonscada123.

Requirements and recommendations:

* Windows 10/11 64 bits or Server >=2019, Windows PowerShell. At least 20GB of free space in the "C:" drive.
* Administrative rights. Corporate Windows policies may cause problems with the creation of services and the opening of TCP ports.
* Free TCP ports 6688, 6689, 27017, 5432, 80, 8080, 3000, 3001, 9000. Other ports may be required for optional services and protocols.
* If the server already has MongoDB, PostgreSQL, Grafana, Metabase, Nginx or another webserver, please uninstall, disable or watch out for possible conflicts.
* Do not update previously installed JSON-SCADA. Please uninstall previous JSON-SCADA versions before installing a new version.
* If using VirtualBox configure "paravirtualization interface"=KVM, otherwise Nodejs errors may occur.
* MongoDB requires AVX instructions on x86 CPU.

-------------------------------------------------------------------

Notes for version 0.46:

* NPM packages updated.
Expand Down
4 changes: 2 additions & 2 deletions src/AdminUI/public/config_viewers_default.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ var TabularViewer_Font = 'Segoe UI,Source Sans Pro,calibri,consolas,arial,helvet

var TabularViewer_GridColor = '#BBBBBB'; // table grid color

var TabularViewer_AlmTxtColor = 'rgb(37, 132, 211)'; // alarmed color
var TabularViewer_AlmTxtColor = 'rgb(164, 128, 206)'; // alarmed color
var TabularViewer_FailTxtColor = '#AAAAAA'; // failed value color
var TabularViewer_AckTxtColor = 'rgb(17, 91, 151)'; // acknowledged alarm color
var TabularViewer_AckTxtColor = 'rgb(40, 130, 136)'; // acknowledged alarm color

var TabularViewer_RefreshTime = 3; // refresh time (seconds)

Expand Down
2 changes: 1 addition & 1 deletion src/AdminUI/public/i18n/messages_i18n-en_us.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: '{json:scada}',
VersaoProduto: '0.46',
VersaoProduto: '0.47',

NomeVisorTelas: 'Display Viewer',
NomeVisorEventos: 'Events Viewer',
Expand Down
2 changes: 1 addition & 1 deletion src/AdminUI/public/i18n/messages_i18n-pt_br.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: '{json:scada}',
VersaoProduto: '0.46',
VersaoProduto: '0.47',

NomeVisorTelas: 'Visor de Telas',
NomeVisorEventos: 'Visor de Eventos',
Expand Down
2 changes: 1 addition & 1 deletion src/AdminUI/public/i18n/messages_i18n-uk_ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: '{json:scada}',
VersaoProduto: '0.46',
VersaoProduto: '0.47',

NomeVisorTelas: 'Перегляд ',
NomeVisorEventos: 'Події',
Expand Down
2 changes: 1 addition & 1 deletion src/AdminUI/public/i18n/messages_i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var Msg =
{
NomeProduto: '{json:scada}',
VersaoProduto: '0.46',
VersaoProduto: '0.47',

NomeVisorTelas: 'Display Viewer',
NomeVisorEventos: 'Events Viewer',
Expand Down
25 changes: 25 additions & 0 deletions src/AdminUI/public/release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,31 @@ Inkscape+SAGE:

-------------------------------------------------------------------

Notes for version 0.47:

* cs_data_processor: fixes and improvements.
* PostgreSQL updated to 17.2.
* TimescaleDB updated to 2.17.2.

To quickly run the system after installed, open the JSON-SCADA desktop folder and:

* On the JSON-SCADA desktop folder: execute "_Start_Services".
* On the JSON-SCADA desktop folder: execute "_JSON SCADA WEB".
* Default login credentials: username=admin password=jsonscada.
* Metabase credentials: [email protected] password=jsonscada123.

Requirements and recommendations:

* Windows 10/11 64 bits or Server >=2019, Windows PowerShell. At least 20GB of free space in the "C:" drive.
* Administrative rights. Corporate Windows policies may cause problems with the creation of services and the opening of TCP ports.
* Free TCP ports 6688, 6689, 27017, 5432, 80, 8080, 3000, 3001, 9000. Other ports may be required for optional services and protocols.
* If the server already has MongoDB, PostgreSQL, Grafana, Metabase, Nginx or another webserver, please uninstall, disable or watch out for possible conflicts.
* Do not update previously installed JSON-SCADA. Please uninstall previous JSON-SCADA versions before installing a new version.
* If using VirtualBox configure "paravirtualization interface"=KVM, otherwise Nodejs errors may occur.
* MongoDB requires AVX instructions on x86 CPU.

-------------------------------------------------------------------

Notes for version 0.46:

* NPM packages updated.
Expand Down
2 changes: 1 addition & 1 deletion src/AdminUI/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
import { useRouter } from 'vue-router'
import { STORAGE_KEY } from './i18n'

const version = ref('v0.46-alpha')
const version = ref('v0.47-alpha')
const router = useRouter()
const theme = ref('dark')
const vuetifyTheme = useTheme()
Expand Down
24 changes: 16 additions & 8 deletions src/cs_data_processor/cs_data_processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,21 @@ const pipeline = [
b2 = '0', // reserved
b1 = '0', // reserved
b0 = '0' // reserved
let vj =
valueJson === ''
? '""'
: valueJson.trim().replaceAll("'", "''")
let trimS = ''
if (vj.length > 0) {
if (vj.charAt(0) === '{' || vj.charAt(0) === '[')
trimS = '"'
else if (isNaN(vj) && vj.charAt(0) !== '"')
vj = '"' + vj + '"'
}
const vs =
valueString === ''
? ''
: valueString.replaceAll("'", "''")
sqlHistQueue.enqueue({
sql:
"'" +
Expand All @@ -1103,14 +1118,7 @@ const pipeline = [
change.updateDescription.updatedFields.sourceDataUpdate.timeTag.toISOString() +
"'," +
value +
',to_json(' +
"'{" +
'"v": ' +
JSON.stringify(valueJson).replaceAll("'", "''") +
',' +
'"s": "' +
valueString.replaceAll("'", "''") +
'"}\'::text),' +
`,('{"v":'||trim('${trimS}' FROM to_json('${vj}'::text)::jsonb #>> '{}')||',"s":'||to_json('${vs}'::text)||'}'::text)::jsonb,` +
(update.timeTagAtSource !== null
? "'" +
change.updateDescription.updatedFields.sourceDataUpdate.timeTagAtSource.toISOString() +
Expand Down
Loading