title: script baytech-ds71-md subject: Trying to control remote control power outlets via baytech-ds71-md and shell script # # minicom: trun on socket 4 # minicom ;;;;; 5 on 4 y ;;;;; #------------------------------------------------------------- # With expect, I have a little problem. # If the terminal interface is already in menue '5' this works #------------------------------------------------------------- #------ Power Off socket 4 ------ expect -d spawn cu -l /dev/ttyUSB0 -s 9600 sleep 1 send "off 4\r\n" sleep 1 send "y\r\n" exit #------ Power On socket 4 ------- expect -d spawn cu -l /dev/ttyUSB0 -s 9600 sleep 1 send "on 4\r\n" sleep 1 send "y\r\n" exit #-------------------------------- Still working on how to make it work from main menu.