http Play offline dmx file, command: pall: Play offline playlist file (You need to make a playlist file first, In webui Offline page, it is easy to create playlist files by dragging and dropping the file name)
http Play LED Effect: Command like this: http://2.0.0.44/cmd?eff=eff_cmd%arg ➽ eff_cmd is effect function command, arg is value for eff_cmd
play: Play effect of index number ➼ http://2.0.0.44/cmd?eff=playXX
➽
XX = 0-53, effect index number
Play effect 9 : http://2.0.0.44/cmd?eff=play9
Play effect 32 : http://2.0.0.44/cmd?eff=play32
pall : Auto Play all effect ➼ http://2.0.0.44/cmd?eff=pall
➽
stop : Stop Playing effect ➼ http://2.0.0.44/cmd?eff=stop
➽
brig: Set Brightness ➼ http://2.0.0.44/cmd?eff=brigXXX
➽
XXX = 0-255
Set Brightness to 252 : http://2.0.0.44/cmd?eff=brig252
Set Brightness to 90 : http://2.0.0.44/cmd?eff=brig90
sped: Set Speed ➼ http://2.0.0.44/cmd?eff=spedXXX
➽
XXX = 0-255
Set Speed to 220 : http://2.0.0.44/cmd?eff=sped220
rgb: Set RGB Color ➼ http://2.0.0.44/cmd?eff=rgb%R%G%B
➽
R = 0-255
G = 0-255
B = 0-255
Set RGB(78,129,250): http://2.0.0.44/cmd?eff=rgb%78%129%250
rgbw: Set RGBW Color ➼ http://2.0.0.44/cmd?eff=rgbw%R%G%B%W
➽
R = 0-255
G = 0-255
B = 0-255
W = 0-255
Set RGBW(210,70,20,255): http://2.0.0.44/cmd?eff=rgbw%210%70%20%255
flag: Set LED Strip is RGB or RGBW flag ➼ http://2.0.0.44/cmd?eff=flagX
➽
X = 0 LED Strip is RGB (3 channels)
X = 1 LED Strip is RGBW (4 channels)
Set LED Strip to RGBW: http://2.0.0.44/cmd?eff=flag1
Set LED Strip to RGB : http://2.0.0.44/cmd?eff=flag0 / (default is RGB)
dire: Set Run Direction ➼ http://2.0.0.44/cmd?eff=direX
➽
X = 0 Normal run
X = 1 Invert run
Set LED invert run: http://2.0.0.44/cmd?eff=dire1
Set LED normal run: http://2.0.0.44/cmd?eff=dire0 / (default is normal run)
outp: Set effect out to this Port ➼ http://2.0.0.44/cmd?eff=outpX
➽
Note: LED effect default out to PORT0(fixed), if want out to other PORT1-3, must set to port bit.
X = PORT1-3 bit flag, 0b111=PORT3,PORT2,PORT1 / (0b111)=7 All PORT, (0b0100)=4 PORT3, (0b011)=3 PORT2 PORT1, (0b010)=2 PORT2, (0b001)=1 PORT1, (0b000)=0 close PORT0-3, not out set bit=0
Set LED effect out to all PORT: http://2.0.0.44/cmd?eff=outp7 / (default is to all PORT)
Set LED effect out to PORT2, PORT1: http://2.0.0.44/cmd?eff=outp3 / (Note: LED effect default out to PORT0, so out3 = effect out to PORT0, PORT1, PORT2)
patc: Set RGB fixture lib Patch ➼ http://2.0.0.44/cmd?eff=patcX
➽
X = 0-5 / RGB=0 RBG=1 GBR=2 GRB=3 BRG=4 BGR=5
LED Strip is GBR: http://2.0.0.44/cmd?eff=patc2
LED Strip is RBG: http://2.0.0.44/cmd?eff=patc1
LED Strip is RGB: http://2.0.0.44/cmd?eff=patc0 ( Note: default is RGB )
leng: Set Led pixel length ➼ http://2.0.0.44/cmd?eff=lengXXX
➽
XXX = 0-170 / one segment led pixels, RGB max=170, RGBW max=128
Set LED one segment have 64 pixels: http://2.0.0.44/cmd?eff=leng64
Note: one 512 channels can link RGB 170 pixels, if one segment set 64 pixels, Box will auto make 170/64=2 segment, and last 42 pixels as one segment, total 3 segment, each segment effect is same.
time: Set Effect Run time ➼ http://2.0.0.44/cmd?eff=timeXXXXX
➽
XXXX = 0-65535 / Run Time = XXXX/2 second
Set Effect Run time 30s: http://2.0.0.44/cmd?eff=time60
clra: Clear Off All LED ➼ http://2.0.0.44/cmd?eff=clra
➽
http Reboot Box: Command is fixed, like this: ➽
A0: Set effect config (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 sub_universe net A0 rgbw patch led_pixel_len port invert
rgbw: RGB=0, RGBW=1
patch: RGB=0 RBG=1 GBR=2 GRB=3 BRG=4 BGR=5
led_pixel_len: one segment led pixel len, RGB max=170, RGBW max=128
port: led effect default out to PORT0(fixed), if want out to other port, must set to port bit, 0b111=PORT3,PORT2,PORT1, =7 all PORT, =4 PORT3, =3 PORT2 PORT1, =2 PORT2, =1 PORT1
invert: LED run direction, normal=0, invert=1
A1: Play effect (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A1 effect_index
effect_index = 0-53 (have 54 number effect) / effect_index = 0xFA auto play all
A1:Auto Play all effect (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A1 FA
effect_index = 0xFA (Auto Play all effect)
44: Stop Play (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF 44
A2: Set Brightness (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A2 Brightness
Brightness = 0-255 (HEX: 00-FF)
A3: Set Speed (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A3 Speed
Speed = 0-255 (HEX: 00-FF)
A4: Set RGB Color (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A4 R G B
R = 0-255 (HEX: 00-FF)
G = 0-255 (HEX: 00-FF)
B = 0-255 (HEX: 00-FF)
A5: Set RGBW Color (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A5 R G B W
R = 0-255 (HEX: 00-FF)
G = 0-255 (HEX: 00-FF)
B = 0-255 (HEX: 00-FF)
W = 0-255 (HEX: 00-FF)
A6: Set LED RGBW flag (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A6 flag
flag = 0 LED Strip is RGB (3 channels)
flag = 1 LED Strip is RGBW (4 channels)
A7: Set Run Direction (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A7 Invert
Invert = 0 Normal run
Invert = 1 Invert run
A8: Set effect out to this Port (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A8 port
port: 0b111=PORT2,PORT1,PORT0 / =7 All PORT2,1,0, =6 PORT2 PORT1, =5 PORT2 PORT0, =4 PORT2, =3 PORT1 PORT0, =2 PORT1, =1 PORT0(default out)
A9: Set RGB Patch (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF A9 Patch
patch: RGB=0 RBG=1 GBR=2 GRB=3 BRG=4 BGR=5
AA: Set Led pixel len (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF AA len
len: one segment led pixels, RGB max=170, RGBW max=128
AB: Set Run time (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF AB time_L time_H
Run time = (time_H * 256 + time_L)/2 Second
AC: Off All LED (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF AC
B0: For one Channel auto FADE (HEX): 48 61 68 61 6E 31 32 33 00 FF C7 00 FF FF B0 PORT Channel_L Channel_H Fade_Time Gap_Value End_Value CC(Fixed value)
PORT: 0,1,2,3 / 4(will out all PORT0,1,2,3), this value not above 4
Channel_L: 0~255
Channel_H: 0 or 1, if channels above 255, then this value is 1, DMX Channel(0~511)=Channel_H*256+Channel_L
Fade_Time: 25ms~255ms, Every this time, FADE will be change once, don't below 25
Gap_Value: 1~255, the value of the FADE increases or decreases each Fade_Time, It is recommended that this value should not be greater than 20
End_Value: 0~255, FADE to this value will stop
Fixed value: CC
Pleae Note: that whether the FADE increases or decreases depends on the original DMX value, if the original value is greater than the End_Value, the FADE will decrease, if it is less than, the FADE will increase.
Example (UDP send this string to Box IP(2.0.0.44) or Broadcast(2.0.0.255) / Destination Port: 0x1975(6517)):
Play "demo.dmx" file: Hahan123?=@Pdemo.dmx
Play playlist file at default loop: Hahan123?=@A
Play playlist file at loop 100: Hahan123?=@A100
Set loop value to 1234: Hahan123?=@L1234
Clear loop: Hahan123?=@L0
Stop play: Hahan123?=@S
Example:
UDP send string to: Broadcast IP=2.0.0.255, Source Port: 0x1A85(6789), Destination Port: 0x1975(6517), String: Hahan123?=HELLO
You will get string: OK=2.0.0.44, if get OK=... then can check box is online, if have many box connected LAN, then will find all box.
Example:
UDP send string to: Broadcast IP=2.0.0.255, Destination Port: 0x1975(6517), String: Hahan123?=REBOOT
All in 2.x.x.x network segment box will reboot, if IP=2.0.0.44, only this 2.0.0.44 box will reboot.
C0: Set PORT 512 channels all to this dmx value, (HEX): C0 PORT value
Set PORT0 all 512 channel to 255: C0 00 FF
Clear PORT1 all 512 channel to 0: C0 01 00
Set PORT0,1,2 all 512 channel to 128: C0 03 80 (if PORT set to 03, dmx value will out all PORT, PORT0,1,2 all value is same)
C1: Set PORT low 256 channels address to this dmx value, (HEX): C1 PORT Low_add value / ( Note: address count starts at 0, not from 1 )
Set PORT2 220 channel to 178: C1 02 219 178 (Please note: channel address 219 is 220-1, 219 and 178 need change to HEX)
Set PORT0 16 channel to 255: C1 00 15 255
Set PORT0,1,2 all 47 channel to 128: C1 03 47 128 (if PORT set to 03, dmx value will out all PORT, Please note: 47 and 128 need change to HEX)
C2: Set PORT High 256 channels address to this dmx value, (HEX): C2 PORT High_add value / ( Note: High_add value is 0-255, but box will auto add 256, so channel address will change to 256-511 )
Set PORT1 301 channel to 100: C2 01 44 100 / ( dmx address starts at 0, so dmx address 301 in box is 300, 44=300-256 )
Set PORT0 512 channel to 200: C2 00 255 200 /( address=512, in box is 511, 255=511-256(auto add) )
C3(Low_add)/C4(High_add): Fixture Move to X, Y point, (HEX): C3/C4 PORT ChX_add, X_value, ChY_add, Y_value / ( Note: C4 is High_add, box will auto add 256 )
For Example: PORT0 have a Moving head, address set to 1, channel 3 is Pan, channel 5 is Tilt
fixture Move to X=127, Y=200 point: C3 00 02 127 04 200 / [ Note: address count starts at 0, not from 1, C3(cmd) 00(PORT0) 02(X channel add 3-1) 127(X value) 04(Y channel add 5-1) 200(Y value) ]
if this fixture address set to 288, Move to X=64, Y=251 point, High_add use C4: C4 00 (288-256+02) 64 (288-256+04) 251
C5(Low_add)/C6(High_add): PUSH PORT Low_High_add ch1 ch2 ch3 ...., (HEX): C5/C6 PORT Low_High_add, ch1 ch2 ch3 ... / ( Note: C6 is High_add, box will auto add 256 )
PORT1 have two Moving head, address set to 16 and 48, this fixture have 20 channels, now set those two fixture:
C5 01(PORT1) 15(address) ch1_dmx_value ch2_dmx_value ... ch20_dmx_value / ( Note: address count starts at 0, address 16 is 15 )
C5 01(PORT1) 47(address) ch1_dmx_value ch2_dmx_value ... ch20_dmx_value / ( Note: ch number max=99 ch1...ch99, don't above 99 )
A1: Play effect (HEX): C7 A1 effect_index
effect_index: 0~53 or 0xFA(Auto Play All)
Play effect 9 (HEX): C7 A1 09
Auto Play all effect (HEX): C7 A1 FA
44: Stop Play effect (HEX): C7 44
A2: Set Brightness (HEX): C7 A2 Brightness
Brightness = 0-255 (HEX: 00-FF)
A3: Set Speed (HEX): C7 A3 Speed
Speed = 0-255 (HEX: 00-FF)
A4: Set RGB Color (HEX): C7 A4 R G B
R = 0-255 (HEX: 00-FF)
G = 0-255 (HEX: 00-FF)
B = 0-255 (HEX: 00-FF)
A5: Set RGBW Color (HEX): C7 A5 R G B W
R = 0-255 (HEX: 00-FF)
G = 0-255 (HEX: 00-FF)
B = 0-255 (HEX: 00-FF)
W = 0-255 (HEX: 00-FF)
A6: Set LED RGBW flag (HEX): C7 A6 flag
flag = 0 LED Strip is RGB (3 channels)
flag = 1 LED Strip is RGBW (4 channels)
A7: Set Run Direction (HEX): C7 A7 Invert
Invert = 0 Normal run
Invert = 1 Invert run
A8: Set effect out to this Port (HEX): C7 A8 port
port: 0b111=PORT2,PORT1,PORT0 / =7 All PORT2,1,0, =6 PORT2 PORT1, =5 PORT2 PORT0, =4 PORT2, =3 PORT1 PORT0, =2 PORT1, =1 PORT0(default out)
A9: Set RGB Patch (HEX): C7 A9 Patch
patch: RGB=0 RBG=1 GBR=2 GRB=3 BRG=4 BGR=5
AA: Set Led pixel len (HEX): C7 AA len
len: one segment led pixels, RGB max=170, RGBW max=128
AB: Set Run time (HEX): C7 AB time_L time_H
Run time = (time_H * 256 + time_L)/2 Second
AC: Off All LED (HEX): C7 AC
B0: For one Channel auto FADE in / out (HEX): C7 B0 PORT Channel_L Channel_H Fade_Time Gap_Value End_Value
PORT: 0,1,2 / 3(will out all PORT0,1,2), this value not above 3, PORT3 for RS485 hardware interface
Channel_L: 0~255
Channel_H: 0 or 1, if channels above 255, then this value is 1, DMX Channel(0~511)=Channel_H*256+Channel_L
Fade_Time: 25ms~255ms, Every this time, FADE will be change once, don't below 25
Gap_Value: 1~255, the value of the FADE increases or decreases each Fade_Time, It is recommended that this value should not be greater than 20
End_Value: 0~255, FADE to this value will stop
Pleae Note: that whether the FADE increases or decreases depends on the original DMX value, if the original value is greater than the End_Value, the FADE will decrease, if it is less than, the FADE will increase.
Example:
Play "Test123.dmx" file: @pTest123.dmx
Play playlist file at default loop: @A
Play playlist file at loop 20: @A20
Set loop value to 77: @L77
Clear loop: @L0
Stop play: @S
For Example:
1: If box dmx address set=1, You want play dmx file in playlist index=3, loop 5 times:
In your dmx consoler, patch 3 channels fixture light library to dmx address=1, then channel3 push to 5, channel2 push to 3, channel1 push to 11 (10-249 any value), SL04 box then will play index=3 dmx file loop 5 times.
2: Next time, If you want play dmx file in playlist index=7, loop 0 times:
In your dmx consoler, channel3 push to 0, channel2 push to 7, channel1 push to 10-249 value, like 20, the new value cannot be equal to the old value(11), SL04 box then will play index=7 dmx file once.
3: Next time, If you want play all dmx file in playlist, loop 200 times:
In your dmx consoler, channel3 push to 200, channel2=start play file's index value, if this value above playlist file index, will play from the first dmx file, channel1 push to 255, SL04 box then will play all dmx file in playlist loop 200 times.
4: If you want stop the playing:
In your dmx consoler, channel3 not care, channel2 not care, channel1 push to 0-9 value, like 0, SL04 box then will stop playing.
5: Please note: For any different operation, channel 1 must change the current value, and the new value cannot be equal to the old value, the time for any different operation cannot be less than 500ms, so the dmx value does not need to be set to the FADE value.
Way1 Example source code, web files save in box's TF card:
your.html source code:
<html>
<head>
<script src="../sdk.js"></script>
<script src="./your.js"></script>
</head>
<body>
This is a WebSDK for test! files save in remote box's TF card.
<button onclick="test()"> Send to Box </button>
</body>
</html>
your.js source code:
var dmxdata = [new Uint8Array(512), new Uint8Array(512),new Uint8Array(512),new Uint8Array(512)]; //4 PORT dmx buf;
function test(){
for(var n=0; n<4; n++){ //box have 4 PORT
for(var i=0; i<512; i++){ //each PORT have 512 channels
dmxdata[n][i] = i; //(byte) all dmx channels value loop to 0-255
}
senddmx(n, dmxdata[n]); //call box SDK function send to box
}
}
Please note:
Because the SL04 box has a lot of things to deal with, it is recommended that when calling the box web API, the time interval should be greater than 50ms to send a package, not too often, and leave some free time for the box to process other things.
Tips: RJ45 LAN port uses the DMA function, and the processing speed is faster than that of USB virtual network card, Therefore, it is better to use the LAN network port as much as possible.