Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

owjs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

owjs

A client library for the 1-wire server protocol

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

owjs

node.js client library for 1-wire protocol

It can be used with classic node callbacks or Q promises


var owjs = require('owjs');
var client = new owjs.Client({host:'127.0.0.1'});


client.read('/settings/timeout/directory')
.then(function (result) {
  console.log("Timeout is set to ", result.value.trim());
});


client.list('/')
.then(client.list)
.then(function (result) {
  console.log('All properties of all devices');
  console.log(result);
});


client.write('/05.54F81BE8E78D/PIO', 100).
then(function(){
  console.log('Wrote a value');
});


// this is a special one just to make life easier for me
client.readFamily(10, 'temperature')
.then(function(result){
  console.log("All temperatures");
  console.log(result);
});


// And if you want it can of course be used with standard node
// callback pattern instead of promise.
// Just add a function as the last parameter.
client.list('/', function(err, result){
  if(err){
    return console.error(err);
  }
  console.log("All devices again");
  console.log(result);
});


Keywords

FAQs

Package last updated on 04 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc