Edimax Wi-Fi Smart Switch/Plug (SP-2101W)

I picked up two of these plugs from someone locally for a great price so even though there doesn’t appear to be much info on the forum about these I figured I would give them a try. Initial setup in the edimax app was easy and once connected I locked the IP in my router so it wouldn’t break my config down the road if the switch got a new IP address.

Component setup is documented here:

My specific setup was:

switch:
  - platform: edimax
    host: 192.168.1.XX
    username: admin
    password: password
    name: Edimax1

Note: The password is 1234 by default, but it is recommended you change it in the app after setup and enter that password in your config. If you change the switch name in the app the username is still admin, I don’t think I figured out how to change that.

My switch also monitors power so to pull that data I created a template sensor.

sensor:
  - platform: template
    sensors:
      edimax1_watts:
        value_template: '{{ states.switch.edimax1.attributes["current_power_mwh"] | float * 1000000 | round(2) }}'
        unit_of_measurement: 'W'

You can also monitor the total mWh used in a day from the swtich by replacing “current_power_mwh” with “today_mwh”

Note: the default value provided in the states tab is a few decimal places off. Once correcting that with the multiplier in the value template above it was correctly reporting the value for Watts.

End result is a switch that reports its state back, has a good range (my wifi in the house covers just about every corner) and reports power usage.

These go for ~$25.00 US on amazon right now. I also recently got a TP Link HS110 and am tempted to return it and get another of these as they are ~$14.00 cheaper. The TP link has the same on/off functionality and only beats the Edimax switch by providing voltage and amperage readings.

3 Likes

Nice, I have to buy one of these and try it out. I bought a couple of Aeotec Smart Switches for power monitoring but they were at least twice the price.

Thanks for the heads up and the review/config tips!

Thanks for the info! I’m really curious about these outlets. The price is great.

I also have this switch.

It is supposed to listen on port 10000 right? Because sometimes it does and sometimes it does not?

Here it is working

[cpaquin@fedora23-laptop ~] $ nmap 192.168.0.199

