i have been playing around reprogramming sonoff wifi switches to operate at my beck and call. it occurred to me that it would be a nice way to control
pumps, compressors exhaust fans etc from auggie without the need for any physical connection.
i can use the command line utility wget.exe
{wget "http://10.0.0.131/st?sw=4" } to send a command to the sonoff
can auggie script run an os shell ?
run dos bat file or cmd line (os shell) from auggie script
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: run dos bat file or cmd line (os shell) from auggie script
tried Exec, Execute , got nothing except the print message
Code: Select all
global AirButton = function()
{
print("airblow toggle");
Exec("c:\ctwin\s5.bat");
yield();
return;
};
-
Amazon [Bot]
- Full Member

- Posts: 185
- Joined: Tue Jan 06, 2026 4:56 pm
Re: run dos bat file or cmd line (os shell) from auggie script
found some examples:
system.Exec(path+file);
system.Exec("Notepad " + path + file);
try this:
system.Exec("c:\ctwin\s5.bat");
system.Exec(path+file);
system.Exec("Notepad " + path + file);
try this:
system.Exec("c:\ctwin\s5.bat");
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: run dos bat file or cmd line (os shell) from auggie script
YaNvrNo:
Good thing you remembered that, I knew there was something we added but couldnt
quite remember what..
Art
Good thing you remembered that, I knew there was something we added but couldnt
quite remember what..
Art
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: run dos bat file or cmd line (os shell) from auggie script
system.Exec("Notepad "
notepad works ok. but not my wget.exe , i will try locating it in the "PATH"
in the morning , its late here pumpkins everywhere
notepad works ok. but not my wget.exe , i will try locating it in the "PATH"
in the morning , its late here pumpkins everywhere
-
Richard Cullin
- Site Admin
- Posts: 152
- Joined: Sat Jun 02, 2012 4:45 pm
Re: run dos bat file or cmd line (os shell) from auggie script
thanks , works perfectly when executable is in the system PATH
I can now send this json udp packet to my sonoff switch and turn the exhaust duct fan on/off for the laser fume extractor
from the auggie console
Code: Select all
global AirButton = function()
{
print("airblow toggle");
system.Exec("sfk udpsend sonoff5:9889 {\"switch\":2}" );
yield();
return;
};