Demo for Smart Office, Factory

Version 18.1 by Hera Guo on 2024/11/04 17:42

Table of Contents:

1. About this demo

This demo is to show the installation for various sensors in Dragino Office, Dragino Facotry & ThingsEye Office. It covers various types of sensors such as Temperature, Humidity, CO2, Water Flow, Vibration & many many.

User can check this Public Share Link and see the dash board for this demo. The dash board keeps updating, while the main structure will keep the same. It has Three Level DashBoard as decribe below.

  • First Level - Overview for all branches: This dashboard shows all branches overview status and location.
  • Second Level - Branch Level: This dashboard shows all sensors installation and status in the selected branch.
  • Third Level - Sensor Level: This dashboard shows the detail reading for a specify sensor

Level1.png   Arrow.png   Level2.pngArrow.png  2024-09-26 23-47-06.png

The rest of this chapter will provide the introduction for how to set up similiar solution.

2.Basic configuration instructions

When you start a complex IoT project, you first need to learn some basic configuration methods for ThingsEye.

Here are some instructions you need to know:

Dashboard creation and some basic configurations:https://wiki.thingseye.io/xwiki/bin/view/Main/How%20to%20import%20and%20use%20the%20dashboard%3F/#H3.2.2.1CreatA0alarm

Rule chain creation:https://wiki.thingseye.io/xwiki/bin/view/Main/Basic%20configuration%20of%20rule%20chains

Devices connected to thingseye:https://wiki.thingseye.io/xwiki/bin/view/Main/How%20to%20connect%20my%20devices%20to%20ThingsEye%3F/

3.overview

3.1 MHierarchical architectureore features

Before we start a project, we first need to understand the organizational structure of the project. Only with a clear outline can our project construction process be smoother

Assets:Dragino Office  、Dragino Factory

Devices:

Dragino Factory:temperature and humidity measurement×7、Gateway×1

Dragino Office:temperature and humidity measurement×2、Air quality measurement×4

3.2 Dashboard architecture

In this demo, the dashboard is divided into three layers, namely: home page, asset, and device.

home page:It includes three parts: map, asset list, and all alarm. From this interface, you can see how many factories, offices, and so on there are

asset:It includes three parts: asset map, device list, and asset alarm. From this interface, you can see how many sensors are deployed in the office or project, where they are located, and their alarm status

device:This section displays the specific information collected by the device, and different types of sensors have different display interfaces

1730699212334-960.png

First floor:

1730702565889-204.png

Second floor:

1730702622551-808.png

Third floor:

1730702656725-496.png

1730702814435-805.png

1730702688377-367.png

  • How many types of devices do you need, how many layers of third level dashboards  you need to create.

3.3 Alarm rules

High Temperature、Low Temperature、High humidity、Low humidity、Low voltage、Device Disconnected

1730699566023-958.png

4.configuration details

After understanding the architecture and layering of the complete project, we can start configuring it

4.1 Dashboard configuration details

4.1.1.Data source (Entity aliases)

Asset map:

1730709409941-536.png

detail:

1730709424998-915.png

devid:

1730709442773-502.png

State:

1730709461297-207.png

Alarm:

1730709479828-595.png

Dragino&GXHL,Ltd:

1730709511861-439.png

Selected Supermarket:

1730709527720-418.png

Supermarkets:

1730709542597-321.png

Supermarket Devices:

1730709555797-383.png

4.1.2.Page Configuration

1、Configure the interface of the third layer Davies.

2、Configure the interface of the second layer asset

3、Configure the first layer menu interface

Map:

Data:

1730710271230-716.png

Actions:The map interface has two actions, among which Select supermarket can refresh the device list and related alarms on the right side to enter the location, and Supermarket_detail can jump to the second level physical interface to view the details of the location based on the selected location

1730710850458-781.png

Select supermarket:

var params = widgetContext.stateController.getStateParams();
var selectedSupermarket = params['selectedSupermarket'];
if (selectedSupermarket && selectedSupermarket.entityId.id === entityId.id) {
    params['selectedSupermarket'] = null;
} else {
    params['selectedSupermarket'] = { entityId: entityId, entityName: entityName, entityLabel: entityLabel };
}
widgetContext.stateController.updateState(null, params);

1730710875401-848.png

Supermarket_detail:

var params = JSON.parse(JSON.stringify(widgetContext.stateController.getStateParams()));
params['selectedSupermarket'] = {
        entityId: entityId,
        entityName: entityName,
        entityLabel: entityLabel,
};
params['targetEntityParamName'] = 'selectedSupermarket';
params['selectedDevice'] = null;

widgetContext.stateController.openState('svgmap', params); 

1730710990334-601.png

  • In this demo, exclusive map icons were set as follows:
var res = {
    url: images[0],
    size: 66
};
return res;

1730710395303-672.png

Asset List:

1730710693066-349.png

Actions:The Assets List interface has an action, which is the same as the Supermarket_details in the Map. You can jump to the second level entity interface to view the details of the selected location based on its location

1730712335338-750.png

1730712473941-913.png

All Alarms:

1730712539209-554.png

4.2 Alarm configuration details

4.3 Rule chain configuration details

5.