Skip to content
SensorNode-client application for IOTA.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
utils addSource() doesnt create an array anymore, data is one single object… May 13, 2018
.gitignore Update .gitignore May 1, 2018
LICENSE Update Nov 12, 2018
app.js addSource() doesnt create an array anymore, data is one single object… May 13, 2018
package-lock.json Added package files May 1, 2018
package.json updated readme and startup script May 10, 2018


SensorNode-client application for IOTA.

Either data is being pushed to Tangle or send as Masked Authenticated Message, or both.

(Image by Wyn Tiedmers)


Clone this repository:

git clone

Install node_modules:

cd SensorNode/
npm install

Install mam.node.js:

cd node_modules/
git clone

Creating streams:

You can create streamobjects with the following parameters:

Parameter Function Default
host (Remote-) node we're connecting to.
port Iota-api port on the node. 14265
id Identifies the streamobject. "SensorNode"
location Nodes location, eg. 'lat': 52.26 'lng': 13.42. {'lat': 40.65, 'lng': -73.91}
seed Seed for creating transactions/MAM-messages. [generated]
rec Receiving address (tanglestream only). "GPB9PBNCJTPGF..."
tag Tag for Transactions (tanglestream only). "SENSORNODEROCKS"
depth Depth for tip-selection (tanglestream only). 3
wait Discards packets till the current packet has been send. true
fetch Enable continuous fetching from MAM-root when multiple nodes stream from the same seed (mamstream only). false

First Stream (TANGLE):

streams.push(new STREAM ({
  'host': 'http://[remote node / localhost]',
  'port':  [port]



Second Stream (MAM):

streams.push(new MAM_STREAM ({
  'host': 'http://[remote node / localhost]',
  'port':  [port]



Add data sources

Data sources are (async) functions which return the data you want to stream, eg:

async function functionFoo () {
	return await;
async function functionBar () {
	return await;

Cool! Whats next?

Run with npm start [delay] where delay specifies a timeout between each push (default 60 seconds).

Thats it. Have fun providing data over the iota protocol. ;)

You want to donate?


You can’t perform that action at this time.