Mydlink Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
Varazir
Posts: 451
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Mydlink

Post by Varazir »

Hi,

I wounder if I can control a Home WiFi Smart Plug (DSP-W215) from my domoticz
And if I can connect a DCS-935L ?

TIA
Daniel
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
berkens
Posts: 34
Joined: Tuesday 06 October 2015 13:03
Target OS: NAS (Synology & others)
Domoticz version: 3.8891
Location: Amsterdam
Contact:

Re: Mydlink

Post by berkens »

Somebody tried it for you and me:

viewtopic.php?f=17&t=6073#p39537

It is not possible due to the encryption using it in Domoticz.

Grtn Ben...
Windows 10 laptop, Synology DS214 + DSM6.1, Zwave.me USB, Neo CoolCam powerplugs & dual wall switches, Heiman gasdetector, Eurotronic Spirit heatvalve, Samsung SmartThings hub v2 UK
todip
Posts: 1
Joined: Thursday 13 October 2016 19:40
Target OS: Linux
Domoticz version:
Contact:

Re: Mydlink

Post by todip »

Yes it's possible, i do that
see https://github.com/bikerp/dsp-w215-hnap
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

todip wrote:Yes it's possible, i do that
see https://github.com/bikerp/dsp-w215-hnap
It is working! :D

I suppose there is no way to control the on/off from domoticz. They are a cheap (crappy sometimes) way to control some plugs. I have 3 plugs and I suppose there are a lot of mates that did wrong on start and bought these starter kits from Dlink.
Hope for developers engagement and include D-link products to Domoticz.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

looking around I found that also D-Link motion sensor DCH-150 uses the same protocol.
I do not know what can be the usage on polling a motion sensor but I like to add it on the common knowledge. :lol:
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

Very productive day! :D
I used the following script to power on/off DSP-W215 plug!!!
Responding is amazing as it is not using IFTTT. Firmware on the plug is the latest (2.22), so I need others owners to confirm that is working to other firmware versions.

https://github.com/nodeofgithub/DSP-W21 ... r/power.py

You need to provide the ip / pin (can be found on the back of plug) / and the command (on/off).
So we have the power consumption/temperature and the control. What is next? ;) ;)
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

We can read also the plug power status from a fork of first github repo
https://github.com/Bananis/dsp-w215-hnap/tree/patch-1 using a different app.js, which reports if plug is powered on. the hard is that the change on Domoticz will take some seconds to updated.

https://github.com/Bananis/dsp-w215-hna ... h-1/app.js
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

Developer request:
Can you build/add a entry on beta of domoticz for DSP-W215 plug? It is a 40 Euros plug with IFTTT integration. I can provide a donation for that.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mydlink

Post by jelleeelco »

Hi,

thank you so much for your work! I have these plugs, and I'm trying to use your script to get the on/off done. However, I can't work it out!

I have the script in /domoticz/scripts/python and called them OFF.py and ON.py. I made the script executable via chmod +x. When I run ./ON.py from the command line, it gives me multiple errors ("import: command not found"), pin: command not found, etc.

So I'm doing something wrong :) Did you add anything to the script other then what is on Github? I simply copied your code, made the ON.py script, made a dummy switch in Domoticz and used the ON.py and OFF.py for switching... but no luck.

Any direction or help would be GREATLY appreciated!!
Cheers
Jelle
jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mydlink

Post by jelleeelco »

Hi,

I think I got it to work more or less... stupid error! My findings,please correct me if I'm wromg:

- the commands have to be low capital, so 'on' and not 'ON'.
- when copying your code as-is, it doesn't work. I have to add the following at the start of the script: #!/usr/bin/python
- it doesn't run with the IPaddress, pincode and command from in the script. If I use SSH and run the script, it tells me:
USAGE: ./ON.py <ipadress> <pin> <off>
- If i then do that in SSH, so:
./ON.py '192.168.1.31' '890789' 'on'
and the light switches on! And off if I choose 'off' of course.

So I'll create a .sh script, and in that script just execute the above SSH line.

Is this the way your code is intented? Or am I completely missing the point!?
Thanks!!
Jelle
jelleeelco
Posts: 61
Joined: Wednesday 04 January 2017 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mydlink

Post by jelleeelco »

ah, update. Got it to work.

- Create script with your code and add #!/usr/bin/python to the top.
- In Domoticz, create dummy switch (first create dummy hardware if you don't have on yet)
- To turn it on: script://python/power.py '192.168.1.31' '890765' 'on'
- to turn it off: script://python/power.py '192.168.1.31' '890765' 'off'

Were the IP address is the IP address of the Dlink Plug (duh..but I got it wrong at first!) and the number is your pin.

Now going to look at your status code. Many thanks so far, you have made a huge contribution!! I'm a complete idiot when it comes to coding so depend on people like you to make this happen.
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: Mydlink

Post by korniza »

great news guys!
We need to thank Dnpwwo for his great work! :D
Now you can put the file you will find on the link and put it under the folder plugin/DSP-W215 (you have to create the folder first). After that restart domoticz. Go to Hardware and add new device searching for Dlink smart plug DSP-W215!!! :D
Please test it are respond any issues.
http://www.domoticz.com/forum/viewtopic ... 65&t=15753
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
skorpion03
Posts: 1
Joined: Friday 13 April 2018 12:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mydlink

Post by skorpion03 »

Hello to all,
I have a problem with these sockets, I can safely turn them on and off via Domoticz but it is not clear how I can display in Domoticz the various data such as current consumption (W) and temperature (c).

I have read and downloaded the files at https://github.com/bikerp/dsp-w215-hnap/wiki but it is not clear how to use the files.


I make a trivial example,
to know if the device is online I should use this string


<soap: Envelope xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: soap = "http : //schemas.xmlsoap.org/soap/envelope/ "> <soap: Body>
<IsDeviceReady xmlns = "IP-DEVICE / HNAP1 /" /> </ soap: Body>
</ Soap: Envelope>

in the wiki we talk about HNAP_AUTH and Cookie, where these codes must be entered?


the answer I would get is:

<? xml version = "1.0" encoding = "UTF-8"?>
<soap: Envelope xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema" xmlns: soap = "http : //schemas.xmlsoap.org/soap/envelope/ "> <soap: Body>
<IsDeviceReadyResponse xmlns = "IP-DEVICE / HNAP1 /"> <IsDeviceReadyResult> OK </ IsDeviceReadyResult> </ IsDeviceReadyResponse>
</ Soap: Body>
</ Soap: Envelope>


Where should I enter this information in Domoticz?

Is it possible to have a step by step guide? it could also be useful to others


thank you so much
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest