Virtual Demo
LOCAL deployment with docker & docker-compose
To deploy locally LOM2M + node-red for the demo, you can use the provided local docker-compose file.
-
clone LOM2M (the demo is included since release 0.10.0)
-
go to the
lom2m
repository -
run the docker compose:
docker-compose -f LOM2M-compose-local-build.yml up --build -d
This will start:
- Eclipse OM2M IN CSE
- LOM2M MN CSE (port 8282)
- Monitor (disabled by default, it enables an HTTP endpoint to test subscriptions, port 1400)
- Node-RED (includes the LOM2M nodes + flows, port 1880)
- oneM2M Device simulator (port 9090)
oneM2M Device Simulator
The device simulator provided by oneM2M: Github link.
If you need to change the configuration of the Device simulator you can change it directly in the docker/oneM2M-device-simulator/default.json
file.
N.B.: by default the device simulator uses as originator Cae-
+ <device-name>
. If needed, be sure to update the ACP Admin to authorize all
originator.
By default in the demo, this is pre-configured.
Once the simulator is started, go to the webpage (default is http://127.0.0.1:9090
) in order to create the simulated objects:
The default configuration is shown on the Figure. You need to add the indicated devices, but you can add other devices in the simulator easily. If you want to integrate them in the DEMO, you will have to update the Node-RED flow(s).
Node-RED
You can use the provided flows (found in src/node-red/flows-examples
). The dashboard-virtual-demo.json
contains flows to deploy the virtual demo dashboard.
Be default, if you use the docker deployment, LOM2M node-red nodes + provided flows will be installed in the node-red deployment.
N.B.: you may need to adjust the IP address of the CSE depending if it is running on the same machine or not. If everything is running on the same machine, you can use the docker-compose service name as an IP, e.g. for the CSE you can use lom2m-mn-cse:8282
as point of access (this is configured by default in the node-red flows).
When everything is started, you should find the node-RED dashboard on http://127.0.0.1:1880.
The Dashboard should be here: http://127.0.0.1:1880/ui
WARNING: If you update the demonstration and want to persist all the change, you should EXPORT ALL flows and update the flows.json file in the LOM2M src repository. (and commit it to the repository). If not, at restart / rebuild of the docker image(s), the flows could be lost.