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 Services, micro 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.
- BASIC: Final User:
- Example of documentation: https://www.km4city.org/iot-micro-doc/user.html
- access for the microservice collection from the JS foundation with full documentation inside: https://flows.nodered.org/?term=snap4city&num_pages=1
- ADVANCED: DEVELOPER (you have to install both libraries: basic and advanced)
- Example of documentation: https://www.km4city.org/iot-micro-doc/index.html
- access for the microservice collection from the JS foundation with full documentation inside: https://flows.nodered.org/?term=snap4city&num_pages=1
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 |
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:
|
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 |
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; |
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.;
|
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.; |
register a notification, request to send a notification, send notification/alerts per widget via XX channel, or to UserID, register notification. |
|
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:
- HOW TO: create a Dashboard in Snap4City
- HOW TO: add a device to the Snap4City Platform
- HOW TO: add data sources to the Snap4City Platform
- HOW TO: define privacy rules for personal data, produced by the end-users own device
We suggest you to follow these examples and readings in the order:
- TC2.12. Creating IOT Applications
- TC2.14. IOT Applications using multiple protocols, and formats for files Creating IOT Applications coping with heterogeneous data
- TC2.4. The daisy of MicroServices for Snap4City Dashboard and IOT App
- TC2.3. List of MicroServices and the Help, for Final Users and Developers
- Saving an IOT application into the Resource Manager and reusing it from another IOT applications, (eventually make it public for everybody)
- TC2.15. IOT application IOT device registration- Final user & Admin
- TC2.16. IOT Application Creation, using personal devices and exploiting city devices
- TC2.17. Event Driven IOT Applications, from brokers: Orion, SigFox, etc.
- TC2.18. Event Driven Data Management in Dashboards from: IOT Brokers and IOT Applications
- TC2.19. Creating Dashboards with IOT broker connection back and forward
- Creating IOT Application and Dashboard sharing the same IOT Devices (Controlling red light and speed limit)
- TC2.20. Creating Dashboards with IOT Application logic. Starting from new and old IOT application and get/connect a Dash, or from Dash connect and IOT app
- On road operator, sending color coding to the operator
- TC2.21. IOT Applications with Social Media Actions, and cultural scenarious
- TC2.22. Exploiting Twitter Vigilance as External Service, in Dashboard, and as RestCall as MicroService in IOT applications
- TC2.23. Search on Services into IOT Application using MicroService of Smart City API
- TC2.24. IOT Applications developed exploiting MicroServices, also supporting GDPR, real time, data sharing, etc.
- TC2.25. Registering external MicroService calling RestCall services, using it on IOT applications
- TC2.26. IOT Applications exploiting suggestion MicroService
- TC2.27. Add new Broker managing new protocol, and the corresponding NIFI process for indexing
- TC2.28. Snap4City MicroServices for Snap4City platform management from IOT Applications, feature of reflection
- TC2.29. Sharing Snap4City Applications based on NodeRED
- TC2.1. Managing IOT Application as my personal data, according to GDPR, create, see, download, delete,..
- TC2.2. Scenario with IOT Applications with users sharing position, GDPR, real time data, Acting to IOT Application from City Dashboards and vice versa
- TC2.5. IOT application; IOT Discovery of sensors and actuators for reading observations
- TC2.6. IOT application; IOT Discovery of sensors and actuators for sending commands and notifications
- TC2.7. IOT protocol Telemetry
- TC2.8. IOT Protocol Inquiries
- TC2.9. IOT Protocol Commands
- TC2.10. IOT Protocol Notifications
- TC2.13. Import of any new Block/MicroService or library of MicroServices into IOT Application Builder tools
- TC4.2. Managing Notifications on IOT Application: SMS, Telegram, email, Twitter, Dashboard events, in Push on other IOT Applications
- TC4.3. Alerting about critical events involving people in a specific area, IOT Application, Acting to IOT Application from City Dashboards and vice versa
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/
- Getting Started: https://NodeRED.org/docs/getting-started
- User Guide: https://NodeRED.org/docs/user-guide
- Cookbook: https://cookbook.NodeRED.org/
- Creating nodes: https://NodeRED.org/docs/creating-nodes/
- API Reference: https://NodeRED.org/docs/api/