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 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-cbus

v0.1.2

Published

A node that sends data to the cloud by using MQTT protocol. These data can be monitored at IoT Scope's web page with the given IoT ID.

Downloads

17

Readme

Node-RED CBUS IoT Scope And IoT SQL

This library includes two nodes. One of them is IoT Scope, and the other one is IoT SQL. They both uses MQTT protocol to send data to the cloud.

  1. IoT Scope

Data sent by this node can be monitored at IoT Scope's web page with the given IoT ID. The sampling rate is 1 second, and the chart starts the drawing when the browser is opened. It shows last 1 hour data as it gathers data from the node.

  1. IoT SQL

Same concept applies here, but the main difference is that data sent by this node is stored in database, so history of the data can be tracked. The sampling rate is 1 minute.

image

How to install

cd ~/.node-red
npm install node-red-contrib-cbus

How to use it

Requesting IoT Scope ID or IoT Scope ID

As a first step, an IoT ID should be requested. To do that, the following site can be used.

IoT Scope or IoT SQL ID Request Website

Just enter valid e-mail adress and hit enter.

image

Node settings

After installing node package, enter the IoT ID in node properties.

image

IoT Scope Web Interface

After preparing node-red project, you can use the following link to observe IoT Scope value.

https://iot.cbus.io/iotscope?ID=0123456789012345

Basically, replace 0123456789012345 with your IoT ID.

image

Example project for IoT Scope

Node-red flow :

image

You can import this example as follows.

[{"id":"934df569c8ec9982","type":"iot-scope-in","z":"be8de71f8b865057","name":"IoT Scope","broker":"nr.cbus.io","brokerport":"1883","iot":"","projectname":"Trial Project","valuename":"Counter","unit":"Tick","x":830,"y":140,"wires":[]},{"id":"456f3ed31ecd2cf2","type":"inject","z":"be8de71f8b865057","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Trigger","payloadType":"str","x":380,"y":140,"wires":[["86cde155107cf0e6"]]},{"id":"86cde155107cf0e6","type":"function","z":"be8de71f8b865057","name":"Counter","func":"var counter = context.get('counter') || 0;\ncounter += 1;\nif(counter > 60)\n    counter = 0;\nmsg.payload = counter;\ncontext.set('counter', counter);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":140,"wires":[["934df569c8ec9982"]]}]

IoT Scope :

nr-iotscope

IoT SQL Web Interface

Same concept in IoT Scope node applies here. After preparing node-red project, you can use the following link to observe IoT SQL value.

https://iot.cbus.io/sql?ID=0123456789012345

Basically, replace 0123456789012345 with your IoT ID.

IoT SQL :

image

Example project for IoT SQL

Node-red flow :

12

You can import this example as follows.

[{"id":"51b26449adc16038","type":"iot-sql","z":"be8de71f8b865057","name":"IoT Sql","broker":"nr.cbus.io","brokerport":"1883","iot":"","valuename":"Node-Red Counter","x":840,"y":180,"wires":[]},{"id":"8ffa8a36f4ffd078","type":"inject","z":"be8de71f8b865057","name":"","props":[{"p":"payload"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Trigger","payloadType":"str","x":400,"y":180,"wires":[["7f7c01660e5cd7c4"]]},{"id":"7f7c01660e5cd7c4","type":"function","z":"be8de71f8b865057","name":"Counter","func":"var counter = context.get('counter') || 0;\ncounter += 1;\nif(counter > 60)\n    counter = 0;\nmsg.payload = counter;\ncontext.set('counter', counter);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":180,"wires":[["51b26449adc16038"]]}]

Contact information

For any question -> [email protected]