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

New applications added for IOT2050-SM #511

Merged
merged 23 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9add98a
Add Extended IO manager
BaochengSu Jan 2, 2024
eb767d2
iot2050-eio-manager: Add support for EIOFS
BaochengSu Jan 2, 2024
9b8f2dc
iot2050-eio-manager: Sync time to extended IO controller
BaochengSu Jan 2, 2024
e044a44
iot2050-eio-manager: Add EIO cli
BaochengSu Jan 2, 2024
d1387c1
iot2050-eio-manager: Add module configuration
BaochengSu Jan 2, 2024
1a4a4bf
iot2050-eio-manager: Add support for SM1223-AC/RLY module
BaochengSu Jan 2, 2024
7d1d58d
iot2050-eio-manager: Add support for SM1231-AI module
BaochengSu Jan 2, 2024
a1b7a85
iot2050-eio-manager: Add support for SM1231-RTD modules
BaochengSu Jan 2, 2024
c8b9871
iot2050-eio-manager: Add support for SM1238 Energy Meter 480VAC module
BaochengSu Jan 2, 2024
8ddc71e
iot2050-eio-manager: Add firmware update for extended IO controller
BaochengSu Jan 2, 2024
9dc57d2
iot2050-eio-manager: Add FWU monitoring service
BaochengSu Jan 2, 2024
92f5613
iot2050-eio-manager: Implement ReadEIOEvent interface
BaochengSu Jan 2, 2024
0840430
iot2050-eio-manager: Add error message if EIO binaries are not present
BaochengSu Jan 22, 2024
0638e4b
Add iot2050 configration web application
BaochengSu Jan 2, 2024
aeeb1db
iot2050-conf-webui: Implement configuration file loading and exporting
BaochengSu Jan 2, 2024
0868e2c
iot2050-conf-webui: Implement deploy to/retrieve from IOT2050 SM
BaochengSu Jan 2, 2024
e8ff517
iot2050-conf-webui: Add support for SM1223-AC/RLY module
BaochengSu Jan 2, 2024
e2e2b9d
iot2050-conf-webui: Add support for SM1231-RTD modules
BaochengSu Jan 2, 2024
9ae77a4
iot2050-conf-webui: Add support for SM1231-AI module
BaochengSu Jan 2, 2024
a882086
iot2050-conf-webui: Add support for SM1238 Energy Meter 480VAC module
BaochengSu Jan 2, 2024
a6d385d
ci: Folder RT image to SWU image
BaochengSu Jan 30, 2024
c07b35b
ci: Add EIO subsystem to SWU image
BaochengSu Jan 30, 2024
9f93d48
Add event record service
huaqianli Oct 23, 2023
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
27 changes: 7 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,6 @@ jobs:
build/tmp/deploy/images/iot2050/iot2050-image-example-iot2050-debian-iot2050.wic
build/tmp/deploy/images/iot2050/iot2050-image-example-iot2050-debian-iot2050.wic.bmap

debian-rt-example-image:
name: Debian RT example image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Free Disk Space
uses: ./.github/workflows/free-disk-space
- name: Build image
run: ./kas-container build kas-iot2050-example.yml:kas/opt/preempt-rt.yml
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: iot2050-example-image-rt
path: |
build/tmp/deploy/images/iot2050/iot2050-image-example-iot2050-debian-iot2050.wic
build/tmp/deploy/images/iot2050/iot2050-image-example-iot2050-debian-iot2050.wic.bmap

debian-swupdate-image:
name: Debian secure boot SWUpdate image
runs-on: ubuntu-latest
Expand All @@ -51,12 +33,17 @@ jobs:
uses: actions/checkout@v3
- name: Free Disk Space
uses: ./.github/workflows/free-disk-space
- name: Mock EIO binary stubs
run: |
touch ./recipes-app/iot2050-eio-manager/files/bin/iot2050-eiofsd
touch ./recipes-app/iot2050-eio-manager/files/bin/map3-fw.bin
touch ./recipes-app/iot2050-eio-manager/files/bin/firmware-version
- name: Build image
run: ./kas-container build kas-iot2050-swupdate.yml:kas/opt/secure-boot.yml
run: ./kas-container build kas-iot2050-swupdate.yml:kas/opt/secure-boot.yml:kas/opt/preempt-rt.yml:kas/opt/eio.yml
- name: Upload image
uses: actions/upload-artifact@v3
with:
name: iot2050-swupdate-image
name: iot2050-secureboot-swu-image
path: |
build/tmp/deploy/images/iot2050/iot2050-image-swu-example-iot2050-debian-iot2050.wic
build/tmp/deploy/images/iot2050/iot2050-image-swu-example-iot2050-debian-iot2050.wic.bmap
Expand Down
13 changes: 13 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ config KAS_INCLUDE_LXDE
default "kas/opt/lxde.yml"
depends on LXDE

