-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
digitalSTROM Binding
Documentation of the digitalSTROM binding bundle
digitalSTROM is the solution for intelligent living. The smart home system represents digital lifestyle and an integrated connectivity concept. Intuitive in use and simple to install, the technology communicates via the existing power lines thus integrating all the electrical appliances as well as broadband devices in a home.
This results in an infrastructure allowing connection of any applications, products and services via open interfaces. Successful miniaturization and digital intelligence make digitalSTROM suitable for both retrofitting and installation in new builds, without interfering in the existing room design. Analogous to the world of smartphones and app stores, digitalSTROM has open interfaces allowing unlimited creativity for solutions in smart living: In addition to apps for additional convenience at home, new marketing opportunities arise for suppliers of products and services. digitalSTROM AG is headquartered in Schlieren-Zurich (CH) and Wetzlar (D).
digitalSTROM binding bundle is available as a separate (optional) download. If you want to let openHAB communicate with digitalSTROM DSS11 server, please place this bundle in the folder ${openhab_home}/addons and add binding information to your configuration.
For installation of the binding, please see Wiki page Bindings.
- Unzip DigitalSTROM_OPENHAB_ADD-ON.zip
- copy "openhab/openhab.js" to your dss server "/usr/share/dss/add-ons/"
- copy "openhab.xml" to your dss server "/usr/share/dss/data/subscriptions.d/"
DigitalSTROM JSON service interface is limited to HTTPS protocol. For security reason, we need to create a self signed cetificate with correct given hostname. To do so, follow these steps:
1. openssl genrsa -out privkey.pem 1024
2. chmod 400 privkey.pem
3. openssl req -new -key privkey.pem -out certreq.csr
Enter your details:
Country Name (2 letter code) [AU]: DE // not important
State or Province Name (full name) [Some-State]: NRW // not important
Locality Name (eg, city) []: Gummersbach // not important
Organization Name (eg, company) [Internet Widgits Pty Ltd]: dss.local // network name of your dss, important
Organizational Unit Name (eg, section) []: dss.local // network name of your dss, important
Common Name (eg, YOUR name) []: dss.local // network name of your dss, important
Email Address []: // not important
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: // not important, press enter
An optional company name []: // not important, press enter
4. openssl x509 -req -days 9000 -in certreq.csr -signkey privkey.pem -out dsscert.pem
5. cat privkey.pem >> dsscert.pem
Copy the newly generated certificate onto your digitalSTROM server and import it to java trusted store of your openHAB server by using java keytool.
Keytool usage:
$JAVA_HOME/bin/keytool -importcert -alias <some descriptive name> -keystore <path to keystore> -file <certificate file>
Keytool usage example (OS X):
sudo keytool -importcert -alias DSS -keystore /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/cacerts -file dss.local.pem
The following config params are used for the digitalSTROM binding.
- (optional) digitalstrom:refreshinterval Refresh interval (defaults to 1000 ms)
- digitalstrom:uri Hostname and port of the digitalSTROM server (dSS)
- (optional) digitalstrom:connectTimeout Connect timeout (defaults to 4000 ms)
- (optional) digitalstrom:readTimeout Connect timeout (defaults to 10000 ms)
- digitalstrom:loginToken To login without a user and password; loginToken must be enabled once
- digitalstrom:user
- digitalstrom:password To login with username and password; default username and password is dssadmin If you have loginToken and username with password the loginToken will be prefered by default
Obtaining loginToken
Point your browser to https://dss.local:8080/json/system/requestApplicationToken?applicationName=openHAB
Store the result in openhab.cfg file
After receiving the application token you need to enable it in your digitalSTROM configurator under System -> Zugriffsberechtigung
################################ digitalSTROM Binding #################################
# Refresh interval (defaults to 1000 ms)
digitalstrom:refreshinterval=1000
# Hostname and port of the digitalSTROM server (dSS)
digitalstrom:uri=https://dss.local:8080
# Connect timeout (defaults to 4000 ms)
digitalstrom:connectTimeout=4000
# Connect timeout (defaults to 10000 ms)
digitalstrom:readTimeout=10000
# to login without a user and password; loginToken must be enabled once
digitalstrom:loginToken=
# to login with username and password; default user is dssadmin and default password is dssadmin
# if you have loginToken and username with password the loginToken will be prefered by default
digitalstrom:user=dssadmin
digitalstrom:password=dssadmin
In order to bind an item to a digitalSTROM device you need to provide configuration settings. The simplest way is:
digitalstrom="dsid:<digitalSTROM device id>" //device with example dsid (You can also use the shorter dsid, known as S.N: xxxxxxxx (8 letters) )
Thats it! It's enough to control a device.
Switch Light_GF_Corridor_Ceiling "Ceiling" {digitalstrom="dsid:3504175fe000000000000001"}
Dimmer Light_GF_Living_Table "Table" {digitalstrom="dsid:3504175fe000000000000001"}
Rollershutter Shutter_GF_Living "Livingroom" {digitalstrom="dsid:3504175fe000000000000001"}
All syntax keywords for the digitalSTROM are explained here:
symbols:
: // to refer a value to a key
# // separator for the next key-value pair
keys:
dsid // digitalSTROM device id
dsmid // digitalSTROM meter id (dSM)
consumption // optional for metering
timeinterval // timeinterval to initiate a metering job
context // in some cases use context:
zoneid // only in combination with a NumberItem or StringItem for apartment or zone calls
groupid // only in combination with a NumberItem or StringItem for apartment or zone calls
context:
slat // important if it's a roller shutter: to have a item to control the slats
awning // important for roller shutter: if it's a marquee/awning to show the right icon -> open-close
apartment // in combination with a Number- or StringItem to make apartment calls
zone // in combination with a Number- or StringItem to make zone calls
consumption:
ACTIVE_POWER // in use with a device or meter -> current power consumption (w)
OUTPUT_CURRENT // only in use with a device -> amperage (mA)
ELECTRIC_METER // only in use with a meter (wh)
Rollershutter Shutter_GF_Living "Livingroom" {digitalstrom="dsid:3504175fe000000000000001"}
in case of marquee/awning add context param "awning"
Rollershutter Shutter_GF_Living "Livingroom" {digitalstrom="dsid:3504175fe000000000000001#context:awning"}
for up and down use
Rollershutter Shutter_GF_Living_UP_DOWN "Livingroom UP/DOWN" {digitalstrom="dsid:3504175fe000000000000001"}
add second item to adjuste the slats (use the same dsid)
Rollershutter Shutter_GF_Living_UP_DOWN "Livingroom UP/DOWN" {digitalstrom="dsid:3504175fe000000000000001#context:slat"}
To call apartment or zone scenes use number- or string item in the .items file:
Number|String Apartment_Scene "Apartment Scene" {digitalstrom="context:apartment"}
Number|String All_Apartment_Lights "All lights" {digitalstrom="context:apartment#groupid:1"} //optional add groupid
Number|String Zone_Scene "Room Scene" {digitalstrom="context:zone#zoneid:65535"}
Number|String All_Zone_Lights "All room lights" {digitalstrom="context:zone#zoneid:65535#groupid:1"} //optional add groupid
and in .sitemap add mappings: Selection item=Apartment_Scene label="Apartment Scene Selection" mappings=[65=Panik, 72=Gehen] // here you have to use the right (a valid) sceneID
Switch item=Zone_Scene label="Room Scene" mappings=[14=On, 13=Off] // here you have to use the right (a valid) sceneID
To poll and e.g. persist/visualize the curent power consumption (ACTIVE_POWER) you should use string- or number items.
Number Power_Consumption_TV "TV [%d W]" {digitalstrom="dsid:3504175fe000000000000001#consumption:ACTIVE_POWER#timeinterval:60000"} // read device power consumption every 60 seconds
Be aware! Your system will work very slow on sensor reading!
Rule 8 "Application processes that do automatic cyclic reads or writes of device parameters are subject to a request limit: at maximum one request per minute and circuit is allowed."(digitalSTROM: [p.36)
Rule 9 "Application processes that do automatic cyclic reads of measured values are subject to a request limit: at maximum one request per minute and circuit is allowed."(digitalSTROM: http://developer.digitalstrom.org/Architecture/ds-basics.pdf p.36)
Number Consumption_dSM "dSM [%d W]" {digitalstrom="dsmid:3504175fe000001000000001#consumption:ACTIVE_POWER#timeinterval:3000"} // read power consumption every 3 seconds (it 'works' because here we read cached values)
Number Consumption_House "Total house consumption [%s W]" {digitalstrom="dsmid:ALL#consumption:ACTIVE_POWER#timeinterval:3000"}
-
The timeinterval only initiates a metering job, but you don't have the guarantee that the worker will start it in this time!
-
You should better not read the consumption of a device, but of meters(dSMs).
In the first time the system learns, how to react on specific scene calls (sensor reading). But after some time it will work fast!
ℹ Please find all documentation for openHAB 2 under http://docs.openhab.org.
The wiki pages here contain (outdated) documentation for the older openHAB 1.x version. Please be aware that a lot of core details changed with openHAB 2.0 and this wiki as well as all tutorials found for openHAB 1.x might be misleading. Check http://docs.openhab.org for more details and consult the community forum for all remaining questions.
- Classic UI
- iOS Client
- Android Client
- Windows Phone Client
- GreenT UI
- CometVisu
- Kodi
- Chrome Extension
- Alfred Workflow
- Cosm Persistence
- db4o Persistence
- Amazon DynamoDB Persistence
- Exec Persistence
- Google Calendar Presence Simulator
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AKM868 Binding
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Chamberlain MyQ Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Transport
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- DD-WRT Binding
- Denon Binding
- digitalSTROM Binding
- DIY on XBee Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Expire Binding
- Fatek PLC Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FritzBox-TR064-Binding
- FS20 Binding
- Garadget Binding
- Global Caché IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- Horizon Mediabox Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KM200 Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MCP23017 I/O Expander Binding
- MCP3424 ADC Binding
- MiLight Binding
- MiOS Binding
- Mochad X10 Binding
- Modbus Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- MystromEcoPower Binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Panasonic TV Binding
- panStamp Binding
- Philips Hue Binding
- Picnet Binding
- Piface Binding
- PiXtend Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- PowerDog Local API Binding
- Powermax alarm Binding
- Primare Binding
- Pulseaudio Binding
- Raspberry Pi RC Switch Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Siemens Logo! Binding
- SimpleBinary Binding
- Sinthesi Sapp Binding
- Smarthomatic Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonance Binding
- Sonos Binding
- Souliss Binding
- Squeezebox Binding
- Stiebel Eltron Heatpump
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- UCProjects.eu Relay Board Binding
- UPB Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- DoorBird
- FIND
- Foscam IP Cameras
- LG Hombot
- Worx Landroid
- Heatmiser PRT Thermostat
- Google Calendar
- Linux Media Players
- Osram Lightify
- Rainforest EAGLE Energy Access Gateway
- Roku Integration
- ROS Robot Operating System
- Slack
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- openHAB Cloud Connector
- Google Calendar Scheduler
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Fahrenheit to Celsius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow
- Speedtest.net integration