Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Officially launched in September, the official version of [EMQX Enterprise](https://www.emqx.com/en/products/emqx) 3.4.0 is released by EMQ. In this version, the management configuration and rule engine functions are enhanced, message encoding and decoding, cluster hot configuration and vehicle networking protocol support are added, and a new management monitoring Dashboard page is designed, and this version is a stable version recommended for enterprise applications.

The relevant installation package is ready for download from [EMQ website](https://www.emqx.com/en/try), and a free self-service application for trial is avaiable from the website.
The relevant installation package is ready for download from [EMQ website](https://www.emqx.com/en/try), and a free self-service application for trial is available from the website.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ data/templates/emqx_backend_influxdb.tmpl

Because MQTT Message cannot be written directly to InfluxDB, EMQX provides the emqx_backend_influxdb.tmpl template file to convert the MQTT Message into a DataPoint that can be written to InfluxDB:

```bash
```json
{
"devices/+/messages": {
"measurement": "devices",
Expand Down
18 changes: 9 additions & 9 deletions en/202005/kuiper-becomes-edgex-rule-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ In out tutorial, we will use [Random Integer Device Service](https://github.com/

Go to [EdgeX develop-scripts project](https://github.com/edgexfoundry/developer-scripts/tree/master/releases), and download related Docker compose file for Geneva release, then bring up EdgeX Docker instances.

```
```sh
$ docker-compose -f ./docker-compose-nexus-redis-no-secty.yml up -d --build
```

After all of the Docker instances are started, you can use `docker ps` command to verify all of services are running correctly.

```
```sh
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5618c93027a9 nexus3.edgexfoundry.org:10004/docker-device-virtual-go:master "/device-virtual --p…" 37 minutes ago Up 37 minutes 0.0.0.0:49990->49990/tcp edgex-device-virtual
Expand Down Expand Up @@ -80,7 +80,7 @@ Notice: Rest API of Kuiper in EdgeX uses `48075` instead of default `9081`. So p

The next step is to create a stream that can consume data from EdgeX message bus. Please change `$kuiper_docker` to Kuiper docker instance IP address.

```
```sh
curl -X POST \
http://$kuiper_docker:48075/streams \
-H 'Content-Type: application/json' \
Expand All @@ -95,13 +95,13 @@ For other Rest APIs, please refer to [this doc](https://github.com/lf-edge/ekuip

Run following command to enter the running Kuiper docker instance.

```
```sh
docker exec -it edgex-kuiper /bin/sh
```

Use following command to create a stream named `demo`.

```
```sh
bin/cli create stream demo'() WITH (FORMAT="JSON", TYPE="edgex")'
```

Expand Down Expand Up @@ -135,7 +135,7 @@ So the below rule will get all of values from `event` topic. The sink result wil

#### Option 1: Use Rest API

```
```sh
curl -X POST \
http://$kuiper_server:48075/rules \
-H 'Content-Type: application/json' \
Expand All @@ -161,7 +161,7 @@ curl -X POST \

You can create a rule file with any text editor, and copy following contents into it. Let's say the file name is `rule.txt`.

```
```json
{
"sql": "SELECT * from demo",
"actions": [
Expand Down Expand Up @@ -212,7 +212,7 @@ time="2020-04-17T06:32:31Z" level=info msg="sink result for rule rule1: [{\"bool

Since all of the analysis result are published to `tcp://broker.emqx.io:1883`, so you can just use below `mosquitto_sub` command to monitor the result. You can also use other [MQTT client tools](https://www.emqx.com/en/blog/mqtt-client-tools).

```
```sh
$ mosquitto_sub -h broker.emqx.io -t result
[{"bool":true}]
[{"bool":false}]
Expand Down Expand Up @@ -273,7 +273,7 @@ Connecting to 127.0.0.1:20498...

In this tutorial, we introduce a very simple use of EdgeX Kuiper rule engine. If having any issues regarding to use of Kuiper rule engine, you can open issues in EdgeX or Kuiper Github respository.

## More Excecise
## More Exercise

Current rule does not filter any data that are sent to Kuiper, so how to filter data? Please [drop rule](https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/cli/rules.md) and change the SQL in previous rule accordingly. After update the rule file, and then deploy the rule again. Please monitor the `result` topic of MQTT broker, and please verify see if the rule works or not.

Expand Down
24 changes: 12 additions & 12 deletions en/202006/control-iot-device-with-kuiper-rules-engine.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

This document describes how to use [Kuiper](https://github.com/lf-edge/ekuiper) rule engine to control devices with anlysis result. To make the tutorial simple, the doc uses [device-virtual](https://github.com/edgexfoundry/device-virtual-go) sample, it analyzes the data sent from device-virtual services, and then control the device according to the analysis result produced by Kuiper rule engine.
This document describes how to use [Kuiper](https://github.com/lf-edge/ekuiper) rule engine to control devices with analysis result. To make the tutorial simple, the doc uses [device-virtual](https://github.com/edgexfoundry/device-virtual-go) sample, it analyzes the data sent from device-virtual services, and then control the device according to the analysis result produced by Kuiper rule engine.

### Scenarios

Expand All @@ -27,7 +27,7 @@ Make sure you have followed document [EdgeX Kuiper Rule Engine Tutorial](https:/

You should create a stream that can consume streaming data from EdgeX application service before creating rule. This step is not required if you already finished [EdgeX Kuiper Rule Engine Tutorial](https://github.com/lf-edge/ekuiper/blob/master/docs/en_US/edgex/edgex_rule_engine_tutorial.md).

```
```sh
curl -X POST \
http://$kuiper_docker:48075/streams \
-H 'Content-Type: application/json' \
Expand All @@ -40,7 +40,7 @@ Since both of rules will send control command to device `Random-UnsignedInteger-

`curl http://localhost:48082/api/v1/device/name/Random-Boolean-Device | jq`, and it prints similar outputs as below.

```
```json
{
"id": "9b051411-ca20-4556-bd3e-7f52475764ff",
"name": "Random-Boolean-Device",
Expand Down Expand Up @@ -100,7 +100,7 @@ From the output, you can know that there are two commands, and the 2nd command i

So a sample control command would be similar as following.

```
```sh
curl -X PUT \
http://edgex-core-command:48082/api/v1/device/c1459444-79bd-46c8-8b37-d6e1418f2a3a/command/fe202437-236d-41c5-845e-3e6013b928cd \
-H 'Content-Type: application/json' \
Expand All @@ -115,7 +115,7 @@ The 1st is a rule that monitoring `Random-UnsignedInteger-Device` device, and if

- The action will be triggered when uint8 value is larger than 20. Since the uint8 value is not used for sending control command to `Random-Boolean-Device`, the `uint8` value is not used in the `dataTemplate` property of `rest` action.

```
```sh
curl -X POST \
http://$kuiper_server:48075/rules \
-H 'Content-Type: application/json' \
Expand All @@ -142,9 +142,9 @@ curl -X POST \

The 2nd rule is monitoring `Random-Integer-Device` device, and if the average value for `int8` with every 20 seconds is larger than 0, then send a command to `Random-Boolean-Device` device service to turn off random generation of bool value.

- The average value for uint8 is caculated every 20 seconds, and if the average value is larger than 0, then send a control command to `Random-Boolean-Device` service.
- The average value for uint8 is calculated every 20 seconds, and if the average value is larger than 0, then send a control command to `Random-Boolean-Device` service.

```
```sh
curl -X POST \
http://$kuiper_server:48075/rules \
-H 'Content-Type: application/json' \
Expand All @@ -169,27 +169,27 @@ curl -X POST \

Now both of rules are created, and you can take a look at logs of edgex-kuiper for the rule execution result.

```
```sh
# docker logs edgex-kuiper
```

## Extract data from analysis result?

It is probably that the analysis result need to be sent to command rest service as well, how to extract the data from analysis result? For example, below SQL is used for filtering data.

```
```sql
SELECT int8, "true" AS randomization FROM demo WHERE uint8 > 20
```

The output of the SQL is probably similar as below,

```
```json
[{"int8":-75, "randomization":"true"}]
```

Let's suppose a service need following data format, while `value` field is read from field `int8`, and `EnableRandomization_Bool` is read from field `randomization`.

```
```sh
curl -X PUT \
http://edgex-core-command:48082/api/v1/device/${deviceId}/command/xyz \
-H 'Content-Type: application/json' \
Expand All @@ -198,7 +198,7 @@ curl -X PUT \

Kuiper uses [Go template](https://golang.org/pkg/text/template/) to extract data from analysis result, and the `dataTemplate` should be similar as following.

```
```json
"dataTemplate": "{\"value\": {{.int8}}, \"EnableRandomization_Bool\": \"{{.randomization}}\"}"
```

Expand Down
2 changes: 1 addition & 1 deletion en/202006/emqx-mqtt-broker-k8s-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ So far, the deployment of a single EMQX Broker node is done. Manage EMQX Broker

## Automatically cluster EMQX MQTT broker through Kubernetes

The article above introduced how to deploy single EMQX Broker Pod through Deployment. It is extremely convenient to expand the number of Pod through Deployment, execute the command `kubectl scale deployment ${deployment_name} --replicas ${numer}` can expand the number of Pod. Expanding EMQX Broker Pod to three is as follows:
The article above introduced how to deploy single EMQX Broker Pod through Deployment. It is extremely convenient to expand the number of Pod through Deployment, execute the command `kubectl scale deployment ${deployment_name} --replicas ${number}` can expand the number of Pod. Expanding EMQX Broker Pod to three is as follows:

```
$ kubectl scale deployment emqx-deployment --replicas 3
Expand Down
2 changes: 1 addition & 1 deletion en/202111/hstreamdb-v-0-6-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Download the latest version: [Docker Hub](https://hub.docker.com/r/hstreamdb/hst

## Quick overview of the new version

### Cluster mode support, and imporvements in horizontal scalability of HServer
### Cluster mode support, and improvements in horizontal scalability of HServer

HStreamDB v0.6 supports cluster mode of HServer. The cluster mode allows quick horizontal expansion, supports node health detection and failure recovery, and improves the fault tolerance and scalability of HStreamDB. Another feature worth mentioning is that HServer supports load balancing. By monitoring the real-time load status of nodes in the cluster, the load balancer will fairly assign the computing tasks to different nodes to realize the efficient use of cluster resources.

Expand Down
2 changes: 1 addition & 1 deletion en/202203/emqx-cloud-launched-value-added-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Internal load balancer is a service that distributes traffic on-demand in the in

The NAT gateway offers network address translation services, which can provide the ability to access public network resources without the need for VPC peer-to-peer connectivity.

> Note: Two features are only avaliable in the professional version.
> Note: Two features are only available in the professional version.
## How to subscribe

Expand Down
8 changes: 4 additions & 4 deletions en/202212/mqttx-newsletter-202211.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ In previous versions, MQTTX CLI would automatically disconnect and exit if the M

![MQTT CLI](https://assets.emqx.com/images/5c65e7ea10826afdd4a424bdb2fd2134.png)

The number of reconnection attempts is limited, and once this maximum is reached, MQTTX CLI will exit to prevent further attempts. The number of attempts is set to 10 by default, but this can be adjusted using the `-maximun-reconnect-times` option.
The number of reconnection attempts is limited, and once this maximum is reached, MQTTX CLI will exit to prevent further attempts. The number of attempts is set to 10 by default, but this can be adjusted using the `--maximum-reconnect-times` option.

```
```sh
# For example, change the number of attempts to 5

mqttx conn -h 'broker.emqx.io' -p 1883 --maximun-reconnect-times 5
mqttx conn -h 'broker.emqx.io' -p 1883 --maximum-reconnect-times 5
```

In addition to the number of attempts, we also add a configuration setting for the reconnect interval. If the MQTT server experiences an exception, MQTTX CLI will attempt to reconnect according to the reconnection interval measured in milliseconds. The interval is set to 1000 milliseconds by default, but this can be customized using the `-reconnect-period` option.

> Note: If the reconnect interval is set to 0, auto-reconnect will be disabled.

```
```sh
# For example, change the reconnection interval to 5000 milliseconds

mqttx conn -h 'broker.emqx.io' -p 1883 --reconnect-period 5000
Expand Down
4 changes: 2 additions & 2 deletions en/202302/emqx-cloud-serverless-launched.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ The Deployment Overview page displays real-time information on the current numbe

Please refer to the product documentation for a complete list of features and instructions: [EMQX Cloud Help Center](https://docs.emqx.com/zh/cloud/latest/).

For an in-depth comparison of the features offered by the Serverless Editon and the Dedicated Edition, please refer to: [https://www.emqx.com/en/pricing](https://www.emqx.com/en/pricing).
For an in-depth comparison of the features offered by the Serverless Edition and the Dedicated Edition, please refer to: [https://www.emqx.com/en/pricing](https://www.emqx.com/en/pricing).

## Conclusion

EMQX Cloud is committed to offering convenient IoT MQTT cloud services to users across diverse industries and sizes. With the release of the Serverless Editon, an even wider range of users can experience the convenience that EMQX Cloud provides. Whether you're a large enterprise or a start-up, you can rely on the stable and dependable data infrastructure services provided by EMQX Cloud to power your IoT business innovation.
EMQX Cloud is committed to offering convenient IoT MQTT cloud services to users across diverse industries and sizes. With the release of the Serverless Edition, an even wider range of users can experience the convenience that EMQX Cloud provides. Whether you're a large enterprise or a start-up, you can rely on the stable and dependable data infrastructure services provided by EMQX Cloud to power your IoT business innovation.


<section class="promotion">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ The client appears to have successfully connected to the MQTT broker, subscribed

We can see that the message sent by MQTTX is printed in the console.

![Receive messeges in the console](https://assets.emqx.com/images/37a333952c92044a62dc4145b4c4c337.png)
![Receive messages in the console](https://assets.emqx.com/images/37a333952c92044a62dc4145b4c4c337.png)

## Summary and complete code example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ A subnet is a range of IP addresses within a virtual network (VNet) that helps o
In the following example, the address space for the subnet is set to 10.0.1.0/24:

```
resource "azurerm_subnet" "exmaple" {
resource "azurerm_subnet" "example" {
name = "example-subenet"
resource_group_name = azurerm_resource_group.exmaple.name
virtual_network_name = azurerm_virtual_network.exmaple.name
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.0.1.0/24"]
}
```
Expand All @@ -120,14 +120,14 @@ A network interface (NIC) is the interconnection between a virtual machine (VM)
We assigned the subnet_id to the one we created inside the azurerm_network_interface blocks.

```
resource "azurerm_network_interface" "exmaple" {
name = "exmaple-network-interface"
location = azurerm_resource_group.exmaple.location
resource_group_name = azurerm_resource_group.exmaple.name
resource "azurerm_network_interface" "example" {
name = "example-network-interface"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
ip_configuration {
name = "internal"
subnet_id = azurerm_subnet.exmaple.id
subnet_id = azurerm_subnet.example.id
private_ip_address_allocation = "Dynamic"
}
}
Expand All @@ -142,13 +142,13 @@ The resource azurerm_linux_virtual_machine simplifies provisioning a Linux VM i
We assigned the resource_group_name and network_interface_ids with the ones we created inside the azurerm_linux_virtual_machine blocks.

```
resource "azurerm_linux_virtual_machine" "exmaple" {
name = "exmaple-virtual-machine"
resource_group_name = azurerm_resource_group.exmaple.name
location = azurerm_resource_group.exmaple.location
resource "azurerm_linux_virtual_machine" "example" {
name = "example-virtual-machine"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
size = "<YOUR-VM-SIZE>"
admin_username = "azureuser"
network_interface_ids = [azurerm_network_interface.exmaple.id]
network_interface_ids = [azurerm_network_interface.example.id]
admin_ssh_key {
...
Expand Down Expand Up @@ -241,40 +241,40 @@ resource "azurerm_public_ip" "example" {
allocation_method = "Static"
}
resource "azurerm_lb" "exmaple" {
name = "exmaple-lb"
location = azurerm_resource_group.exmaple.location
resource_group_name = azurerm_resource_group.exmaple.name
resource "azurerm_lb" "example" {
name = "example-lb"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
frontend_ip_configuration {
name = "example-frontend-ip"
public_ip_address_id = azurerm_public_ip.example.id
}
}
resource "azurerm_lb_backend_address_pool" "exmaple" {
resource "azurerm_lb_backend_address_pool" "example" {
name = "example-backend-address-pool"
loadbalancer_id = azurerm_lb.exmaple.id
loadbalancer_id = azurerm_lb.example.id
}
resource "azurerm_lb_probe" "exmaple" {
resource "azurerm_lb_probe" "example" {
name = "example-health-probe"
loadbalancer_id = azurerm_lb.exmaple.id
loadbalancer_id = azurerm_lb.example.id
port = 1883
protocol = "Tcp"
interval_in_seconds = 5
number_of_probes = 2
}
resource "azurerm_lb_rule" "exmaple" {
resource "azurerm_lb_rule" "example" {
name = "example-lb-rule"
loadbalancer_id = azurerm_lb.exmaple.id
loadbalancer_id = azurerm_lb.example.id
protocol = "Tcp"
frontend_port = 1883
backend_port = 1883
frontend_ip_configuration_name = "example-frontend-ip"
backend_address_pool_id = azurerm_lb_backend_address_pool.exmaple.id
probe_id = azurerm_lb_probe.exmaple.id
backend_address_pool_id = azurerm_lb_backend_address_pool.example.id
probe_id = azurerm_lb_probe.example.id
}
```

Expand Down
Loading