Getting Started

To get started you should need a Ubuntu 16.04 instance with below requirement in any cloud platform like AWS or in rack space. You can host Bevywise IoT platform based on our instruction guide or we will host it in your cloud instance.

System Requirements

Below are the minimum system requirements needed to deploy Bevywise IoT platform.

  • Any Cloud Server which has Ubuntu instance

  • Ubuntu instance - 2

  • CPU - 4 [Shared 2,2 for two instance]

  • CPU Core - 4 core [Shared 2,2 for two instance]

  • RAM - 16 GB [ Shared 8,8 for two instance]

  • Hard disk - Based on your data rate

  • OS - Ubuntu 16.04 or higher

Functional Components of Bevywise IOT Platform

Bevywise IoT Platform consist of the following components:

Message broker

Bevywise IoT Platform has MQTT based message broker which provides secure communication between the device and Bevywise IoT application to send and receive messages from each other, also it will store the collected data in Elastic search for powerful data analysis and visualization.

Rule engine

Bevywise IoT Platform has a powerful condition based rule engine which helps the user to forward alert messages to subscriber based on the received topics with corresponding messages. Users can also create rules for each key in complex json message.

Security and Authentication

Bevywise IoT platform supports TLS/SSL mode which provides a secure mechanism and data encryption between device and Bevywise IoT application. Bevywise IoT Platform also have device authentication for secure data transfer from end device to message broker.

Instand command

Bevywise IoT Platform help you to send a command or message to a particular device or to group of devices which listen or subscribe to that topic. Through this user can test and get data for monitoring.

Data Visualization

Bevywise IoT Platform was built over a powerful customizable visualization which helps the user to customize the data analytics based on their need. Bevywise IoT Platform also plot chart if the data or messages are in JSON format and users can add multiple field based on JSON key and values which make data analytics better and more powerful.

User Interface

Bevywise IoT platform has an eligent and transparent user interface which any user can monitor device and data without any complexity. Since all components configurations, monitoring and data analytics are done via user interface, any new user can easily understand and configure without help of adminstration. Bevywise IoT platform also has a separate user interface for user and administrator.

Data Storage

Bevywise IoT Platform store data in Elastic search which scales the IoT platform to millions of data. Storing data in the Elastic search not only increase storage but also increase the performance, data transfer rate and give way for power data analysis.

Single / Multi Tenancy

Bevywise IoT Platform is flexible for both single and multi tenancy implementation.

Multi Tenancy:

Our IoT platform has SaaS-based, multi-tenancy architecture which helps the user to serve multiple customers. Using this architecture, users or service providers can deployed the IoT platform in single instance and give individual web access for each customer to share the resource from the single instance. Also, we provide a Admin console for the provider to monitor each customer and their device.

For example, a Home automation provider will implement their sensor kit in multiple customers homes. If the provider implement a stand alone platform for each customer, then it will increase maintenance & development cost and also make monitoring harder. To overcome this, the provider can deploy our platform in the cloud server and give web access or login for each customer. Individual web access helps customers to monitor their device individually and also resources like database etc are shared from the single instance which will save cost and time.


Single tenancy:

Our IoT platform will also act as single tenancy for the customer who wants to implement the IoT platform has a stand alone server.

Register Command

Register command will help the user who has multiple slave or sub devices below a master device. To connect and register your master and its sub device, you must develop the master device as per our pre-defined topic and payload syntax.



  • First, create a publish topic of the master device as per the below topic syntax

    • system/<< clientid >>/register/group

    • client id : Master device ID

    • Note: Other topic levels [system, register, group] are constant and don't change it.

  • Second, to add all sub devices which are connected below master device, you must list all the sub device name, its subscriber & publish topic in JSON payload and assign to the above publish topic. Below is the syntax to list all sub device in JSON payload

  •                          
     
          { "group_details":
    
        [{ "device_id":"","device_name":"",
    
           "command_topics:"[{"topic":"","qos":""},
    
                  {"topic":"","qos":""}, 
                      .
                      .
                  ]
    
          "event_topics":["","",....]},
       
          { "device_id":"","device_name":"",
    
           "command_topics:"[{"topic":"","qos":""},
    
                  {"topic":"","qos":""},
                      .
                      .
                  ]
    
          "event_topics":["","",....]},
             .
             .
             .
             .
        ]
        }   
     
    
  • device_id : Id of sub devices

  • device_name: sub devices name

  • command_topics : It refers to the subscribe topic. Give subscribe topics which the device subscribed to get data. You can add multiple topics using the above syntax.

    • topic : Give subscriber topic

    • Qos : Metion QoS level for the specified topic.

  • event_topics: It refers to the device publishing topic. You can add multiple topics using the above syntax.

