0.0.8 • Published 10 years ago

iss-gateway v0.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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)
  • 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

CHANGELOG

  • v0.0.7 - Auth Basic mechanism

Author: Yohann Ciurlik

License: MIT

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago