You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In touch panel controller there is a API frame communication listed below...
we cant able to receive the defined data, I getting error value while receiving as serial.
Switch Numbering
In the products variants with fan controller, switch (node) number for fan is 1 and rest of non-dimmable
node is starting from 2 in horizontal zigzag pattern.
API frame format.
In API frame structure following is the fixed definition of any command frame
Every first byte of frame is fixed 0x7B (“{” in ASCII, 123 in decimal).
Every second byte of frame is ‘command type’ byte, it informs what you need to do with rest
of the data. This will act as a frame Identifier in the data received from touch panel (response
frame and event frame)
Third byte is length of frame. It is 1-byte value (L - 4) where L is total numbers of bytes of
whole frame.
Second Last byte is checksum. Checksum is a lower byte of addition of whole individual
bytes of frame except First byte (Start byte), Second byte (Command type byte),
Second Last byte (Checksum byte itself) and Last byte is 0x7D.
Last byte is 0x7D, it is End code to indicate the end of frame. (“}” in ASCII, 125 in
decimal).
For Example, consider following frame.
So the checksum will be lower byte of addition of third byte and fourth byte.
0x02 + 0x05 = 0x07 so we will consider 0x07 as checksum here.
Example 2, consider following frame.
Table 1.2 Frame example 2.
1st Byte 2nd Byte 3rd Byte 4th Byte 5th Byte 6th Byte 7th Byte 8th Byte
0x7B 0x52 0x04 0x02 0xFF 0x14 0x19 0x7D
Start Code Identifier Length Data Data Data Checksum End Code
In this example 2 the checksum will be lower byte of addition of third to sixth byte.
0x04 + 0x02 + 0xFF + 0x14 = 0x0119 so we will consider 0x19 as checksum here.
Command package to update individual single node.
Command
Following is the command to change the status on touch board for individual single node.
Table 1.3 Command package for individual single nodes.
1st 2nd 3rd 4th 5th 6th 7th 8th
0x7B 0x00 0x04 (0x01 to0xNN) (0x00 for ON and0xFF for OFF) (0x00 to 0x64) CHECKSUM 0x7D
*0xNN depends on number of total nodes
In this frame 4th byte is the node number, 5th byte is On and OFF status and 6th byte is dimming value.
For Fan as well as dimmer, dimming value is in step of 25s.
The touch module should respond an acknowledgement package for this frame Table 1. as described
in the next table. In case of curtain to open the curtain the value of node will be 0x01 to open the
curtain and the value of node will be 0x02 to close the curtain. In both the case the value of status is
0x00. To stop the curtain rotating in between pass the value of status with 0x00.
(Response) Acknowledgement package.
This acknowledgement package is as response of command has been successfully executed or not.
This acknowledgement will be transmitted when individual node has been updated. (as described in
section 1.4). 4th Byte (Node No) is available in hardware version 0x41 onwards.
In touch panel controller there is a API frame communication listed below...
we cant able to receive the defined data, I getting error value while receiving as serial.
UART configuration
Baud Rate : 9600
Parity : None
Data Bits : 8
Stop Bits : 1
Switch Numbering
In the products variants with fan controller, switch (node) number for fan is 1 and rest of non-dimmable
node is starting from 2 in horizontal zigzag pattern.
API frame format.
In API frame structure following is the fixed definition of any command frame
Every first byte of frame is fixed 0x7B (“{” in ASCII, 123 in decimal).
Every second byte of frame is ‘command type’ byte, it informs what you need to do with rest
of the data. This will act as a frame Identifier in the data received from touch panel (response
frame and event frame)
Third byte is length of frame. It is 1-byte value (L - 4) where L is total numbers of bytes of
whole frame.
Second Last byte is checksum. Checksum is a lower byte of addition of whole individual
bytes of frame except First byte (Start byte), Second byte (Command type byte),
Second Last byte (Checksum byte itself) and Last byte is 0x7D.
Last byte is 0x7D, it is End code to indicate the end of frame. (“}” in ASCII, 125 in
decimal).
For Example, consider following frame.
Table 1.1 Frame example 1.
1st Byte 2nd Byte 3rd Byte 4th Byte 5th Byte 6th Byte
0x7B 0x03 0x02 0x05 0x07 0x7D
Start Code Command Length Data Checksum End Code
So the checksum will be lower byte of addition of third byte and fourth byte.
0x02 + 0x05 = 0x07 so we will consider 0x07 as checksum here.
Example 2, consider following frame.
Table 1.2 Frame example 2.
1st Byte 2nd Byte 3rd Byte 4th Byte 5th Byte 6th Byte 7th Byte 8th Byte
0x7B 0x52 0x04 0x02 0xFF 0x14 0x19 0x7D
Start Code Identifier Length Data Data Data Checksum End Code
In this example 2 the checksum will be lower byte of addition of third to sixth byte.
0x04 + 0x02 + 0xFF + 0x14 = 0x0119 so we will consider 0x19 as checksum here.
Following is the command to change the status on touch board for individual single node.
Table 1.3 Command package for individual single nodes.
1st 2nd 3rd 4th 5th 6th 7th 8th
0x7B 0x00 0x04 (0x01 to0xNN) (0x00 for ON and0xFF for OFF) (0x00 to 0x64) CHECKSUM 0x7D
*0xNN depends on number of total nodes
In this frame 4th byte is the node number, 5th byte is On and OFF status and 6th byte is dimming value.
For Fan as well as dimmer, dimming value is in step of 25s.
The touch module should respond an acknowledgement package for this frame Table 1. as described
in the next table. In case of curtain to open the curtain the value of node will be 0x01 to open the
curtain and the value of node will be 0x02 to close the curtain. In both the case the value of status is
0x00. To stop the curtain rotating in between pass the value of status with 0x00.
This acknowledgement package is as response of command has been successfully executed or not.
This acknowledgement will be transmitted when individual node has been updated. (as described in
section 1.4). 4th Byte (Node No) is available in hardware version 0x41 onwards.
Status Success
1st 2nd 3rd 4th 5th 6th 7th
0x7B 0x50 0x03 0x01 0x00 CHECKSUM 0x7D
Status Error
1st 2nd 3rd 4th 5th 6th 7th
0x7B 0x50 0x03 (0x01 to0xNN) 0xFF CHECKSUM 0x7D
Can you help me out... I just used to read the data from the Controller , how to read the data properly...
Have used bytes read options but the value is not correct..
I will enclose the code I have used to get serial..
enter code here//
const byte startMarker = 0x7B;
const byte messageLength = 12 ;
byte receivedBytes[messageLength + 1]; //include start marker
boolean newData = false;
OUTPUT:
11:14:22.237 -> 55
11:14:22.237 -> AA
11:14:22.237 -> 3
11:14:22.237 -> 7
11:14:22.237 -> 0
11:14:22.237 -> 5
11:14:22.237 -> 2
11:14:22.237 -> 1
11:14:22.237 -> 0
11:14:22.237 -> 1
11:14:22.237 -> 1
11:14:22.237 -> 13
The text was updated successfully, but these errors were encountered: