Use a TP-Link HS110 to monitor my washing machine

i am new to the smart home, but think is fun, i just got my TP-link HS110 and what to monitor the washing machine.
I now have it set up using entities card, not the most fun. But i need some help, i just got 1 senor of it/ entities. how do i split in to more?

You need to follow the tplink component setup guide, specifically the ā€œExtracting Energy Sensor dataā€ which will break out the values for you to use. I just came across this post only because amazon have these @Ā£19 currently.

i think i am missing something, but can see what. i copy @naveci as mutch i understandā€¦
any one see what i missing?

- id: '1562882387947'
  alias: Ny automation
  trigger:
  - above: '5'
    entity_id: sensor.my_tp_switch_watts
    platform: numeric_state
  condition: []
  action:
  - below: '4'
    condition: numeric_state
    entity_id: sensor.my_tp_switch_watts
  - alias: ''
    data:
      message: Testing testing 1-2-3
      title: This is a message
    service: notify.mobile_app_min_lur_ip_x 

Hi,

im using this code for my television and i love it. But i have 1 Problem inside of this part:

  - platform: template
    sensors:
      theframe_status_time:
        friendly_name: "The Frame Laufzeit"
        unit_of_measurement: 'Minuten'
        value_template: >-
          {%- if is_state('input_boolean.theframe', 'on') -%} {{ ((as_timestamp(now())-as_timestamp(states.input_boolean.theframe.last_changed))/60) | round | int }}
          {%- else -%} 0
          {%- endif -%}

In my Lovelace, its always showing 0. In my Message-automation its working and when i put the code into the template editor, it is showing up correctly. Do you have an idea? Only in Lovelace is al the time 0

Hi Erger, currently Im facing the same issue. Also Im using mean from the statistics sensor, and that doesnā€™t work wel either since a week or two. I planned to check on this Tonight, so expect an updated automation at the end of the day :smiley:

1 Like

Try adding the entity_id to the template sensor:

  - platform: template
    sensors:
      theframe_status_time:
        friendly_name: "The Frame Laufzeit"
        unit_of_measurement: 'Minuten'
        entity_id: input_boolean.theframe
        value_template: >-
          {%- if is_state('input_boolean.theframe', 'on') -%} {{ ((as_timestamp(now())-as_timestamp(states.input_boolean.theframe.last_changed))/60) | round | int }}
          {%- else -%} 0
          {%- endif -%}

I tried it, but still the same error.

Hi xirixiz. I was wondering why youā€™re using the statistics mean value, and not just the sensor.wasmachine_watts? Iā€™m a beginner when it comes to HA, so this is a genuine question. Iā€™m looking for a way for it to report to me faster when my washing machine is done. Wouldnā€™t the wasmachine_watts below 5 watts for 5 minutes be just as accurate, but much faster?

Also I noticed you do a homeassistant.turn_on on your input_booleans, but no homeassistant.turn_off when finished. Is there a reason for that?

@Rourke after troubleshooting automation that based heavily on @xirixiz ā€¦ i yesterday gave up and came to same conclusion - and am now using direct sensor.washmachine_watts in a similar manner as you proposedā€¦ So far so good.

Btw - in my config I have homeassistant.turn_off ā€¦ are you sure you did not miss it when copy pasting ?

BTW - the problem I had with platform: statistics ā€¦ is that when my waschmachine finishes, it drops power usage (watts) to 0. And my tplink does only one status update (from whatever watts to 0),then nothing more (because state is still at 0 - so no change). Which essentially prevents statistics module to correctly calculate averageā€¦ :frowning:

Good you got it working with watts. The mean value works for me, but it can easily take 10-15 minutes before it triggers the finished script. I donā€™t think I recognize the behavior you described in your last part of your post. Itā€™s still considering 0 watts as part of the average/mean value as far as I know.

Iā€™m still wondering why @xirixiz prefers the mean value. Perhaps it solves a problem in a situation I havenā€™t encountered yet.

But Iā€™m gonna change it to watts and see how it works in my case.

Looking into the linked yaml file from xirixiz I donā€™t actually see a turn_off on the input_boolean of the wasmachine. I had to add it myself in the finished automation action. Not a problem really. :slight_smile:

@Rourke
Just a partial answer because I also use statistics and the mean valueā€¦ for me the watts were all over the place, so using the statistics sensor it leveled it out enough that I could have cycle progress, like Washing, Rinsing, Spinning (although I never really finished perfecting it, it does somewhat represent what itā€™s doing) the most important part for me is that when my washer is done it leaves a green LED on until we open it again to remove the clothes. The statistics sensor allowed me to very accurately detect if that light is on, so we get reminders that there are wet clothes in the washer that need to be moved to dryer.

1 Like

This post is directed at the novice: I have been perusing this thread as I have recently purchased the TP110 plug specifically for laundering needs. Thereā€™s a lot of chatter about ā€œinputs,ā€ ā€œbooleans,ā€ ā€œtemplate sensors,.ā€ Since these plugs extract the info to HA by default, I just created an automation (ie ā€œWasher-Cleanā€) that is based on numerical value for watts, with the amps used as the condition. I have yet to test this, and it might require more conditions, but it seems pretty logical to me.

Donā€™t mean to drift the thread but I have some of these; have you seen the load recommendations in the manual?

Supported Load Types:
Coffee Maker: 800 W
Desk Lamp: 235.2 W
LCD: 270 W
Heater: 1500 W
Humidifier: 260 W
Iron: 1500 W
Toaster: 850 W
Tower Fan: 50 W

Iā€™d love to use one on my washer/dryer but havenā€™t dared due to this. Can anyone in the know with electrics share some wisdom? Donā€™t want anyone burning down their house!

It supports the maximum allowed 16a from a plug socket. So anything with a normal plug on can be powered through this without worrying about burning it out etc.

Thatā€™s what I thought 13A from the wall anyway. But why 1500w for a heater if thatā€™s the case? Isnā€™t 13A more than double that? And whatā€™s the crack with the tower fan?!

I think they are just examples of appliances and their wattages.

I keep getting the following warning in Home Assistant, and itā€™s coming from the washing machine automations.

Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x7f737a42f7a0>

Does anyone have an idea what is causing this?

Itā€™s a bug in the statistics sensorā€¦ I think it was fixed in 106ā€¦ if you search for
Unknown listener you should find a link to the github issue, I just manually made the change referenced in the github issue and havenā€™t had it anymoreā€¦

1 Like

So does your automation work? The above seems kinda crazy for something so seemingly simple. I am not a complete noob with HA but I canā€™t figure it out.

It works. But Iā€™m hounded with errors about ā€œvalue cannot be processed as a numberā€ in the log. I tried to create template sensors based on Booleans (true, false) but I continue to get errors. I canā€™t win with this thing, so I went back to using numerical value as a trigger and I ignore the log unless something is not working. Is that smart? Probably not. Is that healthier and less stress inducing? YES.