Closed Network

If the device is running in a configuration that does not connect to the cloud (Local Connect Mode), the connection with obnizID will not be available; instead of ID, specify IP address (IPv4).

// Javascript Full Example

var obniz = new Obniz("192.168.0.100");
obniz.onconnect = async function() {
  
}

Reset behavior

The device will be reset by being disconnected from the program as in the cloud usage.

As with the cloud version, you can turn off resetting when disconnected from javascript with the following command.

obniz.resetOnDisconnect(false);

Like the cloud version, you can also turn off the reset when the device disconnects from a network such as Wi-Fi with the following command.

// Javascript Full Example
obniz.keepWorkingAtOffline(true);