Now, if you connect the master device to our IoT platform, the platform will consider that the master device has sub devices based on its topic and add all the sub devices and its topics when the JSON payload is published. In IoT platform user interface, all sub devices, its topics will be added.

How to build a Mobile or web application

Bevywise IoT Platform Mobile SDK and REST API help the user to integrate or built their Mobile application both on android and ios. Follow the below steps to integrate your mobile app and IoT Platform.


Mobile SDK

We have separate SDK for android and ios.

Android

Below steps help you to integrate your android application and IoT platform.

  • Download the zip or clone our android SDK form bevywise github

    • To clone:

      • Install "git" in your PC

      • Once installed, open terminal or cmd and type the below command to clone it.

      •     
              git clone [email protected]:bevywise-networks/bevywise-iot-platfom-android-sdk.git
        
        
      • Once it done, "bevywise-iot-platfom-android-sdk-master" will created in your location.

    • To Download zip.

      • Go to Bevywise github repositary

      • Click "Clone or download" button on top right corner

      • In the pop-up, click "Download as zip".

  • Go to the "bevywise-iot-platfom-android-sdk-master" folder and copy "build.gradle" file.

  • Paste the "build.grade" file inside your App folder[< Android folder >/App]

  • Next, Click "Syn" button in your app. This will automatically import all dependencies and establish the connection between your application and IoT platform.

IOS

Bevywise IoS SDK is available through CocoaPods. To install it, follow the below steps:

  • The following commands will help you to create Pod file inside your IOS app folder. If you already have Pod file skip this step and move to next step

    • Open terminal and go to your APP folder

    • Next type "pod init" and click enter

    • Now Pod file is created inside the App folder.

  • Open the Pod file and add the below line and Save it

  • pod 'BevywiseIotPlatformSDK'

  • Next install pod in you Mac, by the below command.

  • pod install

  • Once you done, Start writing the code based on the test.swift and BevywisePlatformConnector.swift files, to link our REST API to your Mobile application

Rest API

Building application specific to a vertical is needed. You can either customize the User Interface component of the IOT Platform to build your user interface & Mobile Application. Besides the Mobile SDKs, IOT Platform also provides a complete REST API for querying and managing the devices via the server. For reference, please refer to the API document.

Deployment & Orchestration

Deployment of Bevywise IoT platform will be done by us. We will hand over with the necessary tools and give training about the set up, monitoring the platform and other service to check and manage them. Following is the model of our IoT Platform deployment and orchestration.


Deployment model

Bevywise IoT platform has multiple distributed services which will be deployed in Docker containers and to orchestrate or manage these containers we use kubernetes setup.


  • To deploy, we use two Ubuntu server which will act as master and slave. Here the Kubernetes set up will be deployed in Master Slave and all the containers which have the service will be loaded in the Slave server.

  • Through kubernetes user can manage all containers, check the status, create fail-over for the containers, automatic restart and more.

  • To collect data from kubernetes for monitor container, we use Prometheus set up which will be installed in the master server. Here Prometheus collect data about containers from the kubernetes via API and store it in the Prometheus data storage.

  • To deploy, we use two Ubuntu server which will act as master and slave. Here the Kubernetes set up will be deployed in Master Slave and all the containers which have the service will be loaded in the Slave server.

  • To visualize the container data for monitoring we use the Grafana on the Master server which will collect the data from Prometheus storage and show it in graph or charts. User can also set alert based on the data.

Monitoring the Service

Once we deployed our IoT Platform in your domain, you will get an Admin Console which helps you to manage your customers and their devices, Web access console for your users, Kubernetes console to manage containers, Prometheus and Grafana console for monitoring the containers where all platform depend services is deployed.

Self-healing

There are two methods to configure Kubernetes to manage container where platform depend will run. The two methods are

  • Restart Always - This method will take a replica or backup when starting a container and its functions. So, when the container fails, it will automatically create a new container with the backup and restart the service.

  • Never Restart - This method does not take any backup of containers and when the container fails, it remains in inactive status and Kubernetes will not restart it.

We will deployed the kubernetes console with "Restart Always" method. With this method, kubernetes will take backup of each container. So, when the container fails the kubernetes will automatically create a new container and load the backup and restart the service.

Horizontal Scaling

