iotdb-transport-fs

3.0.6 • Public • Published

iotdb-transport-fs

IOTDB Transporter for the File System

Stores on the Filesystem. Listens for changes to the Filesystem so this is pretty full featured Might need some tweaks for Windows.

About

This Transporter writes files to the file system in JSON, and should be able to detect if someone else writes to them.

Use

See the samples folder for working examples

Basic

Don't forget your subscribes! Most Transporter methods return RX Observables.

Note that the path to the prefix will be created.

const fs_transport = require("iotdb-transport-fs");
const fs_transporter = fs_transport.make({
    prefix: "some-path",
});

fs_transport.put({
    id: "light",
    band: "ostate",
    value: { on: true }
}).subscribe()

Flat Transporter

You can create a "flat" transporter if you don't want to create a folder for each thing and aren't interested in multiple bands. Instead of create a folder, the filename for the Thing will be the JSON data

const fs_transport = require("iotdb-transport-fs");
const fs_transporter = fs_transport.make({
    prefix: "some-path",
    flat_band: "meta",
});

Readme

Keywords

none

Package Sidebar

Install

npm i iotdb-transport-fs

Homepage

homestar.io

Weekly Downloads

11

Version

3.0.6

License

Apache-2.0

Last publish

Collaborators

  • dpjanes