Integrating emoncms with dlink smart plug DSP W215

Hi,
I just got this smart plug with energy monitoring capabilities. I was planning to use the instructions below
https://openenergymonitor.org/emon/node/5739
to integrate it but I just realized I dont know where to start.
I installed on the weekend emoncms on my windows 10 PC. I completed the installation and it seems to be working
I also have the smart plug working on the the same network
I would appreciate if anybody can assist with some guidance. I dont know where to enter the code.

My installation
Is self-hosted on a x86 windows 10 PC
I am using the prebuild image from emoncms/WindowsInstall.md at master · emoncms/emoncms · GitHub
Version Emoncms Version 9.7.2 | 2016.07.04
Have you made any changes to the code? No changes

Really appreciate any help. I bought the smart plug for this only reason. The dlink smartphone app is crap

Gabriel - I seem to remember looking at this smart plug and just finding a few ways to communicate with it. You may need to search for D-Link DSP-W215 Smart Plug hacks.

Here is some info on the d-link forum:
http://forums.dlink.com/index.php?topic=64079.0

The above d-link forum points to this github page that may help:

or maybe this page:
Hacking the D-Link DSP-W215 Smart Plug

I purchased a different Smart Plug. I purchased the Edimax Wi-Fi Smart Plug SP-2101W due to ease of communications. There is even a node-red node written for it: http://flows.nodered.org/node/node-red-contrib-smartplug

Jon,
Thanks. The only reason I bought this unit was because I thought I could hook it up to emoncms or other platforms. If Edimax is the best/most documented smart plug I certainly consider swapping my smartplug for that one.
The dlink was a headache to set up. I can see why the poor reviews.
Is edimax the most open option then? Is it well documented how to intergate it ? (for a non programmer)

Regards,
Gabriel

The Edimax Wi-Fi Smart Plug SP-2101W and the Belkin Wimo Insight plug are the two that seem to be easy to communicate.

There is a Belkin Wemo Node-RED node: node-red-node-wemo (node) - Node-RED

Take a look at this:

and:

1 Like

Jon,

Thanks again. This is very helpful. That clears the adapter recommendation.
In terms of putting it all together, I have to confess I am still a little overwhelm.
This is the background
What I want to do is to monitor real time and also a plotted history of power usage (Watts used sampled every 2-3 minutes). I am not looking for how much KWH was used in a whole day (although that is a secondary use case).
I was disappointed to find that the current smart plugs adapters only have a smartphone application that is very limited. At most, it tells you KWH for the day.
I did some research online thinking that some smart folks would have found the way to connect to the smart plugs with a well supported monitoring app and came across openenergymonitor (and also openhab)

Some Question:

  1. Would I be able to accomplish what I want with emoncms + edimax?
  2. What is node-red?

Regards,
Gabriel

I use the Edi Smart Plug for the same - to monitor Watts (for me every 30 seconds). The interval is a polled number that is easily changed.

This is my basement dehumidifier:

.

This is the Node-RED flow that goes with it:

And I can send you the this code when you get that far.

.

  1. yes, with the add of Node-RED and the http://flows.nodered.org/node/node-red-contrib-smartplug1 node.

  2. This site will give you more info about Node-Red. I do not know if it works with Windows 10. The below is from the node-red website:

Browser-based flow editing
Node-RED provides a browser-based flow editor that makes it easy to wire together flows using the wide range nodes in the palette. Flows can be then deployed to the runtime in a single-click.

JavaScript functions can be created within the editor using a rich text editor.

A built-in library allows you to save useful functions, templates or flows for re-use.

2 Likes

Jon,
What you show is a beautiful (my dream) setup. A few questions:

  1. Is the data viewer part of emoncms? or is a separate application
  2. How long would you think it would take to set something like this for a newbie? I assume steps are
    a. install emoncms (done) :slight_smile:
    b. install node-red
    c. install code in node-red to read smart plug and output to emoncms?
    d. configure emoncms to read node red output
    e. configure visualization app?
  3. If above is time consuming, would there be a quick script that would read power and just output to a txt file?

Thanks.

I cannot take credit for any of “the dream”. Many other OEM members, much smarter then me, have created the emoncms system.

  1. Is the data viewer part of emoncms? or is a separate application
    It is part of emoncms. no other install needed.

  2. How long would you think it would take to set something like this for a newbie? I assume steps are:

a. install emoncms (done) :slight_smile:
sounds like no time!

b. install node-red
few hours to read, understand, and install. The Node-RED website has a install page that will help.

c. install code in node-red to read smart plug and output to emoncms?
few hours to understand, update to your needs and test. Install is simple once you understand :wink:

d. configure emoncms to read node red output
when configured correctly in Node-RED (in your flow), it will appear in the Inputs View web page without any config changes.

Inputs View page:

You’ll need to set up a “Feed”. So an hour or so to understand, set to meet your needs and test.

Feed View page:

e. configure visualization app?
Little to no config needed - just click on buttons above & below the chart (image 2 posts up). When you click the then the visualization above appears. Automagically! :wink:

3 - If above is time consuming, would there be a quick script that would read power and just output to a txt file?
The above has a big learning curve. So if you only plan to monitor one item with one EdiMax Smart Plug then it might be easier to locate a quick script to write to a text file. I am not aware of this type of script but I would guess someone else has created one.

I ended up finding python code to connect to DSP W215. In the end I returned it. First it has a terrible setup process and a terrible app. Also, I have received an old hw rev A1 (there is a newer B1 that has a different sw branch). I had stability issues (sadly I received an open box unit even though I didnt buy an open box). Finally, it seem that the only folks that have been able to find a way to connect to this particulat model havent done any updates for two years so ongoing support is an issue.
I will bet getting the edimax but probably wait for a sale. During christmas break, I will try your setup.Nice way to impress my friends :slight_smile:
Thanks for your feedback Jon,
The work this community has put together is amazing.

I’ve been keeping an eye on a smart plug sale also. If you use Amazon, CamelCamelCamel has a nice monitoring tool:
http://camelcamelcamel.com/Edimax-Wi-Fi-Energy-Management-SP-2101W/product/B00N4OBJAO