Homebridge plugin for SmartHomeNG
Go to file
Sebastian Maier a69eb444fa Add support for direct cache updates
With this addition, updates triggered by Homebridge can directly update the last value cached
2020-11-10 14:36:59 +01:00
index.js Add support for direct cache updates 2020-11-10 14:36:59 +01:00
LICENSE Initial commit 2016-07-01 22:11:55 +02:00
package.json Added Outlet 2017-05-30 20:20:21 +02:00
README.md Add example for fan characteristics rotationSpeed 2020-09-25 20:53:06 +02:00
SmartHomeNGConnection.js Fix whitespace 2020-10-19 14:29:39 +02:00

homebridge-smarthomeng

Homebridge plugin for SmartHomeNG. This is work in progress and not all devices are supported yet.

Currently supported

This plugin currently supports the following services (and characteristics):

  • LightBulb (on/off, brightness, hue, saturation)
  • Fan (on/off)
  • Temperature sensor (current temperature)
  • Thermostat (current- / target temperature)
  • Window (current- / target position)
  • Window Covering (current- / target position)
  • Motion sensor (motion detected)
  • Occupancy sensor (motion detected)
  • Contact Sensor (contact state)
  • Switch (on/off)

Requirements

Installation

Install nodejs >= 0.12.

You have to find out the right way for your OS.

Debian Jessie:

curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install -y nodejs

Alpine Linux: (--no-cache example is for building a docker image)

apk --no-cache add nodejs

Install libavahi-compat-libdnssd-dev lib

Debian Jessie:

sudo apt-get install libavahi-compat-libdnssd-dev

Alpine Linux: (--no-cache example is for building a docker image)

apk --no-cache add dbus nodejs avahi avahi-compat-libdns_sd avahi-dev

Install homebridge from NPM repository

npm install -g homebridge --unsafe-perm

Install this plugin from NPM repository

npm install -g homebridge-smarthomeng --unsafe-perm

Configuration

You have to create a config.json in .homebridge directory. You'll find that directory in your home folder. This is an example config file which just uses this plugin and some example SmartHomeNG items.

{ "bridge": { "name": "HBDEV", "username": "CC:22:3D:E3:DE:37", "port": 51826, "pin": "031-45-154" },

"platforms": [
    {
        "platform": "SmartHomeNG",
         
        "name": "SmartHomeNG",
        "host": "srvsmarthome.ha.swa.lu",
        "accessories": [
            {
                "name": "Temperatur Stube",
                "type": "TemperatureSensor",
                "currenttemperature": "EG.Stube.Temperatur"
            },
            {
                "name": "Heizung Bad",
                "type": "Thermostat",
                "currenttemperature": "OG.Bad.Temperatur",
                "targettemperature": "OG.Bad.Temperatur.Sollwert",
                "targettemperatureminimum": 18,
                "targettemperaturemaximum": 25
            },                
            {
                "name": "Ventilator Bad",
                "type": "Fan",
                "onoff": "OG.Bad.Ventilator"
            },
            {
                "name": "Lüftung",
                "type": "Fan",
                "onoff": "EG.Lüftung"
                "rotationSpeed": "EG.LüftungSpeed"
            },
            {
                "name": "Schalter",
                "type": "Switch",
                "onoff": "EG.Esszimmer.Schalter"
            },
            {
                "name": "Schaltsteckdose",
                "type": "Outlet",
                "onoff": "EG.Esszimmer.Steckdose"
            },
            {
                "name": "Bürolicht",
                "type": "Lightbulb",
                "onoff": "EG.Buero.Licht"
            },
            {
                "name": "Stubenlicht",
                "type": "Lightbulb",
                "onoff": "EG.Stube.Licht"
            },
            {
                "name": "Schlafzimmerlicht",
                "type": "Lightbulb",
                "onoff": "OG.SZSS.Licht",
                "brightness": "OG.SZSS.Licht.dimmen"
            },
            {
                "name": "Rolladen Büro",
                "type": "WindowCovering",
                "updown": "EG.Buero.Rolladen.AufAb",
                "currentposition": "EG.Buero.Rolladen.Position",
                "targetposition": "EG.Buero.Rolladen.Position",
                "inverted": true
            },
            {
                "name": "Bewegungsmelder Küche",
                "type": "MotionSensor",
                "motionstate": "EG.Kueche.Praesenz"
            },
            {
                "name": "Terassentür Küche",
                "type": "ContactSensor",
                "contactsensorstate": "EG.Kueche.Tuer",
                "inverted": true
            },
            {
                "name": "Fenster Esszimmer",
                "type": "ContactSensor",
                "contactsensorstate": "EG.Esszimmer.Fenster",
                "inverted": true
            },
            {
                "name": "Präsenzsmelder Esszimmer",
                "type": "OccupancySensor",
                "motiondetected": "EG.Esszimmer.Praesenz"
            }

        ]
    }
],

"description": "This is my development config file."

}