Monthly Archives: March 2018

Edimax SP-2101W Wi-Fi Smart Plug with Energy Monitoring

I saw this little plug on Amazon recently and decided to add it to my “arsenal” of gadgets.

Edimax SP-2101W

Edimax SP-2101W

The interesting bit about it is that not only it can be remotely controlled, but it also provide energy monitoring, so you know if the “dumb” appliance that’s connected to it is on or off.

I’ve connected my kettle to it as a test, and I think it might stay there for a while now.




Getting the status of a Sky+ HD Box

Thanks to C4rtm4N I now have the status of my Sky+ HD box in Home-Assistant. When used in conjunction with dalhundal‘s sky-remote-cli it becomes close to a fully fledged solution.

Playback or Live TV is now automatically paused if the Sky+HD box is on…

The code I used (for now, there appears to be times when it generates errors in HA) is:

Sensor to catch the box’s status:

- platform: command_line
  name: sky_hd_status
  command: curl -i -s -o /dev/null -w "%{http_code}" 'http://sky_ip_address:49159/photo-viewing/start?uri=http://any_ip_address/null.jpg' && curl 'http://sky_ip_address:49159/photo-viewing/stop'
  scan_interval: 300

Template Switch to control the box:

- platform: template
  switches:
    skyhd:
      friendly_name: Sky+ HD
      value_template: "{% if states.sensor.sky_hd_status.state == '200' -%}on{% else %}off{% endif %}"
      turn_on:
        service: shell_command.sky_hd_power
      turn_off:
        service: shell_command.sky_hd_power

The shell commands are:

sky_hd_power: sky-remote-cli sky_ip_address power
sky_hd_pause: sky-remote-cli sky_ip_address pause

of course replace the ip addresses with that of the Sky box (which should be fixed by your router). You’ll need to ensure sky_remote_cli is installed of course:

npm install -g sky-remote-cli

Head over to dalhundal‘s page for more info on sky-remote-cli…