Allows to control power sockets or motion detectors from D-Link from within ioBroker. mydlink is a registered trademark of D-Link. This Software is developed by the ioBroker community and is not owned or controlled by D-Link.
This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0. This also helps with supporting new devices.
Currently tested devices:
Model | Type | Image |
---|---|---|
DSP-W215 | Smart Plug (socket, temperature, current) Needs polling | |
DSP-W115 | Smart Plug (socket) | |
DCH-S150 | Motion Detector (last motion detected) Needs polling |
The adapter needs to poll some devices. Newer ones do send push messages, which is now supported. Sensor readings and motion detection will be delayed by polling interval, if they need to be polled (can be set in config).
- List of devices, each device with following settings:
Name | set a name here, must be unique (for mydlink devices) |
IP | fill in IP address here, hostname should also work |
PIN | PIN is printed on a sticker on the device, probably at the bottom. Can be TELNET for DSP-W115, see below. |
Poll interval | per device poll interval Set 0 to disable polling. Recommendation: Set a fast poll interval for sensors and a longer one for plugs. |
enable | if not enabled, will not be polled or controlled. Devices that are not plugged in can be disabled to avoid network traffic and error messages in the log. |
The adapter does not interfere with the use of the app.
DSP-W115 and other newer devices use a completely different protocol and a different setup. There are two ways to use them.
- Use App and Adapter at the same time: If you want to keep using the app, you have to put the device into factory mode, following this procedure:
- Reset device into recovery mode by holding the wps/reset button during boot until it starts blinking red instead of orange.
- Now a telnet deamon is running, connect to the device wifi
- Run
telnet 192.168.0.20
and login withadmin:123456
(or use putty, don't forget to selecttelnet
instead ofssh
). - Run
nvram_set FactoryMode 1
- Run
reboot; exit;
to reboot the device. - Now you should enter
TELNET
as Pin, and the adapter will retrieve the required data from the device itself. - Don't want to use the App
- Remove the device from the app, this will reset the device
- Start setup in the app again and configure your Wifi on the device.
- Now the device will reoobt and connect to your Wifi. During that time close the app, make sure it is really closed.
- Now the device should be connected to your Wifi and not connected to the app, so that the PIN from the sticker will work in the adapter. (If the device does not connect to your wifi or the device does not accept login via the PIN please try again. Press the button on the device until it lights up red in order to reset.)
- fixed: crash with empty pin.
- fixed: wrong type warnings with legacy devices
- fixed: missing build...
- fix: crash with js-controller 5.x
- better handle possible exception on unload.
- fix minor errors
- improved siren support.
- reworked code to type-script (please report errors / things that work worse than before)
- added: reboot button for SOAP devices (seems they tend to die now the servers are gone)
- added: support for siren devices
- added: device connection status displayed in admin.
- removed: info.connection state.
- fix release...
- Update translations & dependencies
- Add support for devices with multiple sockets
- Allow polling for websocket devices
- Update translations
- adjusted types & roles to type-detector.
- fix type warnings
- updated translations and dependencies
- updated translations
- added:
telnet
token is now case insensitive - fixed: prevent object missing warning on new devices
- fixed: prevent error message with new mydlink plugs on switch
- fixed: prevent error message with new mydlink plugs on switch (broken)
- Add: support for DCH-S160 water detector added (needs polling, linke motion detector).
- fixed: sometimes state was always reported as true.
- fixed: if error during login, polling would stop.
- fixed: can now update device name from config again
- change: read devices from config in UI again
- change: in UI do not create +-Button if detected device is already in devices table.
- fixed two possible crashes with offline / wrong devices.
- Improved auto detection of DSP-W115 (but mdns seems very unreliable whit that device)
- UI should never delete user devices
- Added Support for w115 (and maybe other never myDlink devices, might even do something with cameras)
- Fix relogin to device (i.e. when device was restarted during adapter runtime)
- Fix error when switching a socket.
- Tried to add even more information in case device seems incompatible
- Returned to login with user "Admin"
- Tried to add more debug for incompatible devices.
- Fixed: changes in configuration were not respected once devices were created
- Fixed: re-login to device on switching if polling is disabled
- Fixed: Error output on switching now more informative
- Fixed switching, was broken in some circumstances by id changes.
- Made saving config more robust and direct again.
- Made identify by IP more robust and allows saving right away.
- Prevent saving if devices without PIN are configured.
- Prevent creation of empty devices (MYDLINK-6)
- Fixed possible issue with device ids.
- Improved device creation
- Adjusted for discovery adapter that not yet stores passwords encrypted.
- Improved connection keepAlive
- Improved logging of network errors
- Fixed login/identification loop on (possibly) duplicate devices
- Fixed potential crashes on network errors.
- Re-added device config to adapter config (in case objects get deleted).
- BREAKING CHANGE: device id is now mac instead of name -> all devices need to be recreated. Sorry for that. But should never happen again, now. New devices should be created automatically.
- added encryption of PIN
- settings stored in native part of device (please do not delete them or you have to reconfigure them)
- modified device creation / identification / start to allow devices to be (re-)started during runtime (you do not need to press save on config page anymore)
- added auto detection
- added missing translations
- added sentry plugin (including sending information about unknown devices)
- a lot of internal restructuring and cleanup for better maintenance in future.
- (Garfonso) added info.connection state
- (Garfonso) suppressed repeated error messages during polling.
- (Garfonso) prevent removement of custom details in objects.
- (Garfonso) fixed config files for release in latest repository.
- (Garfonso) polling interval can now be configured on per device basis (if not configured for a device global poll intervall will be used.) Recommendation: Use high global poll interval and a smaller one for motion detectors.
- (Garfonso) added no_motion state for motion detectors, contains number of seconds since last motion.
- (Garfonso) use setStateChanged instead of polling state before writing.
- (Garfonso) minor clean ups.
- (Garfonso) move to ioborker-community-adapters
- (Garfonso) initial release
MIT License
Copyright (c) 2024 Garfonso garfonso@mobo.info
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.