Starting Nmap 7.12 ( https://nmap.org ) at 2017-03-02 16:42 EST
Nmap scan report for Edimax-Homelab.lab.localdomain (192.168.0.199)
Host is up (0.028s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
10000/tcp open snet-sensor-mgmt

I am perplexed. Have you seen anything similar? Note I am configuring it for static dhcp on my router.

Also, have you figured out how to pull Amps?

One more question. Where in which file do you stick the template for the edimax? Can you show your working example in context? I ran into errors in formatting which is why I ask.

Thanks.

Haven’t had any issues with mine, not sure how they are connected either (ie which port). How is the wireless signal where the switch is?

[quote]
Also, have you figured out how to pull Amps? [/quote]
Take the watts and divide by your voltage in a template sensor.

I pasted my actual config to make the first post. It goes in your main configuration.yaml unless you have split your config. It needs to go below sensor: not switch: in the config file. Also if you already have sensors, remove the sensor: from what you add to the file.

Thanks and Thanks.

The wireless should not be too weak in that corner of the basement, there is a device acting as a wireless bridge right next to it pushing 500mb.

Funny thing is, I reached out to edimax support and they told me that the device only listens on port 10000 when it is not connected to wireless, otherwise it only listens on port 22, this makes no sense at all to me.

Can you run an nmap on your plug and see what ports its listening on? If you are running windows you can just telnet to it and see if its listening on port 22 and/or 10000. I would appreciate it, if you could.

Regarding configuration, I have a groups.yaml, a customize.yaml and a configuration.yaml. I did see what you posted originally, but i’ve only had HA up and running for about a week, so still learning. My configuration.yaml looks like this

This is commented out for now until I get the port listening

switch:

  • platform: edimax
    host: 192.168.0.199

My sensor section looks like this.

sensor:

  • platform: wunderground
    api_key: ee3582efd25d7641
    monitored_conditions:
    • alerts
    • dewpoint_c
    • dewpoint_f
      …trunc…

Can I not have the wunderground info under sensor along with the template you have above? Or do I need to just append to it, or can I add something like “sensor 1”?

Thanks again

See the first post in the thread below on posting your config. It maintains the formatting and makes it easier to check.

In short, you can have multiple platforms under sensor: you just need to format it correctly. See the last example on the page below for how to format it.

Ill try checking my switches this weekend.

Im guessing it is listening on port 10000 when you are connecting directly to the hotspot it creates when you first plug it in. So 10000 is the direct switch to phone app port used to perform intial setup. After you setup your home wifi connection it then goes to port 22.

nmap showed 10000 was listening. Nothing on 22.

Some smart plugs are making a click sound switching on/off. Do you hear any sound from these?

Yes they make a click.

I would guess most make a click as a relay is a common device to use and relays rend to make a click when operating.

So the plug is now listening on 10000 again, not sure why. 22 is now closed.

So back to the config.

Here is my sensor section

    sensor:
  - platform: wunderground
    api_key:  ee3582efd25d7641
    monitored_conditions:
      - alerts
      - dewpoint_c
      - dewpoint_f
      - dewpoint_string
      - feelslike_c
      - feelslike_f
      - feelslike_string
      - heat_index_c
      - heat_index_f
      - heat_index_string
      - elevation
      - location
      - observation_time
      - precip_1hr_in
      - precip_1hr_metric
      - precip_1hr_string
      - precip_today_in
      - precip_today_metric
      - precip_today_string
      - pressure_in
      - pressure_mb
      - pressure_trend
      - relative_humidity
      - station_id
      - solarradiation
      - temperature_string
      - temp_f
      - UV
      - visibility_km
      - visibility_mi
      - weather
      - wind_degrees
      - wind_dir
      - wind_gust_kph
      - wind_gust_mph
      - wind_kph
      - wind_mph
      - wind_string
  - platform: template
       edimax1_watts:
         value_template: '{{ states.switch.edimax1.attributes["current_power_mwh"] | float * 1000000 | round(2) }}'
         unit_of_measurement: 'W'

However, I am getting this error when checking the config

Testing configuration at /home/homeassistant/.homeassistant
17-03-10 09:32:24 ERROR (Thread-1) [homeassistant.util.yaml] mapping values are not allowed here
in “/home/homeassistant/.homeassistant/configuration.yaml”, line 179, column 21

Line 179 is the line starting with edimax1_watts

Is there something that I am missing here?

Take a look at the required config. You are missing the sensors: line.

Awesome thanks… got it. Below is the config after adding “sensors:”

Including wunderground sensor for context

    sensor:
  - platform: wunderground
    api_key:  ee3582efd25d7641
    monitored_conditions:
      - alerts
      - dewpoint_c
      - dewpoint_f
      - dewpoint_string
      - feelslike_c
      - feelslike_f
      - feelslike_string
      - heat_index_c
      - heat_index_f
      - heat_index_string
      - elevation
      - location
      - observation_time
      - precip_1hr_in
      - precip_1hr_metric
      - precip_1hr_string
      - precip_today_in
      - precip_today_metric
      - precip_today_string
      - pressure_in
      - pressure_mb
      - pressure_trend
      - relative_humidity
      - station_id
      - solarradiation
      - temperature_string
      - temp_f
      - UV
      - visibility_km
      - visibility_mi
      - weather
      - wind_degrees
      - wind_dir
      - wind_gust_kph
      - wind_gust_mph
      - wind_kph
      - wind_mph
      - wind_string
  - platform: template
    sensors:
       edimax1_watts:
         value_template: '{{ states.switch.edimax1.attributes["current_power_mwh"] | float * 1000000 | round(2) }}'
         unit_of_measurement: 'W'

I see now that the sensors: line is missing from my example config. I sent a PM to the admins to figure out how to edit it. It seems after a post is liked/shared/linked the post looses the ability to be edited by the original poster.

I think I need to do a bit more research on how templates work.

I can see the plug being polled.

ar 10 11:57:38 ha hass[5523]: #033[32m17-03-10 11:57:38 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state switch.edimax_smart_plug=on; friendly_name=Edimax Smart Plug, current_power_mwh=0.00023317, today_mwh=0.0027890000000000002 @ 2017-03-10T11:09:17.587240-05:00>, entity_id=switch.edimax_smart_plug, new_state=<state switch.edimax_smart_plug=on; friendly_name=Edimax Smart Plug, current_power_mwh=0.00023344999999999998, today_mwh=0.002791 @ 2017-03-10T11:09:17.587240-05:00>>#033[0m

I’m just not getting any valid data for Watts in the UI - just says “Unknown W”

The plug has to be on for it to read the watts. Also the kwh wont read until it has a minimum value to report. And it clears at midnight each night so until the plug is used it will also read unknown.

This is better output. Last one was truncated

Mar 10 12:49:16 ha hass[5523]: #033[32m17-03-10 12:49:16 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state switch.edimax_smart_plug=on; friendly_name=Edimax Smart Plug, current_power_mwh=0.00023366999999999998, today_mwh=0.00299 @ 2017-03-10T11:09:17.587240-05:00>, entity_id=switch.edimax_smart_plug, new_state=<state switch.edimax_smart_plug=on; friendly_name=Edimax Smart Plug, current_power_mwh=0.00023231, today_mwh=0.002992 @ 2017-03-10T11:09:17.587240-05:00>>#033[0m

Ok, I have this working. This below is added to configuration.yaml

switch:
  - platform: edimax
    host: 192.168.0.199
    username: !secret edimax_username
    password: !secret edimax_password

This section is added under “sensor:” in configuration.yaml

  - platform: template
    sensors:
       edimax_watts:
         value_template: '{{ states.switch.edimax_smart_plug.attributes["current_power_mwh"] | float * 1000000 | round(2) }}'
         unit_of_measurement: 'W'

@christopherpaquin or anyone else with these switches, are you still getting watt and Kwh readings after upgrading to 0.43?

I noticed today my sensors were not updating and the values no longer show up as attributes on my switches. Interested to see if its the switches or something broken in hass.

As part of trouble shooting this issue I let my plugs have access to the internet again so I could check them using the app. The app reported power usage and shortly after HA got the power stats also. Plugs are blocked from any outbound connections again and still reporting power usage so they may just have needed some sort of reset (power cycle didn’t work).