ioBroker.mystrom-wifi-bulb
What it is
This is an adaptor to connect MyStrom Wifi Bulbs with the ioBroker home automation system. These are light bulbs with an integrated webserver and a REST-API to program colors, brightness, and turn on and off.
Hardware installation
When first switched on, the bulb goes in WPS mode for 3 minutes. If you activate your router's WPS within this time span, the bulb will appear in the router's client list. Consult the bulb's documentation for more informations.
Software Installation
Prerequisites
-
A working instance of ioBroker. If you only want a quick test-install, I recommend using docker:
docker run -p 8081:8081 -p 8087:8087 -p 8082:8082 --name iobroker -v iobrokerdata:/opt/iobroker buanet/iobroker:latest
-
At least the adapter "Simple RESTful API" must be installed in the ioBroker instance.
-
The MyStrom-Wifi-Bulb should already be active and integrated in the Network.
Fetch and install ioBroker.mystrom-wifi-bulb
This adapter is not part of the official ioBroker distribution. So it will not show up in ioBroker admin's adapter list. You can install it either directly from NPM:
or as a custom adapter from the admin-ui:
Make sure to select "Beliebig" even though it's situated on Github:
Find out the release you're interested in: https://github.com/rgwch/ioBroker.mystrom-wifi-bulb/releases and copy/paste the address of the .tar.gz link.
Read the warning and click "install" if you agree.
The adapter should then be in the admin pages's list:
Click on the three dots near the right upper corner and then on the + sign in the lower left corner to create a new instance. You need a separate instance for each MyStrom Wifi Bulb in your Home.
The configuration dialog should open after successful creation of the instance.
Insert the IP Address of the bulb on the left side. Since the bulb need a callback to notify about changes, you need also to indicate the address of the ioBroker server and the port you've set when configuring the "Simple RESTful" Adapter. By default, that's 8087. The symbolic network name of the ioBroker Server, e.g. http://homecontrol.local:8087
will probably not work, so better find out the IP address, e.g. in the router's network list (And while you're there, you'll probably want to instruct the DHCP server to always give the same address to the Dingz and to the ioBroker server.)
After clicking save and close, the instance should appear and turn "green" after a short while.
Use
The MyStrom-Wifi-Bulb adapter No. X (starting with 0) will create the following ioBroker states:
- mystrom-wifi-bulb.X.on (read/write: switch on/off)
- mystrom-wifi-bulb.X.ramp (read/write: duration of switching in ms)
- mystrom-wifi.bulb.X.mode (read only: rgb, hsv or mono)
- mystrom-wifi.bulb.X.color (read only: color values, depending of mode)
- mystron-wifi-bulb.X.power (read only: Power consumption of the bulb in Watt)
Note: This version of the adapter is not able to switch colors and color modes programmatically. Any hints on how to do that are welcome :-)
Use the states in ioBroker scripting or VIS UI Design
Example:
const bulb1="mystrom-wifi-bulb.0.on"
const pir="hm-rcp-pir.0.activated"
on({id: pir},()=>{
setState(bulb1,true)
setTimeout(()=>{
setState(bulb1,false)
},120000)
})
Changelog
0.2.1
- (rgwch) Use now Simple RESTful API Adapter for callbacks from the bulb.
0.1.3
License
MIT License
Copyright (c) 2020 rgwch rgw@rgw.ch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
More like this