Using Edge to connect your data
You can use our Edge to connect your network and data stream to Wizata, it contains pre-defined connectors for various protocols.
Install the Edge
To start you need to install and configure an edge device, it can be deployed on-premises or in the cloud, you can also deployed multiple edge device to suit your architectural needs. A single edge device can be connected to one or multiple data sources. See Edge overview and installation
Consumers & Writers
The edge is configured by defining where data are read (consumers) and where it is send back (writers).
By default, the edge is capable to:
- write data to its local time-series database and to the cloud platform.
- read data as results of its internal AI/ML Pipeline Engine.
Configuration of consumers, writers as well as the triggers are defined as a JSON structure and synchronised from cloud to edge regularly.
Additional consumers and writers could be configured to add new source and destination for the data flow.
Rabbit MQ - Consumer
You can configure the message client to pull data from an external Rabbit MQ queue.
- id can be anything but unique on consumers list and type must be rabbitmq
- Configure your connection to Rabbit MQ:
- RQ_HOST - defines your server domain name
- RQ_PORT - defines the port to use
- RQ_USER / RQ_PASS - defines the user name and password
- RQ_TLS - optional if you want don't use SSL or a different version than TLS 1.2
- RQ_VHOST - virtual host name
- queue - defines the queue to use, if multiple you need to create different consumers.
- function - if necessary use a custom python function to convert your data to Wizata message format (see Connect your data to Wizata to understand the supported format).
Here's a sample consumer configuration for Rabbit MQ:
{
"id": "a-unique-id",
"type": "rabbitmq",
"RQ_HOST": "server.domain.name",
"RQ_PORT": 5672,
"RQ_USER": "your-user",
"RQ_PASS": "xxxxxxxxx",
"RQ_TLS": "v1_1",
"RQ_VHOST": "vhost",
"queue": "your-queue",
"function": {
"filepath": "functions/sample_t.py",
"function_name": "sample_t"
}
}
Troubleshoot note
RQ_PORT number may vary depending on your installation process.
Custom Function
A custom function can be used to transform your data to Wizata message format.
- e.g. if your data looks like :
{'t': 1728920878.798966, 'f': 0.6591128532976067, 'h': 'rq-custom-tag-01'}
{'t': 1728920883.817512, 'f': 0.6972545363650098, 'h': 'rq-custom-tag-01'}
{'t': 1728920888.83555, 'f': 0.6168179285479277, 'h': 'rq-custom-tag-01'}
{'t': 1728920893.85878, 'f': 0.5139981833045464, 'h': 'rq-custom-tag-01'}
- you can use the following code :
def sample_t(payload: dict) -> list:
from datetime import datetime, timezone
message = {
"Timestamp": datetime.fromtimestamp(payload["t"], tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.%f") + "+00:00",
"HardwareId": payload["h"],
"SensorValue": float(payload["f"])
}
return [message]
Important
The function must have one and only parameter as a dict corresponding to the message received and must returns a list of message. Each message being a dict.
Updated 18 days ago