Kubernetes observe each container CPU usage and automatically scale up or down based on CPU usage. When the platform service uses 80-90% CPU, then Kubernetes automatically create a new pod or container, then load the service from deployment and run the created pod, this will help service to scale up based on CPU usage. Also, when container uses minimum usage, then kubernetes scale down the pods based on usage. This setup will help Bevywise IoT Platform to scale up when millions of millions connected.

Alert Configuration

Humans can't monitor each services and platform for 24X7. So, if any container reaches its maximum CPU level or memory level, then the container will hang and stop all the services running inside it. In such cases, we should configure a Alert and notification based on the CPU usage, Memory usage etc.

To configure alert and notification, we use Grafana set up in which we will set up a separate alert panel to create alert and for notification we will create a notification channel.









In the Notification channel, you can select notification type like Email notification, telegram notification, etc. Once you done, the alert will automatically send to your selected notification type.

In Alert panel, you can set a certain limit in percentage or in memory unit with condition check for CPU usage, Memory or RAM usage, CPU core usage and Disk usage. So, when the condition is satisfied, the alert will send to users via notification type

Getting Started with Bevywise IoT Platform

Sign in to Bevywise IoT Platform

If you do not have an account in Bevywise IoT platform create one.

To create an account:



  • Open Bevywise IoT Platform home page and choose signup.

  • Fill all mandatory details to create an account and click sign-up to login to Bevywise IoT Platform.

  • Once you have login, you can see Bevywise IoT platform user interface.


Dashboard

Users can view the latest happening in the IoT Platform on Dashboard.



Below status will be visible to user in dashboard

  • Total Client count which includes both active and inactive client.

  • Total number of Active client.

  • Total Received events or message

  • In Recent Events, users can view latest published or event topics, published data or messages and published time.

  • In Recent Connection, user can view the latest connected device name, device id and device connected time.

  • In Recent Disconnection, users can view the latest disconnected device name, device id and device disconnected time.

Devices tab

This tab provides a more detailed view for each active and inactive devices. Also each device has a separate web page, so users can monitor and manage each device separately.



  • To view individual device page, click the device from the list

  • In that page, you can see three icons on the top

    •    - It shows the overall details and activities about the device

      • Device details on the left side show the Device ID, Device name, Status of the device, will topic and messages.

      • Activity - Dynamically update the latest activity of the device

      • Send command - Helo you to send message or command to published or subscribed topic of device

      • Subscribe Topic - Provide the list of topic which the device subscribed to get data

      • Rule - Help you to create rules and also provide the list of rules which you create for this device or topic before.

    •    - It shows the list of published/publishing messages

    •    - It shows the list of received messages from the subscribed topic.

Report

Users can visualize the data in chart or graph through Report tab. Here you can create two types of reports or graphs:

  • Payload comparison graph

  • Historical graph

Payload comparison graph:

This graph is used to compare different device and topic payloads with different intervals. Below are the comparison model by which you can generate reports:



  • Multiple device payloads.

  • Mulitple Key's and values of json payload published from a device.

  • Mulitple key and value of json payload published from different devices.

  • Multiple topics and its payload of same device.

  • Multiple topics and its payload of different device.

To create:

  • To create a payload comparison graph, click the    to open Build graph window

  • In that window, provide the Graph name and



  • Select the device ID from the list below "Device ID" tab for which you want to create Graph

  • After the device ID, the corresponding topic will be listed below "Topic" tab. From the list you can select the topic.

    • If the payload of the selected topic is in JSON Format, "Key" tab will open. In the key tab, all key in the JSON payload will be shown.

      • If the payload is nested JSON, then the key will be shown in the below format

      • For example:

                                 
         
              {
        
               "Home_Automation": {
        
                     "Living_room": {
        
                             "Temperature_sensor": "10-200-RANGE",
        
                             "Light_sensor": "ON|OFF-RANDOM"
        
                            }
        
                         }
        
                    } 
         
        

        For the above nested JSON, the key will be shown as

        " Home_Automation.Living_room.Temperature_sensor Home_Automation.Living_room.Light sensor "

      • If the payload is in normal JSON, then the key will be shown separately.

    • For normal payload, the key tab will be in hidden and you can plot the graph with published messages.

  • Users can also add multiple field to plot graph which helps them to compare data of multiple device or multiple topic

  • Next, Duration provides time intervals which help the user to analyze earlier published data.

    • Last 30 min - Provide report for last 30 min.

    • Last 1 hour - Provide report for last 1 hour.

    • Last 3 hour - Provide report for last 3 hours.

    • Last 6 hour - Provide report for last 6 hours .

    • Last 12 hour - Provide report for last 12 hours.

    • Last 24 hour - Provide report for last 24 hours.

    • Today - Provide report from today 12:00 AM to current time.

    • Yesterday - Provide report from yesterday 12:00 AM to 24:00 PM

    • custom - Here you can customize the date as per your requirement to view the graph. [For example, if you want to the report from 01/02/2019 to 30/02/2019, then you can give the "From date" as 01/02/2019 and "To date" as 30/02/2019 and click create to view the reports between them.]

  • Once you have done, click "create" button to view graph. Also, if you want to download the graph as PDF, then click Download button which is placed below on each graph and it will automatically convert the graph to PDF and start downloading in your browser..

