Ebyte E870-EG01 is an edge computing gateway with visual programming independently developed by Chengdu Ebyte Electronic Technology Co., Ltd. In the previous article, it was mentioned that the device supports two featured nodes: Serial Port Node and LED Node. This time, we will continue to introduce other featured nodes.
Introduction of Featured Nodes:
1.Logic Conversion Node
The function of this node is very easy to understand. It can output "true" or "false" according to the rules set by the user in advance.
As shown in the figure below, we use an injection node, a logic conversion node and a debug node. After connecting them, switch the mode of the logic conversion node to "Output True". In this case, no matter what message the injection node outputs, after passing through the logic conversion node, it will only output "true". Similarly, if the mode of the node is modified to "Output False", it will only output "false". These two modes are easy to understand, so the third "Flip Mode" needs to be mentioned separately.
When the node is in Flip Mode, if it receives "true", it will convert it to "false"; conversely, if it receives "false", it will convert it to "true". Note! If the message received by the node is neither "true" nor "false" but other data, the node will report an error. As shown in the figure below.
Node Error:
Correct Data Processing:
2.Cache Queue Node
This node will confirm the input message type according to the attributes of the input message, store valid data in the message queue, and execute corresponding operations for messages with attributes. So how do I obtain the corresponding message attributes and use them? Just drag the node into the canvas, then click on the node, and the introduction information of the node will appear on the right. Click the link "For details, please click" below. The user will be automatically redirected to the help page of all supported nodes of E870-EG01. At this time, just find the Cache Queue node, and then check the messages in the "Input" column, and the user can obtain the message attributes. If the user still does not understand how to use it at this time, look down to find the "Example" column, copy the code in it, and import it into your own Node-RED. The final imported result is as shown in the figure below.
Let's introduce them one by one. According to the figure, the first injection node contains a simple timestamp, whose purpose is just to output a piece of data (this data will be stored in the Cache Queue node and will not be output directly). The function of the second "Immediate Output" is to immediately output one piece of data stored in the Cache Queue node in chronological order. This function uses the message attribute "trigger". The third injection node contains the "reset" attribute, which functions to directly clear all data stored in the Cache Queue node. The function of the fourth injection node is to temporarily save the payload data in the node into the Cache Queue. If the user does not output data within the set time, these saved data will be directly cleared after timeout. The message attribute of this node is "ttl", which needs to be used with payload. The function of the fifth injection node is to output the specific number of messages in the current Cache Queue, using the message attribute "queueCount". The function of the sixth injection node is to change the mode of the Cache Queue node to "Transparent Transmission". In Transparent Transmission mode, the node will not store data, so the data passing through the node will be directly output. The message attribute used is "bypass", and the content needs to be "true". The function of the seventh injection node is to turn off the Transparent Transmission mode. If the user does not need the Transparent Transmission mode, this function can be used to turn it off. The message attribute used is also "bypass", and the content is "false". The function of the eighth injection node is to enable "Delayed Transparent Transmission". The specific function is to output each piece of data according to the configured time, which can be understood as delayed output. The message attribute used is "bypassInterval", and its content is the delay time configured by the user, such as 1000ms, 2000ms.
As time goes by, the functions of the device are being gradually improved and enhanced. The two featured nodes introduced in the article are only part of the device, but they are enough to show the investment of R&D personnel. In the future, we will introduce more, more interesting and more versatile nodes. For E870-EG01, everything has just begun!