IOT Applications = NodeRED + Snap4City MicroServices

×

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.

     Snap4City Overview: Advanced IOT Applications   

click the image to access the tool and create new IOT Applications, see the video   (the IOT applications are accessible only for registered users)


The Snap4City Applications (Proc.Logic) are data driven processes also called IoT App, personalized or shared among a community in which data are processed, and may be periodic and batch processes as well. They present a user-friendly interface (for creating applications, that may ingest data, elaborate them and presenting results).The creation of IOT Applications / Proc.Logic is supported by a visual tool. Typically, one arrive at producing an IOT App once he/she succeded in viewwing and creating some dashboard. The Dashboards can be regarded as the user interface of the IOT App / Proc.Logic . Or the opposite, the Proc.Logic / IOT App can be regarded as the Server Side Business logic behind a Dashboard. In other IOT tools, applications are formalized by using rules or by coding and flows. Here in Snap4City you can produce very powerful data/cpontrol flows , and logics for real time data driven appications, and end-to-end secure connection.

Snap4City Application Builder is a tool for creating IOT Snap4City Applications. They are put in execution and managed into the Snap4City environment, as processes in containers and it is based on NodeRED App, which in turn is based on Node.JS. The IOT Applications can read and act on IOT devices, exploit MicroServices, external services, and the application is fully created by composing NodeRED Blocks.

       

https://flows.nodered.org/search?term=snap4city

Examples based on IOT Applications and Dashboards:

Snap4City Users of any level can easily create Dashboards in few clicks to immediately show data: last value, historical data, relationships, geo location, etc., by using the Dashboard Builder. Those Dashboards can work directly on data, IOT Brokers, IOT Applications and a mix of them, using the same tool for all Dashboards. The tool, with the Wizard, allows to identify data and service healthiness since the first phases of dashboard/widget creation/addition. One IOT Application may have more than one Dashboard, and one Dashboard may have more than one IOT Application managing its business logic.

   

Snap4City Application Builder is an enhanced NodeRED tool with a large set of new MicroServices which are presently not accessible on the web and neither from the NodeRED libraries. Each NodeRED IOT application is substantially a data driven flow, also using referral data and data from the users on their mobiles.

Snap4City Node-RED libararies allows to create IoT Applications on cloud and on edge exploiting:

  • any storage
  • any protocol
  • any format
  • any event management and distribution, CAP, telegram, email, ftp, WS, etc. 
  • any IoT broker
  • any GIS tool
  • Snap4City / Km4City Smart City API
  • IOT Directory of Snap4City
  • DataGate and CKAN
  • DataManager: MyKPI, personal Data, MyPOI, etc.
  • Resource Manager, ProcessManager
  • Scenarios for What-IF analysis
  • Heatmap server
  • DISCES, back office scheduler management
  • Dashboard builders
  • Dashboard Widdget
  • Synoptics
  • External Servicesmicro applications, web pages, etc. 
  • Virtual Sensors and Actuators
  • Direct brokers of any kind
  • Maps management, WFS, WMS, ServiceMap
  • routing, conditional routing, multimodal routing, etc. 
  • Data Analytics in RStudio, Python, java, mapreduce, spark, etc. 
  • statistics and intelligence
  • Social media: facebook, twitter, telegram, etc. 
  • twitter vigilance, daily and real time
  • Copernicus Satellite
  • Web Scraping Portia
  • notification management
  • TV and video streams
  • LD and LOD management, and RDF stores, ServiceMap
  • Workflow management and integration
  • BIM management and integration
  • dynamic production nd managemen of WEB pages, forms, etc. 
  • container monitoring
  • API monitoring
  • web server monitoring
  • etc.

Each IOT application may have a Dashboard (using those of IBM as well as those provided by Dashboard Builder of Snap4City). The latter are responsive and automatically adapt the arrangement of widgets for the different monitor resolutions and size. The IOT Dashboards produce by using the MicroService of the Dashboard Builder provide a large number of graphic widgets and new widgets can be easily implemented. They can even mixed up with dashboards block provided by NodeRED standard and from open source collections available on web.

So that IOT Applications with Dashboard can be the logic fully integrated behind a City Dashboard for decision makers and for city users as well. Please note on the left side of the following image the list of the present libraries of Snap4City MicroServices directly accessible into IOT Application Builder as NodeRED. 

The IOT Applications may have or not their own Dashboard or even more than one. Into the IOT applications a dashboard element is also represented by a block in the flow. Open the block a link is offered to access at the Dashboard. In alternative you can access to the Dashboard directly by the main menu "Dashboard". YOU can find documentation of Snap4City Dashboard on  https://www.snap4city.org/drupal/node/108 with several examples. 