Historical Graph:

This provides comparison reports for the payload which are published in two different days or month's or year's.



To create:

  • To create a payload comparison graph, click the     to open Build graph window



  • In that window, provide the Graph name and Select the device ID from the list below "Device ID" tab for which you want to create Graph

  • After selecting the device ID, the corresponding topic will be listed below "Topic" tab. From the list you can select the topic.

    • If the payload of the selected topic is in JSON Format, "Key" tab will open. In the key tab, all key in the JSON payload will be shown.

      • If the payload is nested JSON, then the key will be shown in the below format:

      • For example:

                                 
         
              {
        
               "Home_Automation": {
        
                     "Living_room": {
        
                             "Temperature_sensor": "10-200-RANGE",
        
                             "Light_sensor": "ON|OFF-RANDOM"
        
                            }
        
                         }
        
                    } 
         
        

        For the above nested JSON, the key will be shown as

        " Home_Automation.Living_room.Temperature_sensor Home_Automation.Living_room.Light sensor "

      • If the payload is in normal JSON, then the key will be shown separately.

    • For normal payload, the key tab will be in hidden and you can plot the graph with published messages.

  • Next, to compare the two days or months or years, select or specify the first "From" and "To" date, after that click Compare date check box and specify second date.

  • Click the Create button and you can see a line graph with two different lines which specify two different days or months.

  • Also, if you want to download the graph as PDF, then click Download button which is placed below the graph and it will automatically convert the graph and published payload to PDF and start downloading in your browser.

Rule engine

Users can create condition based rules to create alert events based on the received topic or messages. Alert event contains topic and alert message and if the subscriber subscribes to that topic, an alert message will be forwarded to the subscriber. Follow the steps to create rules



  • Click     and it will lead to "Add rule window"

  • Events: Here you must give the device id and topic for which you want to create rules

    • In that window, give the device id in "Publisher From" text box for which you want to create rules.

    • Next, give the corresponding device topic in "with topic" text box

  • Conditions: Create condition based on the payload or message

    • In "Satisfy", if you select "ALL" then the rule will be published only if all given condition is satisfied

    • If you select "ANY", then the rule will be published if any one condition is satisfied.

  • In "Message/key/Time" list, you can see four parameter

    • INCOMING_MSG - If the given device and topic publishing normal payload, select this parameter and create conditions.

    • INCOMING_TIME - Select this, if you want to create a condition based on the timestamp of the published message.

    • Key - If the given device and topic publishing JSON payload, then select this parameter and create condition based on the publishing JSON key.

  • Action:

    • Device - This will send the rule message to the device based on the subscribed topic.



      • Client ID - Give the device or client id of the device to which you want to send the rule.

      • Topic name - Give the topic name to which the specified device subscribed to get message.

      • Message - Give a alert message to be published to the specified topic

    • Mail - This will send the rule or alert message as a mail to the specified mail id

      • Mail ID - Specify mail id to which you want to send alert mail

      • Mail Subject - Subject for the mail

      • Mail body - Enter alert message for mail

    • Websocket - This will push the rule or alert message to the notification and user can view the message via bell icon on top right corner

      • Alert title - Title for the notification

      • WS Alert Body - Alert message for notification

    • FCM - This will push the data as a notification to your android or ios app based on FCM token

      • FCM Alert title - Title for the notification

      • FCM Alert Body - Alert message for notification

  • Once you done the configurations, click save to add rule.

Now, when the rules satisfied, alert message will send based on your configurations.

To create Timer rules:

