Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Latest commit

 

History

History

node-red

Flow for node-red dashboard

NOTE: This example is deprecated and will reach End-of-Life 2024-12-31!

This example uses node-red but an installation is not required at your machine, as we are using Docker. You can import the json file to receive data from kuksa-val-server. Then you can use the node-red dashboard feature to view data.

Dependencies

Node-red extensions

The following node red extensions are used in the example flows:

Installation

To test the node-red examples, you need node-red and kuksa.val server.

Since we provide docker images to simplify the setup process. You can install the docker at first:

sudo apt install docker.io

Then load kuksa.val docker images:

docker pull ghcr.io/eclipse/kuksa.val/kuksa-val:master

After that, just start all needed container using docker-compose.yml:

sudo apt install docker-compose
docker-compose up -d

-d for detach.

Note: You need to be in this directory to be able to start the docker-compose.yml to use docker-compose to start all docker containers or shut down all docker containers:

docker-compose down

Note: At first start, you may need to install the node red extensions under the palette manager.

By default, the mqtt flows will be configured in node-red. You can also use the import feature inside node-red to try the websocket example below.

Now you can view the example under http://localhost:1880.

To test the example, you can use Kuksa Python SDK Client or use the gps feeder. In feeders.yml, you can find the experimental config for gps feeder container. You use the following command to also start containers of feeders:

docker-compose -f docker-compose.yml  -f feeders.yml up

MQTT

mqtt/flows.json subscribes some mqtt topics, which will be published by kuksa-val-server

Note: Do not forget to config your kuksa-val-server to publish the needed topics using the option --mqtt.publish, if you do not use docker-compose.yml to start the kuksa-val-server.

Websocket

screenshot

Note: Websocket node-red configs are using url wss://127.0.0.1:8090 if docker-compose used for running demo 127.0.0.1 is not available by docker container and in the flow dashboard state will be "disconnected". Compose is creating network between containers so check ip address of kuksa-val container and change websocket node accordingly.