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

iss-gateway

v0.0.8

Published

ISS Gateway for Domoticz

Downloads

18

Readme

iss-gateway

ISS-Gateway for Domoticz is a gateway (really ?!) to display Domoticz devices into ImperiHome mobile interface. It run perfectly on a Raspberry Pi with a minimal footprint (approx. 50Mb) and can work in a cluster for performance improvment.

ISS-Gateway is a fork and also a portage from ISS-Domo.

Todo-list

  • [ ] Better manage user configuration (create user config file if not exist)
  • [x] Add AUTH Basic security layer on top of ISS-Gateway
  • [ ] Better implementation of DevThermostat (actually only Heating Point is functional)
  • [ ] Add history system and change graphable attribue to true
  • [ ] And so one...

Installation

asciicast Start by installing it using NPM :

$ sudo npm install iss-gateway -g

Ensure it's correctly installed :

$ iss-gateway

The result must be :

pi@raspberrypi:~ $ iss-gateway
------------------------------------------------------------------------------------
ISS-Gateway for Domoticz v0.0.4
Global config file is /usr/lib/node_modules/iss-gateway/config.json
User config must be placed in /etc/iss-gateway.json
Domoticz is configured on http://admin:admin@host_or_ip:8080/json.htm
------------------------------------------------------------------------------------

You can stop the process by typing CTRL+C in your console.

Create user configuration

Create (only once time) your configuration file by copying it from the global configuration file :

sudo cp /usr/lib/node_modules/iss-gateway/config.json /etc/iss-gateway.json

See configuration steps before launching the gateway.

Launching at startup

The best solution is to use PM2 (The awesome Process Manager for NodeJS processes) :

$ sudo npm install pm2 -g

Note that it can be also installed locally without -g option. In this case, config file path could be different depending of your system.

Then, start iss-gateway on PM2

$ pm2 start iss-gateway

The result must be :

$ pm2 status
┌────────────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name           │ id │ mode │ pid   │ status │ restart │ uptime │ memory      │ watching │
├────────────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ iss-gateway        │ 0  │ fork │ 30475 │ online │ 0       │ 15m    │ 58.160 MB   │ disabled │
└────────────────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘

Generate an init script

$ sudo pm2 startup systemd

Is it possible to specify an user by adding -u at the end of the startup command.

Update an existing installation

If you have already installed a previous version of ISS-Gateway, to update do :

$ sudo npm update iss-gateway -g

Then, reload the current running instance :

$ pm2 reload iss-gateway
[PM2] Reloading process by name iss-gateway
[PM2][WARN] iss-gateway app can't be reloaded - restarting it
[PM2] restartProcessId process id 0
[PM2] All processes reloaded

Configuration

[TO BE DONE]

See the config.json file below :

{
    "port": 8000,
    "debug": false,
    "auth": null,
    "domoticz": {
        "ssl": false,
        "host": "host_or_ip_of_domoticz",
        "port": 8080,
        "auth": {
            "username": "admin",
            "password": "admin"
        },
        "path": "/",
        "user-agent": "ISS-Gateway",
        "url_cam_video": "video/mjpg.cgi"
    }
}

Add authentication to ISS-Gateway

Set a username/password object to the 'auth' root node and specify an username and an password value:

auth: { "username": "admin", "password": "admin" }

API and objects definition

  • ImperiHome Standard System API : http://dev.evertygo.com/api/iss
  • ISS API Demo : http://dev.evertygo.com/apidoc/iss/demo/devices
  • Domoticz API : https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

CHANGELOG

  • v0.0.7 - Auth Basic mechanism

Author: Yohann Ciurlik

License: MIT