The Snap4City IOT Applications can be created by exploiting a large set of new MicroServices. (the list is reported in the menu) and are divided in MicroService for final users (https://www.km4city.org/iot-micro-doc/user.html ) and the set for Developers (AreaManager) (https://www.km4city.org/iot-micro-doc/index.html ). Please note that Snap4City MicroServices are provided by different tools, can be easily integrated with third party tools and MicroServices, and can be easily substituted with other services singularly or per family. Please note that the number and the functonalities of the Snap4City MicroServices is continously growing since the developers are respoding to many new requestes. So that the library suite that you can download from Node-RED.org are more powerful than what is reported in the o line documentation. On the other hand, the inside documentation of the libraries is always updated. This means that the online documentation has to be taken as an example of what can be done. In reality you can do much more. 

The above mentioned collections of Snap4City blocks for  NodeRED tool IOT applications builder can be accessed from the ResourceManager, (ProcessLoader) from the Main Menu. YOU can find documentation of Snap4City Dashboard on  https://www.snap4city.org/drupal/node/108 with several examples. 

This section reports the MicroServices represented as IOT Block in NodeRED which have been specially developed for Snap4City and which are presently available for creating IOT applications. Other MicroServices are planned to be delivered in the next iterations. In addition to these MicroServices other can be used since are for default available on NodeRED. The most used are listed in Appendix C and in particular those for accessing to some data formats; external services via FTP, HTTP, etc.; many protocols; simple dashboard; send email; etc. Please note that the only usage of NodeRED solution would be to create a solution very far from the requirements expected of Select4Cities challenge. According to Snap4City, IOT Applications and of ETL process may exploit a number of MicroServices such as:

Advanced Smart City

To make accessible smart city API as MicroServices. Knowledge Base: request by GPS, request by POI, request by area, request by polyline, request by BUSID, get POI by URI, etc. Access search data/entities via: text search, geo-spatial search, temporal search, etc.;

MicroService Directory

To collect and search MicroServices by metadata, text, IDs, get service status; lead to the EventLogger to study the resource consumption of each applications, or a set of applications.

IOT Directory and its MicroService

To register IOT devices: sensor/actuator, to get list of IOT sensors/actuators, get details from IOT ID, to get info and subscribe to IOT devices, IOT Discovery, ... according to different protocols of Discovery and available for Telemetry, Inquires, Commands and Notification;

IOT Discovery, registration and its MicroServices

Discovery: searching IOT devices by metadata, GPS, text, IDs, to the Knowledge base;

Registration: to register a new IOT device, it can be private or public, and will be connected to some broker.

HTML MicroApplications

To activate MicroApplications based on Smart City API

IOT Brokers

To get sensor, set actuator, get IOT discovered, get listed IOT, register and subscribe, etc.

City Dashboard

Implemented via Dashboard Builder and suitable for stand along or integrated into IOT applications. MicroServices for creating Dashboards, they can:

  • show data to the user (value, trends, maps, etc.), and
  • collect data from the user interface such as dimer, buttons, text, selections, slider;

Dashboard Widgets (from City Dashboard)

To get data, send data, registering notification, are creating widgets into the Dashboard, a single widget can show also NodeRED dashboard inside. They are substantially sensors or actuators available into City Dashboard and connected with IOT Orion Broker in NGSI. You can control the widget with data that can control the rendering of the dashbord dynamically.

Synoptic you may control synoptics from the IOT APP

External Services

make a REST call, a block of NodeRED for http call

NodeRED Dashboard

They can be used to create simple IOT App with simple user interface. They can be hosted into a widget of a City Dashboard produced by the Dashboard Builder;

DISCES Scheduler, controlling ETL and other data processes

To get the status of a process, start of a process. This means that the activation of ETL processes and of Data Analytics can be performed via this MicroService. The process can make firing a DISCES process, set process parameters (periodic, periodic, etc.)

Data Analytics Services

To pass from Big Data to results, for example for computing: traffic Flow reconstruction, parking free slot prediction, User behaviour analysis, routing, Traffic Flow prediction, etc.;

  • The MicroService is enabled by means of the block/MicroService that call a Docker container with R studio process. The results can be produced in output of the MicroService in JSON with additional maps and images.
  • Similarly other languages can be invoked as well.

EventLogger

To log events and traffic flow: access to DB, sending data, receiving data, log event, log data, get log data, etc. etc. All the log information is accessible for visual analytics on AMMA tool.

App Services

input app status, input GPS location, input sensors from mobile device, etc.;

Notificator

 register a notification, request to send a notification, send notification/alerts per widget via XX channel, or to UserID, register notification.

DataGate

MicroServices for accessing to the CKAN API for: loading a data set, publish a Dataset in bulk; search for a data sets, download, etc.; augmented with snapt4city monitoring

SigFOX

It is SigFOX block standard augmented with snapt4city monitoring of flow data. Event Logger

Twillo per SMS

for sending SMS, single and in bulk. This solution is just one possibility of sending SMS. It present additional costs direcly to be paid with those of Twillo service.

FaceBook Connection in Post

For sending a post on FaceBook.

Twitter data

For posting a Tweet on Twitter and for receiving Tweets from some channel.

Telegram

For posting a mesage on Telegram.  Towards a single and/or a collection of users. 

Workflow for ticket management You can control and integrate the system with workflow for ticketing, and thus from your control room you can control all and get/send alarms

Suggester

send notification per App/ID, get user behaviour, send suggestion per UserId, send message to App, ...

Data Mapping

change the mapping of IOT device to another temporary GPS remapping, ID remapping, GPS ID remapping

Big Data Services Save permanent data, get data by ID, Select data via SQL (Phoenix), save temporary data (timeout), ...;
IOT Orion Broker a MicroService for accessing to IOT Brokers as NGSI protocol
Get GPS and other mobile data to collect from mobile a number of data, such as GPS and other sensors located on the mobile phone, for example on Android.
External Services make a REST call. For example: Twitter Service: get tweets from channel, get tweets from search, get metrics, get NLP metrics, get SA metrics, ask for the number of tweets of channel/search, get last tweets of a channel/search, get the most relevant tweets according to positive/negative sentiment, etc.;
Sending GPS location from the Dashbord map to the IOT APP you can receive a GPS coordinate from the user picking on the multi data map widget of the dashboard
Alerting on data problems You can alerting on daa problems in each specific dashboard from the IOT App controlling an API of the Dashbosrd Builder
Video Wall you can control the configuration of your video wall from the IOT App, so  that you dashbord can change congiruation according to the events and actions.
etc. etc.  see many other packages of Snap4City MicroServices directly in the BASIC and ADVANCED libraries that you have into BASIC and ADVANCED IOT Applications on cloud. If you are not capable to update, install/add more Node/Blocks to your IOT Applications please contact US via:  https://www.snap4city.org/drupal/contact

One an IOT Application is designed and validated/tested it may have a Dashboard and the dashboard can be made public or delegated in access. IOT applications may be used for

  • produce predictions about parking, and can be instantiated for each parking area of the city, realising in this way several instances of the same solution working on different geolocation places, using different sensors, etc.
  • performing a short-term prediction on the whole traffic network of the city. In this case, it has to be a single App on the infrastructure since it has no sense to estimate it several times to obtain the same data results.
  • Estimating the next time and dosage of a medicine for a given user. In this case, it has to be instantiated for each user classified as patient, with specific needs, by some authority, and inserted in the trial/service.
  • Etc.

This means that Applications may differ for: (i) reference point, area, path, etc., (ii) City User ID, (iii) date and/or time, (iv) city, (v) user category, etc. In addition, they may be active on a certain period of the year, or may be periodically active. A general scheduler may be flexible enough to code the activation/deactivation of the Applications. The DISCES tool can be manage these aspects.

Please note that in this context, also, City Users (citizens, tourists, students, commuters, teenagers, elderly requiring health care, companies, operators, researchers, public administrators, politicians, etc.) may request to the system to activate and instance of some Application.

Each Application is put in execution by the Computation Management Service tools that have to verify the possibility to deploy and to execute each specific Application allocating and connecting the corresponding MicroServices according to the compatible hardware and possible allocations. In this way, we are proposing a hybrid solution exploiting Edge/Fog Computing, cloud facilities, parallel and distributed batch processing, also taking advantage of contextual information, and reducing latency of developed services.

For simpler steps start a fully guided training cases:

 

We suggest you to follow these examples and readings in the order:

User Manual of Node-RED to download: https://www.snap4city.org/download/video/Node-RED_dashboard_user_manual.pdf Please note that Snap4City Dashboards in NodeRED are much more powerful so that we suggest to use the snap4city dashboards instead of those natively provided into Node-RED. 

YOU can find documentation of Snap4City Dashboard on  https://www.snap4city.org/drupal/node/108 with several examples. 

On-line documentation: https://NodeRED.org/docs/