Bevywise rule engine also contain timer based rules, which help the user to send data to a device and topic for specific time or interval. Follow the steps to create timer rules:



  • Click     and it will lead to "Add Timer Rule"

  • In that window, give the device id in "Device" for which you create rules, corresponding subscribed topic of that device in "Topic" and the message to be published in "Message" tab.

  • Next select the time when you want to publish the message from "Hour & minutes" drop down boxes and then specify the From & To date in month/day/year format.

  • Now when the time and date matches the rule or message will published to given device.

Security

Users can create auth key[username] and auth token[password] with user permission for secure data transfer from end device to message broker.

  • Click "Add Authentication key" button on the top.



  • In the pop-up window, give "key description" and give permission for the key.

    • There are three types of Permission

      • Read Write - Grant both subscribe and publish permission for the device

      • Read - Grant only subscribe permission

      • Write - Grant only publish permission

  • Click "Gerenate Key"



  • Once you have done, created auth key and auth token will be displayed in the Authentication key list.

Instant Command

Instant command helps the user to send a message or data to the subscribed topic manaully.



  • Click the Instant command tab

  • Select the active subscribed topic from the list below "Command Topic" to which you want to send the message. Once yo select, devices which subscribed this topic will be listed on left pannel.

  • In "Command data" give the message which is to be sent to the topic.

  • Next, click "Send" button to send the data to the specified topic.

  • To view the sended data, go to device tab and select the device which is subscribed to the given topic and click     There you can see the message sent from the Instant command".

Admin Console

Since Bevywise IoT platform is a multi tendency platform, users can give multiple login to their customers to connect and monitor their devices. So, to monitor and manage all their customers, they should need a separate Admin or Administrator console, likewise Bevywise IoT Platform has a separate and customizable Admin console for the user or Administrator to monitor their customers.

Admin Dashboard

Bevywise Admin console has a elegant and simple Dashboard which gives a brief details about their connected or login customers.

  • Dashboard has four tab, which show total user count, device count, active device count and Auth count.

    • User count - Total number of login User

    • Device count -Total number of connected customer device

    • Active Device count - Total number of Active customer device

    • Auth count - Total number of Authentication created.

  • The table below the icons gives a brief description about their customers.

    • Name - Customer name which was given while sign-up in the platform

    • Email ID - Customer Email ID which was given while sign-up in the platform.

    • Phone Number - Customer phone number which was given while sign-up in the platform.

    • Created on - Date & Time on which customer sign-up to their platform

    • Last Login - Last login date & time

    • Devices Count - Total count of device which their customer connected to their platform.

  • In that table, users can sort their customer list by ascending and descending order by clicking the     next to the parameter. Up arrow will sort the list in Ascending order and Down arrow will sort the list in Descending order.

    • For example, if you want to sort the customer table based on the highest device connection, then click the down arrow next to "Device count". Now it will show the customer who has a high device count at first. Like wise you can sort the customer table based on the name, Email id, Last Login etc.

  • Users can search the customer list based on two options.

    • By user - Used to search customer based on the name and email id

    • By device - Used to search customer based on device name or device/client id.

Customer web page

Bevywise Admin console gives a separate user interface for each connected customer.

This separate user interface helps the admin to get more details for a particular device.

  • To view, Click the customer from the customer table for which you to know details and it will lead to the customer user interface

  • In that page you can see three tab, they are

    • Customer-info

    • Devices

    • Auth-key

    Customer-info

    Provide details about the selected customer from the customer table. The details shown are given by customer while sign-in to the Platform.



    Device

    Provide details about the device which was connected by the selected customer.

    • Send Message : Used to send a message to the device of the selected customer based on the subscribed topic.



      • Click the drop icon on the top left corner to open Send message

      • In that drop down window, fill the details based on the below explanation

        • Device - Device id of the device to which you want to message.

        • Topic - Name of the topic on which the device subscribed

        • Message - Message to be sent to the device

      • click Send to send the message.

      • [ Note: Device to which you're sending the message should be in Active status]

    • Device list: Provide details about connected devices in a detailed manner. Like Customer table in admin dashboard, here also you can sort the Device name, Device id, status and Time separately in ascending and descending order.



      • Device - Device name

      • Device Id - ID of connected Device

      • Status - Current status of device

      • Time - Date & Time at which the device connected

      • Auth Key - Authentication Key used by device to connect to the Bevywise IoT Platform

      • Recent Message - Recent publish message of the device. To view click the drop down icon next to "Recent "publish"

      • Connection log - Provide date & time at which the device connected and disconnected.

    • Auth Key: Provide all Authentication key used by the Customer to connect device.



Have more Questions?

We are with all ears waiting to hear from you. Post us with your questions and feedback.