Sending custom commands and scripts to devices