Last modified by Hera Guo on 2024/11/11 17:08

From version 60.1
edited by Hera Guo
on 2024/11/07 10:21
Change comment: There is no comment for this version
To version 19.1
edited by Hera Guo
on 2024/11/05 09:51
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,4 +1,4 @@
1 - **Table of Contents:**
1 +**Table of Contents:**
2 2  
3 3  {{toc/}}
4 4  
... ... @@ -5,9 +5,6 @@
5 5  
6 6  
7 7  
8 -
9 -
10 -
11 11  = 1. About this demo =
12 12  
13 13  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.
... ... @@ -60,7 +60,7 @@
60 60  
61 61  **device:**This section displays the specific information collected by the device, and different types of sensors have different display interfaces
62 62  
63 -[[image:屏幕截图 2024-11-04 134645.png]]
60 +[[image:1730699212334-960.png]]
64 64  
65 65  First floor:
66 66  
... ... @@ -85,7 +85,7 @@
85 85  
86 86  High Temperature、Low Temperature、High humidity、Low humidity、Low voltage、Device Disconnected
87 87  
88 -[[image:屏幕截图 2024-11-04 135045.png]]
85 +[[image:1730699566023-958.png]]
89 89  
90 90  = 4.configuration details =
91 91  
... ... @@ -95,48 +95,58 @@
95 95  
96 96  === 4.1.1.Data source (Entity aliases) ===
97 97  
98 -detail:Obtain data based on dashboard status
95 +Asset map:
99 99  
97 +[[image:1730709409941-536.png||height="729" width="1440"]]
98 +
99 +detail:
100 +
100 100  [[image:1730709424998-915.png||height="729" width="1436"]]
101 101  
102 -Alarm:Obtain alarm information
103 +devid:
103 103  
105 +[[image:1730709442773-502.png||height="738" width="1434"]]
106 +
107 +State:
108 +
109 +[[image:1730709461297-207.png||height="706" width="1434"]]
110 +
111 +Alarm:
112 +
104 104  [[image:1730709479828-595.png||height="696" width="1435"]]
105 105  
106 -Dragino&GXHL,Ltd:Obtain data through asset types
115 +Dragino&GXHL,Ltd:
107 107  
108 108  [[image:1730709511861-439.png||height="714" width="1435"]]
109 109  
110 -Selected Supermarket:Retrieve devices by device type
119 +Selected Supermarket:
111 111  
112 112  [[image:1730709527720-418.png||height="751" width="1433"]]
113 113  
114 -Supermarket Devices:Obtain data through device type
123 +Supermarkets:
115 115  
116 -[[image:1730709555797-383.png||height="726" width="1434"]]
125 +[[image:1730709542597-321.png||height="734" width="1435"]]
117 117  
118 -LHT65N Device:Obtain data based on device type
127 +Supermarket Devices:
119 119  
120 -[[image:1730857191863-514.png||height="725" width="1433"]]
129 +[[image:1730709555797-383.png||height="726" width="1434"]]
121 121  
131 +
122 122  === 4.1.2.Page Configuration ===
123 123  
124 124  ==== 4.1.2.1、Configure the interface of the third layer Davies. ====
125 125  
136 +
126 126  ==== 4.1.2.2、Configure the interface of the second layer asset ====
127 127  
128 -===== 4.1.2.2.1 Equipment distribution diagram: =====
139 +**Equipment distribution diagram:**
129 129  
130 130  **Data:**
131 131  
132 132  [[image:1730770392454-317.png||height="745" width="1439"]]
133 133  
134 -**Appearannce:**In this module, we need to arrange our devices in the corresponding positions and use icons to display our devices. Therefore, in the Appearance interface, we need to configure them
145 +Tooltip function
135 135  
136 -**Tooltip function:**This module displays the current information of the device
137 -
138 -[[image:1730857537965-184.png]]
139 -
140 140  {{code language="none"}}
141 141  var msg = data
142 142  if(msg.Label=="gateway" && msg.type == "gateway"){
... ... @@ -162,12 +162,8 @@
162 162  }
163 163  {{/code}}
164 164  
165 -(% class="wikigeneratedid" id="HMarkerimagefunctionFF1A" %)
166 -**Marker image function:**This module can display different icons based on different types of sensors and their status to achieve its functionality
172 +==== Marker image function: ====
167 167  
168 -(% class="wikigeneratedid" %)
169 -[[image:1730857750749-240.png]]
170 -
171 171  {{code language="none"}}
172 172  var res
173 173  var msg = data
... ... @@ -257,11 +257,9 @@
257 257  return res;
258 258  {{/code}}
259 259  
260 -(% class="wikigeneratedid" %)
261 -[[image:1730770875793-351.png||height="799" width="1474"]]
263 +==== [[image:1730770875793-351.png]] ====
262 262  
263 -(% class="wikigeneratedid" %)
264 -**Actions:**We need to implement the function of entering the details interface through the corresponding device icon, so in this module, we need to add actions to achieve redirection
265 +==== Actions ====
265 265  
266 266  {{code language="none"}}
267 267  var entitySubType;
... ... @@ -320,24 +320,20 @@
320 320  
321 321  {{/code}}
322 322  
323 -[[image:1730771103096-522.png||height="815" width="1503"]]
324 +[[image:1730771103096-522.png]]
324 324  
325 -===== 4.1.2.2.2 Device List =====
326 +Device List
326 326  
327 -(% class="wikigeneratedid" id="HDataFF1A" %)
328 -**Data:**
328 +Data:
329 329  
330 -[[image:1730771199343-553.png||height="802" width="1501"]]
330 +[[image:1730771199343-553.png]]
331 331  
332 -**Actions:**Equipment distribution diagram: In this module, functions need to be implemented such as adding devices, editing devices, deleting devices, and jumping to the device details page. Therefore, the following actions need to be added:
332 +Actions:
333 333  
334 334  [[image:1730771228766-212.png]]
335 335  
336 -(% class="wikigeneratedid" id="HEditdeviceFF1A" %)
337 -**Edit device:**Implementation function: Device editing
336 +==== Edit device: ====
338 338  
339 -[[image:1730771256045-238.png]]
340 -
341 341  {{code language="none"}}
342 342  let $injector = widgetContext.$scope.$injector;
343 343  let customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));
... ... @@ -434,9 +434,9 @@
434 434  }
435 435  {{/code}}
436 436  
437 -**Delete device:**Implementation function: Device deletion
434 +==== [[image:1730771256045-238.png]] ====
438 438  
439 -[[image:1730771318657-502.png]]
436 +Delete device
440 440  
441 441  {{code language="none"}}
442 442  let $injector = widgetContext.$scope.$injector;
... ... @@ -467,9 +467,9 @@
467 467  
468 468  {{/code}}
469 469  
470 -**jump:I**mplementation function: Jump to the device details page
467 +[[image:1730771318657-502.png]]
471 471  
472 -[[image:1730771386258-676.png]]
469 +jump
473 473  
474 474  {{code language="none"}}
475 475  console.log(entityName)
... ... @@ -528,10 +528,9 @@
528 528  }
529 529  {{/code}}
530 530  
531 -(% class="wikigeneratedid" id="H-1" %)
532 -**Add device:**Implementation function: Add device
528 +==== [[image:1730771386258-676.png]] ====
533 533  
534 -[[image:1730771441589-122.png]]
530 +Add device
535 535  
536 536  {{code language="none"}}
537 537  let $injector = widgetContext.$scope.$injector;
... ... @@ -596,26 +596,27 @@
596 596  }
597 597  {{/code}}
598 598  
599 -==== ====
595 +==== [[image:1730771441589-122.png]] ====
600 600  
601 -===== 4.1.2.2.3 Asset Alarm: =====
597 +==== Asset Alarm ====
602 602  
603 -**Data:**
599 +Data:
604 604  
601 +[[image:1730771504586-433.png]]
605 605  
606 606  ==== 4.1.2.3、Configure the first layer menu interface ====
607 607  
608 -===== 4.1.2.3.1 Map: =====
605 +**Map:**
609 609  
610 -**Data:**
607 +Data:
611 611  
612 612  [[image:1730710271230-716.png||height="729" width="1427"]]
613 613  
614 -**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
611 +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
615 615  
616 616  [[image:1730710850458-781.png||height="770" width="1429"]]
617 617  
618 -**Select supermarket:**Implementation function: Refresh the side page
615 +Select supermarket:
619 619  
620 620  {{code language="none"}}
621 621  var params = widgetContext.stateController.getStateParams();
... ... @@ -630,7 +630,7 @@
630 630  
631 631  [[image:1730710875401-848.png||height="767" width="1429"]]
632 632  
633 -**Supermarket_detail:**Implementation function: Jump to the asset details page
630 +Supermarket_detail:
634 634  
635 635  {{code language="none"}}
636 636  var params = JSON.parse(JSON.stringify(widgetContext.stateController.getStateParams()));
... ... @@ -647,9 +647,7 @@
647 647  
648 648  [[image:1730710990334-601.png||height="772" width="1433"]]
649 649  
650 -* (((
651 -In this demo, exclusive map icons were set as follows:
652 -)))
647 +* In this demo, exclusive map icons were set as follows:
653 653  
654 654  {{code language="none"}}
655 655  var res = {
... ... @@ -661,418 +661,23 @@
661 661  
662 662  [[image:1730710395303-672.png||height="771" width="1438"]]
663 663  
664 -===== 4.1.2.3.2 Asset List: =====
659 +Asset List:
665 665  
666 -**Data:**
667 667  
668 668  [[image:1730710693066-349.png||height="772" width="1439"]]
669 669  
670 -**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
664 +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
671 671  
672 672  [[image:1730712335338-750.png||height="751" width="1423"]]
673 673  
674 674  [[image:1730712473941-913.png||height="781" width="1422"]]
675 675  
676 -===== 4.1.2.3.3 All Alarms: =====
670 +All Alarms:
677 677  
678 678  [[image:1730712539209-554.png||height="764" width="1424"]]
679 679  
680 680  == 4.2 Alarm configuration details ==
681 681  
682 -=== 4.2.1 High temperature ===
683 -
684 -Creat:
685 -
686 -[[image:1730862483514-101.png||height="750" width="1407"]]
687 -
688 -Clear:
689 -
690 -[[image:1730862584519-902.png||height="758" width="1404"]]
691 -
692 -=== 4.2.2 Low Temperature ===
693 -
694 -Creat:
695 -
696 -[[image:1730863708259-750.png||height="752" width="1403"]]
697 -
698 -Clear:
699 -
700 -[[image:1730863750414-979.png||height="746" width="1403"]]
701 -
702 -=== 4.2.3 High humidity ===
703 -
704 -Creat:
705 -
706 -[[image:1730864045747-876.png||height="752" width="1396"]]
707 -
708 -Clear:
709 -
710 -[[image:1730864077395-395.png||height="735" width="1393"]]
711 -
712 -=== 4.2.4 Low humidity ===
713 -
714 -Creat:
715 -
716 -[[image:1730864117808-484.png||height="741" width="1392"]]
717 -
718 -Clear:
719 -
720 -[[image:1730864159071-895.png||height="745" width="1392"]]
721 -
722 -=== 4.2.5 Low voltage ===
723 -
724 -Creat:
725 -
726 -[[image:1730864207037-477.png||height="740" width="1388"]]
727 -
728 -Clear:
729 -
730 -[[image:1730864250506-111.png||height="735" width="1389"]]
731 -
732 -=== 4.2.6 Device Disconnected ===
733 -
734 -Creat:
735 -
736 -[[image:1730864293216-991.png||height="739" width="1387"]]
737 -
738 -Clear:
739 -
740 -[[image:1730864331859-740.png||height="735" width="1385"]]
741 -
742 742  == 4.3 Rule chain configuration details ==
743 743  
744 -[[image:1730864784118-474.png]]
745 -
746 -**Script:**Email configuration for sending device alarm information
747 -
748 -[[image:1730864676542-406.png||height="732" width="1384"]]
749 -
750 -{{code language="none"}}
751 -function locatime(timenumber){
752 - var date = new Date(timenumber)
753 - return date.toLocaleDateString() + ' ' + date.toLocaleTimeString()
754 -}
755 -var name = msg.name
756 -var devicename = msg.originatorName
757 -var label = msg.originatorLabel
758 -var status = msg.status
759 -var detaildata =JSON.parse(msg.details.data)
760 -var tempswitch
761 -
762 -if (name != "Device Disconnected") {
763 - //detaildata=JSON.parse(msg.details.data)
764 - if (detaildata.Temperature_alarm_switch == true) {
765 - tempswitch = "open"
766 - } else {
767 - tempswitch = "close"
768 - }
769 - var humswitch
770 - if (detaildata.Humidity_alarm_switch == true) {
771 - humswitch = "open"
772 - } else {
773 - humswitch = "close"
774 - }
775 - var batswitch
776 - if (detaildata.Voltage_alarm_switch == true) {
777 - batswitch = "open"
778 - } else {
779 - batswitch = "close"
780 - }
781 - var str2 = "<p>-- Temperature alarm switch status: " +
782 - tempswitch + "</p>" +
783 - "<p>-- Humidity alarm switch status: " + humswitch +
784 - "</p>" +
785 - "<p>-- Voltage alarm switch status: " + batswitch
786 -}
787 -
788 -if (name == "High Temperature" && status ==
789 - "ACTIVE_UNACK") {
790 - var emailstr =
791 - "<div><p><span style='color: black; font-weight: bold'>" +
792 - "Device " + label + " has alarm:</span></p>" +
793 - "<p><span style='color: red; font-weight: bold'>-- High Temperature Alarm</span></p>" +
794 - "<p>-- Current Temperature : " + detaildata
795 - .TempC_SHT + "</p><br>" +
796 - "<p>Device Configure:</p>" +
797 - "<p>-- Temperature Threshold : min: " + detaildata
798 - .Low_temperature_alarm + ", max: " + detaildata
799 - .High_temperature_alarm + "</p>" +
800 - "<p>-- Humidity Threshold: min: " + detaildata
801 - .Low_humidity_alarm + ", max:" + detaildata
802 - .High_humidity_alarm + "</p>" +
803 - "<p>-- Battery threshold: min: " + detaildata
804 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
805 - return {
806 - msg: {
807 - "data": emailstr
808 - },
809 - metadata: metadata,
810 - msgType: msgType
811 - };
812 -} else if (name == "Low Temperature" && status ==
813 - "ACTIVE_UNACK") {
814 - var emailstr =
815 - "<div><p><span style='color: black; font-weight: bold'>" +
816 - "Device " + label + " has alarm:</span></p>" +
817 - "<p><span style='color: red; font-weight: bold'>-- Low Temperature Alarm</span></p>" +
818 - "<p>-- Current Temperature : " + detaildata
819 - .TempC_SHT + "</p><br>" +
820 - "<p>Device Configure:</p>" +
821 - "<p>-- Temperature Threshold : min: " + detaildata
822 - .Low_temperature_alarm + ", max: " + detaildata
823 - .High_temperature_alarm + "</p>" +
824 - "<p>-- Humidity Threshold: min: " + detaildata
825 - .Low_humidity_alarm + ", max:" + detaildata
826 - .High_humidity_alarm + "</p>" +
827 - "<p>-- Battery threshold: min: " + detaildata
828 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
829 -
830 - return {
831 - msg: {
832 - "data": emailstr
833 - },
834 - metadata: metadata,
835 - msgType: msgType
836 - };
837 -
838 -} else if (name == "Device Disconnected" && status ==
839 - "ACTIVE_UNACK") {
840 - var time1 = locatime(Number(detaildata.lastActivityTime))
841 - //var time1 = detaildata.lastActivityTime
842 - // var chazhi = parseInt((detaildata.inactivityAlarmTime-detaildata.lastActivityTime)/1000/60)
843 - // var emailstr =
844 - // "<div><p><span style='color: red; font-weight: bold'>" +
845 - // "Device " + label + " has Alarm</span></p><p>Last activity time: "+time1+"</p><p>Last Uplink: 21"+"minutes ago</p></div>"
846 -
847 - var emailstr ="Device " + label + " has Alarm##Last activity time: "+time1+"##Last Uplink: 21minutes ago"
848 - var newType = "POST_TELEMETRY_REQUEST"
849 - return {
850 - msg:emailstr,
851 - metadata: metadata,
852 - msgType: newType
853 - }
854 -} else if (name == "High humidity" && status ==
855 - "ACTIVE_UNACK") {
856 - var emailstr =
857 - "<div><p><span style='color: black; font-weight: bold'>" +
858 - "Device " + label + " has alarm:</span></p>" +
859 - "<p><span style='color: red; font-weight: bold'>-- High Humidity Alarm</span></p>" +
860 - "<p>-- Current Temperature : " + detaildata
861 - .Hum_SHT + "</p><br>" +
862 - "<p>Device Configure:</p>" +
863 - "<p>-- Temperature Threshold : min: " + detaildata
864 - .Low_temperature_alarm + ", max: " + detaildata
865 - .High_temperature_alarm + "</p>" +
866 - "<p>-- Humidity Threshold: min: " + detaildata
867 - .Low_humidity_alarm + ", max:" + detaildata
868 - .High_humidity_alarm + "</p>" +
869 - "<p>-- Battery threshold: min: " + detaildata
870 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
871 -
872 - return {
873 - msg: {
874 - "data": emailstr
875 - },
876 - metadata: metadata,
877 - msgType: msgType
878 - };
879 -} else if (name == "Low humidity" && status ==
880 - "ACTIVE_UNACK") {
881 - var emailstr =
882 - "<div><p><span style='color: black; font-weight: bold'>" +
883 - "Device " + label + " has alarm:</span></p>" +
884 - "<p><span style='color: red; font-weight: bold'>-- Low Humidity Alarm</span></p>" +
885 - "<p>-- Current Temperature : " + detaildata
886 - .Hum_SHT + "</p><br>" +
887 - "<p>Device Configure:</p>" +
888 - "<p>-- Temperature Threshold : min: " + detaildata
889 - .Low_temperature_alarm + ", max: " + detaildata
890 - .High_temperature_alarm + "</p>" +
891 - "<p>-- Humidity Threshold: min: " + detaildata
892 - .Low_humidity_alarm + ", max:" + detaildata
893 - .High_humidity_alarm + "</p>" +
894 - "<p>-- Battery threshold: min: " + detaildata
895 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
896 -
897 - return {
898 - msg: {
899 - "data": emailstr
900 - },
901 - metadata: metadata,
902 - msgType: msgType
903 - };
904 -} else if (name == "Low voltage" && status ==
905 - "ACTIVE_UNACK") {
906 - var emailstr =
907 - "<div><p><span style='color: black; font-weight: bold'>" +
908 - "Device " + label + " has alarm:</span></p>" +
909 - "<p><span style='color: red; font-weight: bold'>-- Low Voltage Alarm</span></p>" +
910 - "<p>-- Current Temperature : " + detaildata.BatV +
911 - "</p><br>" +
912 - "<p>Device Configure:</p>" +
913 - "<p>-- Temperature Threshold : min: " + detaildata
914 - .Low_temperature_alarm + ", max: " + detaildata
915 - .High_temperature_alarm + "</p>" +
916 - "<p>-- Humidity Threshold: min: " + detaildata
917 - .Low_humidity_alarm + ", max:" + detaildata
918 - .High_humidity_alarm + "</p>" +
919 - "<p>-- Battery threshold: min: " + detaildata
920 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
921 -
922 - return {
923 - msg: {
924 - "data": emailstr
925 - },
926 - metadata: metadata,
927 - msgType: msgType
928 - };
929 -} else if (name == "High Temperature" && status ==
930 - "CLEARED_UNACK") {
931 - var emailstr =
932 - "<div><p><span style='color: green; font-weight: bold'>Device " +
933 - label +
934 - " High Temperature Alarm Cleared</span></p>" +
935 - "<p>-- Current Temperature : " + detaildata
936 - .TempC_SHT + "</p><br>" +
937 - "<p>Device Configure:</p>" +
938 - "<p>-- Temperature Threshold : min: " + detaildata
939 - .Low_temperature_alarm + ", max: " + detaildata
940 - .High_temperature_alarm + "</p>" +
941 - "<p>-- Humidity Threshold: min: " + detaildata
942 - .Low_humidity_alarm + ", max:" + detaildata
943 - .High_humidity_alarm + "</p>" +
944 - "<p>-- Battery threshold: min: " + detaildata
945 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
946 -
947 - return {
948 - msg: {
949 - "data": emailstr
950 - },
951 - metadata: metadata,
952 - msgType: msgType
953 - };
954 -} else if (name == "Low Temperature" && status ==
955 - "CLEARED_UNACK") {
956 - var emailstr =
957 - "<div><p><span style='color: green; font-weight: bold'>Device " +
958 - label +
959 - " Low Temperature Alarm Cleared</span></p>" +
960 - "<p>-- Current Temperature : " + detaildata
961 - .TempC_SHT + "</p><br>" +
962 - "<p>Device Configure:</p>" +
963 - "<p>-- Temperature Threshold : min: " + detaildata
964 - .Low_temperature_alarm + ", max: " + detaildata
965 - .High_temperature_alarm + "</p>" +
966 - "<p>-- Humidity Threshold: min: " + detaildata
967 - .Low_humidity_alarm + ", max:" + detaildata
968 - .High_humidity_alarm + "</p>" +
969 - "<p>-- Battery threshold: min: " + detaildata
970 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
971 -
972 - return {
973 - msg: {
974 - "data": emailstr
975 - },
976 - metadata: metadata,
977 - msgType: msgType
978 - };
979 -} else if (name == "High humidity" && status ==
980 - "CLEARED_UNACK") {
981 - var emailstr =
982 - "<div><p><span style='color: green; font-weight: bold'>Device " +
983 - label + " High Humidity Alarm Cleared</span></p>" +
984 - "<p>-- Current Temperature : " + detaildata
985 - .Hum_SHT + "</p><br>" +
986 - "<p>Device Configure:</p>" +
987 - "<p>-- Temperature Threshold : min: " + detaildata
988 - .Low_temperature_alarm + ", max: " + detaildata
989 - .High_temperature_alarm + "</p>" +
990 - "<p>-- Humidity Threshold: min: " + detaildata
991 - .Low_humidity_alarm + ", max:" + detaildata
992 - .High_humidity_alarm + "</p>" +
993 - "<p>-- Battery threshold: min: " + detaildata
994 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
995 -
996 - return {
997 - msg: {
998 - "data": emailstr
999 - },
1000 - metadata: metadata,
1001 - msgType: msgType
1002 - };
1003 -} else if (name == "Low humidity" && status ==
1004 - "CLEARED_UNACK") {
1005 - var emailstr =
1006 - "<div><p><span style='color: green; font-weight: bold'>Device " +
1007 - label + " Low Humidity Alarm Cleared</span></p>" +
1008 - "<p>-- Current Temperature : " + detaildata
1009 - .Hum_SHT + "</p><br>" +
1010 - "<p>Device Configure:</p>" +
1011 - "<p>-- Temperature Threshold : min: " + detaildata
1012 - .Low_temperature_alarm + ", max: " + detaildata
1013 - .High_temperature_alarm + "</p>" +
1014 - "<p>-- Humidity Threshold: min: " + detaildata
1015 - .Low_humidity_alarm + ", max:" + detaildata
1016 - .High_humidity_alarm + "</p>" +
1017 - "<p>-- Battery threshold: min: " + detaildata
1018 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
1019 - return {
1020 - msg: {
1021 - "data": emailstr
1022 - },
1023 - metadata: metadata,
1024 - msgType: msgType
1025 - };
1026 -} else if (name == "Low voltage" && status ==
1027 - "CLEARED_UNACK") {
1028 -
1029 - var emailstr =
1030 - "<div><p><span style='color: green; font-weight: bold'>Device " +
1031 - label + " Low Voltage Alarm Cleared</span></p>" +
1032 - "<p>-- Current Temperature : " + detaildata.BatV +
1033 - "</p><br><br>" +
1034 - "<p>Device Configure:</p>" +
1035 - "<p>-- Temperature Threshold : min: " + detaildata
1036 - .Low_temperature_alarm + ", max: " + detaildata
1037 - .High_temperature_alarm + "</p>" +
1038 - "<p>-- Humidity Threshold: min: " + detaildata
1039 - .Low_humidity_alarm + ", max:" + detaildata
1040 - .High_humidity_alarm + "</p>" +
1041 - "<p>-- Battery threshold: min: " + detaildata
1042 - .Low_voltage_alarm + "</p>" + str2 + "</div>"
1043 -
1044 - return {
1045 - msg: {
1046 - "data": emailstr
1047 - },
1048 - metadata: metadata,
1049 - msgType: msgType
1050 - };
1051 -} else if (name == "Device Disconnected" && status ==
1052 - "CLEARED_UNACK") {
1053 - var time1 = locatime(Number(detaildata.lastActivityTime))
1054 - //var time1 = detaildata.lastActivityTime
1055 - // var chazhi = parseInt((detaildata.inactivityAlarmTime-detaildata.lastActivityTime)/1000/60)
1056 - // var emailstr =
1057 - // "<div><p><span style='color: green; font-weight: bold'>" +
1058 - // "Device " + label + " has Alarm Cleared</span></p><p>Last activity time: "+time1+"</p></div>"
1059 - var emailstr ="Device " + label + " has Alarm Cleared##Last activity time: "+time1
1060 - var newType = "POST_TELEMETRY_REQUEST"
1061 - return {
1062 - msg: emailstr,
1063 - metadata: metadata,
1064 - msgType: newType
1065 - }
1066 -}
1067 -{{/code}}
1068 -
1069 -(% class="wikigeneratedid" %)
1070 -**Generate Report:**
1071 -
1072 -(% class="wikigeneratedid" %)
1073 -[[image:1730865053380-293.png]]
1074 -
1075 -= 5.other =
1076 -
1077 -* If you want to create a similar dashboard, after understanding the case, you can download and import the dashboard, device profiles, rule chains, etc. of the case on GitHub, and make modifications based on them.
1078 -* GitHub address:[[https:~~/~~/github.com/ThingsEye-io/te-platform/tree/main/case/Dragino%20Office%20%26%20Factory>>https://github.com/ThingsEye-io/te-platform/tree/main/case/Dragino%20Office%20%26%20Factory]]
678 += 5. =
1730857191863-514.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -354.7 KB
Content
1730857537965-184.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -455.1 KB
Content
1730857750749-240.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -285.9 KB
Content
1730862483514-101.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -195.8 KB
Content
1730862584519-902.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -191.1 KB
Content
1730863708259-750.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -220.1 KB
Content
1730863750414-979.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -210.6 KB
Content
1730864045747-876.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -208.9 KB
Content
1730864077395-395.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -201.4 KB
Content
1730864117808-484.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -203.0 KB
Content
1730864159071-895.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -226.6 KB
Content
1730864207037-477.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -215.3 KB
Content
1730864250506-111.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -209.5 KB
Content
1730864293216-991.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -138.5 KB
Content
1730864331859-740.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -134.4 KB
Content
1730864460314-611.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -256.7 KB
Content
1730864617480-221.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -260.8 KB
Content
1730864676542-406.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -227.7 KB
Content
1730864784118-474.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -148.8 KB
Content
1730865053380-293.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -46.7 KB
Content
屏幕截图 2024-11-04 135045.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.hera
Size
... ... @@ -1,1 +1,0 @@
1 -29.4 KB
Content