added parts of protocol for ZCT330E
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Sep 2020 10:20:03 +0000 (12:20 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Sep 2020 10:20:03 +0000 (12:20 +0200)
Protocol.pm

index fd162f6..6a367ed 100644 (file)
@@ -125,21 +125,29 @@ __DATA__
 0x0A   Y axis relative angle           f Float(4)      R       ‐90°~90°    0       Return the Y angle value according to the set relative zero 
 0x0C   Sensor temperature              s Word(2)       R       ‐32768~32767  /       signed,sensor temperature =Data/100, unit ℃ 
 0x0D   Power source voltage            S Word(2)       R       0~65535         /       Voltage= Data/100, unit V 
+0x0E   Heartbeat interval              l DWord(4)      R/W     60~2160000      86400   ZCT330E Interval at which the device periodically uploads data to the server 
+0x0F   Failure interval                l DWord(4)      R/W     60~2160000      3600    ZCT330E Interval at which the device failure is retransmitted
 0x11   Arming/disarming                C Byte(1)       R/W     0~255           1       0 means disarming, non‐zero means arming 
-0x12   Alarm delay time                C Byte(1)       R/W     3~255           20       The unit is 0.1 second, which means that the product responds to the alarm only after the alarm has exceeded the alarm angle for a certain period of time. 
+0x12   Alarm delay time                C Byte(1)       R/W     3~255           20      ZCT330M The unit is 0.1 second, which means that the product responds to the alarm only after the alarm has exceeded the alarm angle for a certain period of time. (mot used by ZCT330E, only ZCT330M) 
 
 0x13   Restore factory setting         C Byte(1)       R/W     0~255           0       0: Do nothing Non‐zero: Restore the non‐network‐related parameters of the sensor. 
-0x14   Server IP&port                  CCCCs 4*Byte(1)+Word(2) R/W             /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        The server address should be IP, not the domain name; using the domain name may cause the connection server to be unstable and cause data loss.
+0x14   Server IP&port                  CCCCs 4*Byte(1)+Word(2) R/W             /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        The server address should be IP, not the domain name; using the domain name may cause the connection server to be unstable and cause data loss. After the function is set, content of 0x34 will be cleared, if 0x14 and 0x34 is set at the same time, priority is given to 0x14 (passive upload)
 0x17   Signal strength                 C Byte(1)       R       10~34           /       A larger value indicates a stronger signal 
-0x18   Sensor operating mode           C Byte(1)       R/W     0               0       The sensor can only work in absolute measurement mode 
+0x18   Sensor operating mode           C Byte(1)       R/W     0               0       0: absolute angle, 1: relative angle, 2: vibration, ZCT330Mx sensor can only work in absolute measurement mode, ZCT330Ex supports all modes
 0x19   Alarm axis                      C Byte(1)       R       0~3             /       0: no alarm; 1: X‐axis alarm 2: Y axis alarm; 3: X/Y axis alarm at the same time 
 0x1A   SIM card ID                     Q QWord(8)      R       0~18446744073709551615  /       Take the first 19 digits, the last digit is discarded 
+0x1B   Alarm angle                     f Float(4)      R/W     0.06-30.00      5.0     ZCT330E relative mode, passive upload
+0x1C   Alarm trigger time              l Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
+0x1D   Static angle                    f Float(4)      R/W     0.06-30.00      2.5     ZCT330E relative mode, passive upload
+0x1E   Static trigger time             l Dword(4)      R/W     2-20            2       ZCT330E relative mode, passive upload
+0x1F   Acquisition interval            l Dword(4)      R/W     1-2160000       60      ZCT330E absolute mode, passive upload
+0x20   Failure retransmission          l Dword(4)      R/W     20-2160000      3600    ZCT330E absolute mode, passive upload
 0x21   Heartbeat interval              l DWord(4)      R/W     60~131071       86400   Interval at which the device periodically uploads data to the server 
 0x22   IMEI number of the device       Q QWord(8)       R      0~18446744073709551615  /       Refers to the IMEI of the NB‐IOT network module in the product. 
-0x23   Backup server IP&port           CCCCs 4*Byte(1)+Word(2) R/W     /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        / 
+0x23   Backup server IP&port           CCCCs 4*Byte(1)+Word(2) R/W     /       CTIOT:117.60.157.137,5683 MQTT:0.0.0.0,0        / if set, clears 0x3b, if 0x23 and 0x3b are set at same time, 0x23 has priority
 0x24   Backup server enable            C Byte(1)       R/W     0~255   0       0 means off, non‐zero means on 
 0x33   DNS IP address                  CCCC 4*Byte(1)  R/W     /       208.67.222.222  / 
-0x34   Domain name and port            a* 64*Byte(1)   R/W     /       mqtt.zc‐sensor.com,1883       Supports CTIOT and MQTT protocols. Priority IP in the case of IP (ID number 0x14); domain name and port should be separated with comma, length <=64 
+0x34   Domain name and port            a* 64*Byte(1)   R/W     /       mqtt.zc‐sensor.com,1883       Supports CTIOT and MQTT protocols. Priority IP in the case of IP (ID number 0x14); domain name and port should be separated with comma, length <=64, cleared by setting 0x14
 0x35   MQTT‐ClientID                         a* 32*Byte(1)   R/W      /      IMEI number of the device       Length <=32, subject to MQTT related specifications 
 0x36   MQTT‐Username                         a* 32*Byte(1)   R/W     /       empty           Length <=32, subject to MQTT related specifications 
 
@@ -147,7 +155,14 @@ __DATA__
 0x38   MQTT‐published topic name     a* 128*Byte(1)  R/W     /       Inclinometer/ZCT330Mx_SWP_N_YK/IMEI/up  Length <=128, subject to MQTT related specifications 
 0x39   MQTT‐subscribed topic name    a* 128*Byte(1)  R/W     /       Inclinometer/ZCT330Mx_SWP_N_YK/IMEI/down        Length <=128, subject to MQTT related specifications 
 0x3A   Set relative zero command       C Byte(1)       R/W     0~255   0               0: absolute angle mode 1: Set the current position to zero, relative angle mode (0x09, 0x0A content will be set to the current angle), Other values are invalid. 
-0x3B   Backup server domain name and port      a* 64*Byte(1)   R/W     /       mqtt.zc‐sensor.com,1883       Supports CTIOT and MQTT protocols. In the case of backup IP, the IP is preferentially backed up; the domain name and port are distinguished by commas, and the length is <=64. 
-0x3D   Protocol type                   C Byte(1)       R/W     0~255   CTIOT   0:CTIOT 1:MQTT Other values are invalid. 
-0x44   Alarm angle                     f Float(4)      R/W     ‐90°~90°    3°     X/Y axis alarm angle is consistent 
+0x3B   Backup server domain name and port      a* 64*Byte(1)   R/W     /       mqtt.zc‐sensor.com,1883       Supports CTIOT and MQTT protocols. In the case of backup IP, the IP is preferentially backed up; the domain name and port are distinguished by commas, and the length is <=64. , will be cleared if 0x23 is set
+0x3D   Protocol type                   C Byte(1)       R/W     0~1     CTIOT   0:CTIOT 1:MQTT Other values are invalid. 
+0x3E   Alarm angle                     f Float(4)      R/W     0.06-30.00      2.0     ZCT330E vibration mode, passive upload
+0x3F   Alarm trigger time              l Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
+0x40   Static angle                    f Float(4)      R/W     0.06-30.00      1.0     ZCT330E vibration mode, passive upload
+0x41   Static trigger time             l Dword(4)      R/W     80-20000        240     ZCT330E vibration mode, passive upload (trigger time in ms)
+0x42   Heartbeat interval              l DWord(4)      R/W     60~2160000      86400   ZCT330E (unit: s) vibration mode, Interval at which the device periodically uploads data to the server 
+0x43   Failure retransmission          l Dword(4)      R/W     20-2160000      3600    ZCT330E (unit: s) vibration mode, passive upload
+0x44   Alarm angle                     f Float(4)      R/W     ZCT330M:‐90°~90°,ZCT330E:0.06-30.00         ZCT330M:3°,ZCT330E:5.0         X/Y axis alarm angle is consistent, ZCT330E in absolue mode, passsive upload 
+0x45   Alarm trigger time              l Dword(4)      R/W     0-3600          0       ZCT330E Sensor waiting time for the server to issue a command (s), passive upload