I followed this guide: https://www.domoticz.com/wiki/Yeelight
and manage to create working switches and dimmers.
In DZVents script example I can controll all my yeelight bulbs at once with
Code: Select all
port = '55443'
yeelights = {'192.168.1.30', '192.168.1.31', '192.168.1.32', '192.168.1.33', '192.168.1.34', '192.168.1.35', '192.168.1.36', '192.168.1.37', '192.168.1.38', '192.168.1.39'}
I dont know programming however I have found examples on this forum and made this working LUA/yeelight scene selector. Is it possible to make this LUA script with a single runcommand for a list of IPs instead of repeating every IP address for each scene?
Code: Select all
commandArray = {}
DomDevice = 'Yeelight Scene';
IP = '192.168.1.30';
PORT = '55443'
if devicechanged[DomDevice]=='Off' then -- turn off
runcommandoff0 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.30 " ..PORT.."";
runcommandoff1 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.31 " ..PORT.."";
runcommandoff2 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.32 " ..PORT.."";
runcommandoff3 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.33 " ..PORT.."";
runcommandoff4 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.34 " ..PORT.."";
runcommandoff5 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.35 " ..PORT.."";
runcommandoff6 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.36 " ..PORT.."";
runcommandoff7 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.37 " ..PORT.."";
runcommandoff8 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.38 " ..PORT.."";
runcommandoff9 = "sudo echo -ne '{\"id\":1,\"method\":\"set_power\", \"params\":[\"off\", \"smooth\", 500]}\\r\\n' | nc -w1 192.168.1.39 " ..PORT.."";
os.execute(runcommandoff0);os.execute(runcommandoff1);os.execute(runcommandoff2);os.execute(runcommandoff3);os.execute(runcommandoff4)
os.execute(runcommandoff5);os.execute(runcommandoff6);os.execute(runcommandoff7);os.execute(runcommandoff8);os.execute(runcommandoff9);
-- print(runcommandoff)
elseif devicechanged[DomDevice]=='Kelvin 2700' then -- turn to
runcommandkelvin27000 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandkelvin27001 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandkelvin27002 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandkelvin27003 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandkelvin27004 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandkelvin27005 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandkelvin27006 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandkelvin27007 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandkelvin27008 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandkelvin27009 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",2700,100]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandkelvin27000);os.execute(runcommandkelvin27001);os.execute(runcommandkelvin27002);os.execute(runcommandkelvin27003);os.execute(runcommandkelvin27004);
os.execute(runcommandkelvin27005);os.execute(runcommandkelvin27006);os.execute(runcommandkelvin27007);os.execute(runcommandkelvin27008);os.execute(runcommandkelvin27009);
-- print(runcommandkelvin2700)
elseif devicechanged[DomDevice]=='Kelvin 4300' then -- turn to
runcommandkelvin43000 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandkelvin43001 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandkelvin43002 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandkelvin43003 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandkelvin43004 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandkelvin43005 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandkelvin43006 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandkelvin43007 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandkelvin43008 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandkelvin43009 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",4300,100]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandkelvin43000);os.execute(runcommandkelvin43001);os.execute(runcommandkelvin43002);os.execute(runcommandkelvin43003);os.execute(runcommandkelvin43004);
os.execute(runcommandkelvin43005);os.execute(runcommandkelvin43006);os.execute(runcommandkelvin43007);os.execute(runcommandkelvin43008);os.execute(runcommandkelvin43009);
-- print(runcommandkelvin4300)
elseif devicechanged[DomDevice]=='Kelvin 6500' then -- turn to
runcommandkelvin65000 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandkelvin65001 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandkelvin65002 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandkelvin65003 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandkelvin65004 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandkelvin65005 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandkelvin65006 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandkelvin65007 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandkelvin65008 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandkelvin65009 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",6500,100]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandkelvin65000);os.execute(runcommandkelvin65001);os.execute(runcommandkelvin65002);os.execute(runcommandkelvin65003);os.execute(runcommandkelvin65004);
os.execute(runcommandkelvin65005);os.execute(runcommandkelvin65006);os.execute(runcommandkelvin65007);os.execute(runcommandkelvin65008);os.execute(runcommandkelvin65009);
-- print(runcommandkelvin6500)
elseif devicechanged[DomDevice]=='Alarm' then -- turn to
runcommandalarm0 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandalarm1 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandalarm2 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandalarm3 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandalarm4 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandalarm5 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandalarm6 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandalarm7 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandalarm8 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandalarm9 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"cf\",0,0,\"300,1,16711680,1,50,1,222,1,50,1,3355647,100,50,1,222,1,50,1,16711680,100,50,1,222,1,50,1,3355647,100,50,1,222,1\"]}\r\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandalarm0);os.execute(runcommandalarm1);os.execute(runcommandalarm2);os.execute(runcommandalarm3);os.execute(runcommandalarm4);
os.execute(runcommandalarm5);os.execute(runcommandalarm6);os.execute(runcommandalarm7);os.execute(runcommandalarm8);os.execute(runcommandalarm9);
-- print(runcommandalarm)
elseif devicechanged[DomDevice]=='Sunrise RGB' then -- turn to
runcommandsunrisergb0 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandsunrisergb1 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandsunrisergb2 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandsunrisergb3 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandsunrisergb4 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandsunrisergb5 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandsunrisergb6 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandsunrisergb7 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandsunrisergb8 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandsunrisergb9 = "sudo echo -ne '{\"id\":1,\"method\":\"start_cf\", \"params\":[\"cf\",3,1,\"50,1,16731392,1,360000,2,1700,10,540000,2,2700,100\"]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandsunrisergb0);os.execute(runcommandsunrisergb1);os.execute(runcommandsunrisergb2);os.execute(runcommandsunrisergb3);os.execute(runcommandsunrisergb4);
os.execute(runcommandsunrisergb5);os.execute(runcommandsunrisergb6);os.execute(runcommandsunrisergb7);os.execute(runcommandsunrisergb8);os.execute(runcommandsunrisergb9);
-- print(runcommandsunrisergb)
elseif devicechanged[DomDevice]=='Home RGB' then -- turn to
runcommandhomergb0 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandhomergb1 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandhomergb2 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandhomergb3 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandhomergb4 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandhomergb5 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandhomergb6 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandhomergb7 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandhomergb8 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandhomergb9 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"ct\",3200,80]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandhomergb0);os.execute(runcommandhomergb1);os.execute(runcommandhomergb2);os.execute(runcommandhomergb3);os.execute(runcommandhomergb4);
os.execute(runcommandhomergb5);os.execute(runcommandhomergb6);os.execute(runcommandhomergb7);os.execute(runcommandhomergb8);os.execute(runcommandhomergb9);
-- print(runcommandhomergb)
elseif devicechanged[DomDevice]=='Night Mode' then -- turn to
runcommandnightmode0 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.30 "..PORT .." ";
runcommandnightmode1 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.31 "..PORT .." ";
runcommandnightmode2 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.32 "..PORT .." ";
runcommandnightmode3 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.33 "..PORT .." ";
runcommandnightmode4 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.34 "..PORT .." ";
runcommandnightmode5 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.35 "..PORT .." ";
runcommandnightmode6 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.36 "..PORT .." ";
runcommandnightmode7 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.37 "..PORT .." ";
runcommandnightmode8 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.38 "..PORT .." ";
runcommandnightmode9 = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene\", \"params\":[\"color\",16750848,1]}\\r\\n' | nc -w1 192.168.1.39 "..PORT .." ";
os.execute(runcommandnightmode0);os.execute(runcommandnightmode1);os.execute(runcommandnightmode2);os.execute(runcommandnightmode3);os.execute(runcommandnightmode4);
os.execute(runcommandnightmode5);os.execute(runcommandnightmode6);os.execute(runcommandnightmode7);os.execute(runcommandnightmode8);os.execute(runcommandnightmode9);
-- print(runcommandnightmode )
end
return commandArray