obniz.js Installation

obniz.js is obniz sdk for JavaScript. This let you to connect an obniz via the internet.

This SDK cover all cloud supported API. You can connect an obniz just providing id, write a program similar to writing a firmware on JavaScript.

Features

  • Covering obniz Cloud WebSocket API
  • parts library
  • local connect to connect to an obniz automatically in local network
  • Compressed format communication
  • HTML debugging support
  • Browser/Nodejs
  • async/await

And it's all codes are published on Github.

https://github.com/obniz/obniz

obniz.js is managed on Github and npm.
It is updating frequently.
You can check which version available and features of an version on Github.

https://github.com/obniz/obniz/releases

Install

Installation is different in browser/Node.js

Browser

Access npm hosted obniz.js via unpkg.
For example, to include obniz.js version 1.0.0

<script src="https://unpkg.com/obniz@1.0.0/obniz.js"></script>

That's all. Obniz is available on global scope.
No other dependencies.

Node.js

Use npm to install.

npm install obniz

And then, require it on your JavaScript.

const Obniz = require('obniz');

Obniz is obniz class. It can be instantiate by providing obniz id to connect.
See more details on next lesson.



Next : Connection and communication with obniz