Skip to content
Plugin for Homebridge to connect myStrom Devices (http://mystrom.ch). Initial support both for "local" and cloud based API is implemented.
JavaScript
Branch: master
Clone or download
Johann Richard
Johann Richard 0.5.2
Latest commit ae4e663 Feb 14, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
items Fix broken updateCharacteristics Feb 14, 2016
libs
.gitignore Refactored and improved version. First release that can connect to th… Jan 8, 2016
LICENSE Initial release - not well tested! Nov 5, 2015
README.md Merge of #1 Jan 8, 2016
index.js
package.json 0.5.2 Feb 14, 2016
sample-config.json

README.md

homebridge-mystrom

Supports myStrom (http://mystrom.ch) devices on the HomeBridge Platform and provides a real time polling for getting the "On" and power level characteristics to Homekit. Implements an "Outlet" service for HomeKit.

The current version of the plugin supports two different modes

  • Individual accessories: These are configured as local devides (i.e. not external network connection required), with the help of the Switch API (https://mystrom.ch/en/mystrom-api)
  • myStrom Cloud platform: This mode uses information retrieved from the myStrom Cloud service to create all registered accessories under your myStrom account in HomeKit. You need an authentication key that you have to generate yourself (See below). This mode uses the myStrom Mobile API (https://mystrom.ch/mobile) and might break in the future.

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-mystrom
  3. Update your configuration file. See sample-config.json in this repository for a sample.

Configuration

Configuration sample:

{
   "accessories": [
       {
           "accessory": "myStrom",
           "name": "myStrom WLAN Energy Control Switch",
           "switch_address": "10.0.0.42"
       }
   ],
   "bridge": {
       "name": "myStrom HomeBridge",
       "pin": "042-45-555",
       "port": 51826,
       "username": "CC:33:3D:E3:CE:42"
   },
   "description": "HomeBridge myStrom Status Control.",
   "platforms": [
       {
           "authToken": "0XBfQzVWRWuhNeFe-C5RWFCx9MjYjFvf2",
           "host": "mystrom.ch",
           "name": "myStrom Cloud",
           "platform": "myStromCloud",
           "type": "service"
       }
   ]
}

myStrom Cloud Authentication

IF you want to use the myStrom Cloud platform, you have to retrieve an authentication token. The easiest way under Linux / Mac OS X is via curl:

curl -X POST -d 'email=<your-email>&password=<yourpassword>' https://mystrom.ch/mobile/auth

You will get a response along the following lines, printed out on the command line:

{
    "status":"ok",
    "authToken":"0XBfQzVWRWuhNeFe-C5RWFCx9MjYjFvf2",
    ... same data as in profile response ...
}

Just copy the "authToken":"0XBfQzVWRWuhNeFe-C5RWFCx9MjYjFvf2", into your config.json file and you should be set for Go!

Homebridge as a systemd service under Linux

In order to run homebridge as a service on Linux systems with systemd, you have to create the corresponding definitions. I've created a gist with some instructions on how to do this.

You can’t perform that action at this time.