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

micro-app-simple-dashboard

v1.0.2

Published

Simple dashboard to display iot data

Downloads

5

Readme

micro-app-simple-dashboard - MQTT/Node base home dashsboard

Micro app to display a home dashboard showing temperature, power usage and other data collected from local sensors. The dashboard is updated in realtime using socket.io

The dashboards listens on a number of mqtt topics for updates and then forwards the updates to clients using socket.io. It provides a simple way to display iot sensor data on a client.

This is an example display:

picture of dashboard main window

The following projects can be used to connect sensors temperature sensors and power sensors

Usage

After installation modify ../lib/config.json to match your configuration

The configuration entries that must be updated include:

  • mqttServerUrl - url of the mqtt server to connect to. This can either start with tcp:// or mqtts://. If it starts with mqtts:// there must be a subdirectory in the lib directory called mqttclient which contains ca.cert, client.cert, client.key which contain the key and associated certificates for a client which is authorized to connect to the mqtt server.
  • dashboardEntries - array in which each entry which contain a name and topic field. The name is what will be display as the label in the dashboard and the topic is the topic on which the dashboard will listen for updates. Updates on the topic should be in the form of yyyyy,xxxx:value were yyyyy is generally a timestamp and the dasboard will extract the value after the ':' character and display it as the value for the corresponding label
  • serverPort - port on which the dashboard listens for connections
  • title - title for the dashbaord paged (optional)

As a micro-app the dashboard also supports other options like authentication and tls for the dashboard connection. See the documentation for the micro-app-framework for additional details.

The following is an example of the configuration file:

Installation

Simply run npm install micro-app-simple-dashboard

Running

To run the simple-dashboard app, add node.js to your path (currently requires 4.x or better) and then run:

from the directory in the micro-app-simple-dashboard was installed.

Once the server is started. Point your browser at the host/port for the server. If you have configured your browser to allow javascript to close the current page the original window will be closed and one with the correct size of the simple-dashboard app page will be created.

Example

The following is the page shown for a sample configuration:

picture of dashboard main window

Key Depdencies

micro-app-framework

As a micro-app the onetime password app depends on the micro-app-framework:

See the documentation on the micro-app-framework for more information on general configurtion options that are availble (ex using tls, authentication, serverPort, etc)

TODO

  • option to support different skins
  • better/more precise layout