How To Dev - Main Snap4City Proc.Logic / IoT App nodes/block for Node-RED

×

Warning message

  • You can't delete this newsletter because it has not been sent to all its subscribers.
  • You can't delete this newsletter because it has not been sent to all its subscribers.

 

Please note that, the most important blocks nodes to interact with the platforms are reported in the following table to familiarize with the main concepts. They are actually families of blocks/nodes since many other similar nodes are present that allow you to perform a large number of other features. The main principle is that YOU SHOULD NOT NEED to use HTTP REST CALL to API, since all of them are provided in terms of NODEs/BLOCKS (aka microservices) into the Processing Logic environment which is based on Node-RED plus Snap4City Libraries (IoT APP).
Most of the Nodes / MicroServices are controlled by sending them in input JSON messages with parameters. Most of the nodes can be also configured once from their graphic user interface settings but the JSON is the primary mode for setting parameters. This means that if a node receive data in its input port in JSON, the information and setting on graphic user interface is ignored.

Node shape

Description

Snap4City or standard

To generate injection messages into a flow, scheduled/periodic or on manual demand by click it on left.

standard

DATA TRANSFORM

A JavaScript function, from a JSON input to one or more JSON outputs, which can be produced by setting it.

standard

SAVE to STORAGE and BROKER

To send an Entity Message of an Entity Instance into the storage. The Entity Instance has to be registered on Entity Directory (IoT Directory) and you have to be the owner or to be delegated in READ-WRITE to send messages to it. The node represents the broker, so that the same node can be used to send any Entity Message you need.

Snap4city

SUBSCRIBE to an Entity change on BROKER

To subscribe the Processing Logic (IoT App) to receive event-driven notifications related to Entity Instances changes. The node is substantially a listener connected to an Orion Broker. You can subscribe to many Entities and then to get all of them from the output of the listener. The new version will go to provide an input port to send at this listener multiple subscriptions. 

Snap4city

READ from STORAGE

Query call to Smart City API to get any information about a SURI, ServiceURI. There are many other Nodes which can be used to pose Smart City API queries in very simple manner and recover vectors of ServiceURIs.

Snap4city

SEARCH on STORAGE

To perform queries on the storage to obtain a list of ServiceURI. The nodes of this family can allow you to perform searching queries by filtering for distance, area, subnature/category, values of attributes, time period, etc.

Snap4city

Send email. With other nodes you can send Telegram, SMS, etc.

standard

To send a REST CALL (get, post, etc.). Please USE THIS NODE ONLY for the access at external API and not to access at the Snap4City API for which a lot of MicroServices are accessible as NODEs/Blocks in the Processing Logic and they are simpler to be used and ready to use.

standard

A block which is printing on debug view the data JSON passed in its input. Please note that the node can be tuned to provide only msg.payload or the full JSON message, change configuration of the node.

standard

To create an Entity Instance (device instance) from a model prepared on Entity Directory (IoT Directory).

Snap4city

To change the ownership of an Entity Instance (IoT Device).

Snap4city

To delegate a certain Entity Instance (IoT Device) to some other user for which you have to know the Nickname. Delegations can be: Read_access, Read_write, Modify (to modify the Entity Instance structure).

Snap4city

To show something on Snap4City dashboard with a single content widget (one of the simplest widgets). A large set of dashboard nodes/widgets to send and retrieve data to/from dashboards are provided. This specific Nodes allows to send on dashboard HTML formatted messages with some limitations. Full HTTP widget is also accessible.

See in the following section for the Full list of Nodes for Snap4City Dashboard Widgets.

Snap4city

MQTT broker listener, to receive messages from the Broker. Another similar node can be used to send MQTT messages to the MQTT broker.  This node allows to perform a subscription to a topic of the MQTT broker.

standard

DATA ANALYTICS

Request performed on a Container including a Python data analytics, which is loaded into the node and the container is created at the first Deploy of the Processing Logic. Similar Approach is performed for RStudio Data Analytics.

Snap4city