Skip to content

wotcity/simple-websocket-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-websocket-broker

It is a biolerplate for writing a simple WebSocket broker server. simple-websocket-broker is a WebSocket broker (channel) server for IoT devices. It aims to help makers making Internet of Personal Things.

  1. Install
  2. Usage
  3. Discussion
  4. How To Report Bugs
  5. Authors

Install

  1. Download simple-websocket-broker.
  2. Run $ cd simple-websocket-broker to change the directory.
  3. Run $ npm install to install the dependencies if you don't already have them.
  4. Run $ node index.js to start the broker server.

Please try ws://wot.city at WoT.City first before you start your own IoT cloud.

Prerequisites

  1. Node.js. Note: Node should be with a version above 0.10.x.

Usage

To send the data over the Internet, IoT devices should use the url below to establish a connection with the server.

ws://[hostname]/object/[name]/send

You must specify an object name and your hostname. For example:

ws://wot.city/object/554785c7173b2e5563000007/send

To receive data from the server, the frontend should use the url below to establish a connection with the server.

ws://[hostname]/object/[name]/viewer

Also, you need to specify the object name and hostname. For example:

ws://wot.city/object/554785c7173b2e5563000007/viewer

An physical object has two significant resources, send and viewer. send is to send device data to WoT.City, and WoT.City receives data streams over Websocket connection. viewer is used by frontend to receive real-time data over the connection.

dotcity-websocket-broker is a broker that it receives sensor data over Websocket connection and routes data streams to frontend Websocket clients.

Discussion

There are various ways to get involved with Simple Websocket Broker. We're looking for help identifying bugs, writing documentation and contributing codes.

Most of the Simple Websocket Broker developers, users and contributors are at WeChat group or IRC channel. You can find us in the #wotcity IRC channel on irc.freenode.net. You can get information of how to join WeChat group at #wotcity.

How to Report Bugs

Bugs are reported via https://github.com/wotcity/simple-websocket-broker.

License

Apache License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published