config EIO
bool "EIO subsystem support"
help
jan-kiszka marked this conversation as resolved.
Show resolved Hide resolved
Building image with EIO subsystem support.

NOTE: The EIO firmware and library need be downloaded before building. See
the README.md for more information.

config KAS_INCLUDE_EIO
string
default "kas/opt/eio.yml"
depends on EIO

endif

# Provide two entries so that the help text can be adjusted to the image.
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ After the build completed, the final image is under
build/tmp/deploy/images/iot2050/iot2050-image-example-iot2050-debian-iot2050.wic
```

### Build with EIO subsystem support

To build the example image with EIO subsystem, for example when building for
IOT2050 SM variant, the EIO firmware & binaries must be downloaded from
[Siemens Industry Online Support](https://support.industry.siemens.com/cs/document/109741799/downloads-for-simatic-iot20x0?dti=0&lc=en-WW)
and extracted to `recipes-app/iot2050-eio-manager/files/bin` before the building.

Then build with

```shell
./kas-container build kas-iot2050-example.yml:kas/opt/eio.yml
```
(or select `EIO subsystem support` in `kas menu`)


## Build user SDK
>>>
**Note:** Current SDK only supports Linux x86-64 host machine
Expand Down
16 changes: 16 additions & 0 deletions kas/opt/eio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) Siemens AG, 2023
#
# Authors:
# Baocheng Su <[email protected]>
#
# This file is subject to the terms and conditions of the MIT License. See
# COPYING.MIT file in the top-level directory.
#

header:
version: 14

local_conf_header:
no-eio: |
IOT2050_EIO_SUPPORT = "1"
47 changes: 47 additions & 0 deletions recipes-app/iot2050-conf-webui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# IOT2050 Conf WEBUI

This is the IOT2050 configuration webUI, it is used to setup the device and it's
extension modules.
jan-kiszka marked this conversation as resolved.
Show resolved Hide resolved

Currently it only supports IOT2050 SM variant.

This exposes a http service on the 2050 port from the IOT2050 device, please use
`http://<IP_TO_IOT>:2050` to access it.

The web server is managed by the `iot2050-conf-webui.service` systemd service,
thus the `systemctl` command could be used to start/stop or enable/disable this
web server.

Supported browser: Firefox, Chrome, Edge, etc. IE is not supported.

## Development

This application is using Next.JS + Material UI.

There are two `npm-shrinkwrap.json` files:

- `npm-shrinkwrap.json`
- `npm-shrinkwrap.json.nodev`
jan-kiszka marked this conversation as resolved.
Show resolved Hide resolved

The later one removes all the `devDependencies`, it is only for packaging
purpose, due to some npm packaging issue, the `devDependencies` must be removed
from the package.json.

If any new dependency package is added, make sure to generate both these files.

Install dependencies and run via `npm`:

```shell
# install dependencies
npm install

# run for development
npm run dev -- -p 2050

# run for production
npm run build
npm run start -- -p 2050
```

Open [http://localhost:2050](http://localhost:2050) with your browser to see the
result.
15 changes: 15 additions & 0 deletions recipes-app/iot2050-conf-webui/files/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
env:
browser: true
es2021: true
node: true
extends:
- standard
- plugin:react/recommended
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
rules: {
semi: [2, "always"]
}
12 changes: 12 additions & 0 deletions recipes-app/iot2050-conf-webui/files/iot2050-conf-webui.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=IOT2050 Configuration Web UI
After=syslog.target network.target

[Service]
Type=idle
User=root
WorkingDirectory=/srv/iot2050-conf-webui
ExecStart=/usr/bin/npm run start --prefix=/srv/iot2050-conf-webui -- -p 2050

[Install]
WantedBy=multi-user.target
7 changes: 7 additions & 0 deletions recipes-app/iot2050-conf-webui/files/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
35 changes: 35 additions & 0 deletions recipes-app/iot2050-conf-webui/files/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/** @type {import('next').NextConfig} */

const CopyPlugin = require('copy-webpack-plugin');

const nextConfig = {
reactStrictMode: true,
swcMinify: true,
modularizeImports: {
'@mui/icons-material': {
transform: '@mui/icons-material/{{member}}',
},
},
webpack: (config, { isServer }) => {
// Only run in server mode
if (isServer) {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: 'src/lib/gRPC',
to: 'gRPC'
},
{
from: 'src/lib/gRPC',
to: 'app/gRPC'
}
],
})
);
}
return config;
},
};

module.exports = nextConfig;
Loading
Loading