Closed Network

OS3.5.0 or later

Local Connect mode is used in environments where obniz devices cannot be connected to the cloud, such as closed networks.

Use without cloud

This local connect mode is the way to use obniz in environments where you want to use obniz devices with JavaScript, etc., but cannot go to the Internet.

The obnizOS has a function called Local Connect that receives commands from the local network while connecting to the cloud.

Local Connect mode allows you to use obniz.js functions (IO and BLE operations) except for cloud-related functions.

// Javascript Full Example

var obniz = new Obniz("192.168.0.100");
obniz.onconnect = async function() {
  console.log(`Connected to obniz device`);
}

Operating conditions

The following conditions are required for use

Target Conditions
Supported Networks Wi-Fi, Ethernet, (Wi-Fi MESH is not supported in OS3.5.0)
Network Settings Requires a fixed IP or fixed IP on a DHCP server
TCP You need to be able to access port 80 on the device
TLS Unlike communication with the cloud, this communication is unencrypted.
SDK IPv4 address of the device must be specified in obniz.js, not obnizID.

There are a few other limitations due to the lack of a cloud

  • You can't check if you are online in the cloud. It is not possible to remove local access from the cloud.
  • Programs using obniz.js must be run on the same network (within the range of IPv4 TCP communication to the device).
  • OTA also needs to be performed from the same network.

How to use

Please contact us using the contact form.