Learn JS Automatic reboot and reload - aliconnect/aliconnect.sdk GitHub Wiki

Automatic reboot and reload control software

Configure automatic donwload of software.

Edit the control.json configuration file

{
  "require" : {
    "control" : "http://192.168.0.201:80/sources/control.js"
  }
}

At boot up this file is downloaded with a HTTP request and saved in the root folder. It will be required.

Automatic reboot

http.request ({ url: "http://192.168.0.135/reboot()" }, function() {
  console.log('Control reboot executed');
});

or

ws.request ({ url: "http://192.168.0.135/reboot()" }, function() {
  console.log('Control reboot executed');
});