npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-picubes

v1.0.12

Published

Pi-Cubes Modular Raspberry Pi HVAC System Node Module.

Readme

node-picubes

Node.js module for Pi-Cubes. Pi Cubes is Modular DIY/Hobby HVAC Automation system based on the Raspberry Pi. Supports up to 24 I/Os and 4 Thermostats.

More information: www.cube-controls.com/pi-cubes.html

Installation

$ npm install node-picubes

I2C has to be configured on Raspberry Pi :

www.cube-controls.com/blog/how-to-enable-i2c-on-raspberry-pi

Control Pi-Cubes DO4 Module

var pic = require('node-picubes');

pic.writeDO(1,1,1,function(err){
	            if (err) console.log(err);
   	          });
			  
pic.writeDOSync(1,1,1);			  
			  

picubes.writeDO(module, output, value, callback) - Async version

picubes.writeDOSync(module, output, value ) - Sync version

  • module - Module address(1 - 6)
  • output - Output number(1 - 4)
  • value - Digital output value :
    • 0 = Off
    • 1 = On
  • callback - The callback gets one argument (err).

Control Pi-Cubes UO4 Module

var pic = require('node-picubes');

pic.writeUO(1,1,0,1,function(err){
	              if (err) console.log(err);
   	             });
pic.writeUOSync(1,1,0,1);					 
				 

picubes.writeUO(module, output, type, value, callback) - Async version

picubes.writeUOSync(module, output, type, value) - Sync version

  • module - Module address(1 - 6)
  • output - Output number(1 - 4)
  • type - Universal output type :
    • 0 = Digital Output(0 / 12VDC)
    • 1 = Modulation(0 - 10VDC)
    • 2 - 255 = Digital otput PWM with this period in sec.
  • value - Universal output value :
    • 0 / 1 = For digital type
    • 0 - 100 % = for Modulation / PWM
  • callback - The callback gets one argument (err).

Read Pi-Cubes UI4 Module

var pic = require('node-picubes');

pic.readUI(3,1,1,function(err,data)
                 {
	                if (err) console.log(err);
                    console.log('Data:'+data);
   	             }
          );
		  
data = pic.readUISync(3,1,1);
if (data != null) console.log('Data:'+data);		  

picubes.readUI(module, input, type, callback) - Async version

picubes.readUISync(module, input, type) - Sync version

  • module - Module address(1 - 6)
  • output - Output number(1 - 4)
  • type - Input type 0 = Resistance(Return value 0 - 350000)
    • 1 = Digital(Return value 0 - 1)
    • 2 = Voltage / Current(Return value 0 - 100 % , represent 0 - 10V / 0 - 20mA)
    • 3 = 10K Type II Thermistor(Return value - 4000 to 14000, scale 0.01)
    • 4 = Pulse Input(Return value is counter value)
  • callback - The callback gets two argument (err,data).

Read Pi-Cubes CTA Module

var pic = require('node-picubes');

pic.readCTA(1,0,function (err,data)
				   {
				      if (err) console.log(err);
				      console.log('Data:', data);
				   }
				   );
		  
data = pic.readCTASync(1,0);
if (data != null) console.log('Data:'+data);		  

picubes.readCTA(slave, addr, callback) - Async version

picubes.readCTASync(slave, addr) - Sync version

  • slave - Modbus slave address for CTA
  • addr - Holding register address
  • callback - The callback gets two argument (err,data).

Write to Pi-Cubes CTA Module

var pic = require('node-picubes');

pic.writeCTA(1,31,256,function (err)
				   {
				      if (err) console.log(err);
				   }
				   );
		  
data = pic.writeCTASync(1,31,256);

picubes.writeCTA(slave, addr, value, callback) - Async version

picubes.writeCTASync(slave, addr, value) - Sync version

  • slave - Modbus slave address for CTA
  • addr - Holding register address
  • value - Regsiter value to write
  • callback - The callback gets one argument (err).

License

MIT