Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Turn off socket after X time and back on again after Y time

Options
  • 05-03-2021 3:40pm
    #1
    Registered Users Posts: 7,405 ✭✭✭


    Looking for a solution (hardware/software) for the following.
    1. I have a device that's plugged in all the time but not drawing power
    2. When the device is turned on (drawing power), I want it to be powered for X minutes
    3. After the X minutes are up, power should turn off to the device
    4. When Y minutes are up, power should be restored
    5. X & Y should be configurable

    I use the Google ecosystem and have some TP link smart switches if they would be any use. I probably could have done this in Stringify but it's gone and I had a click around IFTTT, and I can't see any way.


Comments

  • Registered Users Posts: 9,028 ✭✭✭Gregor Samsa


    You'd need some sort of smart plug that's also a power meter (that can measure the amount of electricity passing though it). Most smart plugs don't have that ability, but this specific one from TP link seems to:

    https://www.tp-link.com/uk/home-networking/smart-plug/kp115/

    "Energy Monitoring – Analyze the connected device's real-time and historical power usage."

    Assuming you can use the real time power consumption monitoring to create a threshold where a timer is then activated, you could turn the plug off after X amount of time, then back on after Y amount of time. I've no idea if the Kasa Smart app itself would allow you to do this - it says it has a scheduler and timer, but it's not clear if it can be linked to the energy monitoring. But maybe it's a place to start.

    There's also this model: https://www.tp-link.com/uk/home-networking/smart-plug/hs110/


  • Registered Users Posts: 9,028 ✭✭✭Gregor Samsa


    According to a review on Amazon (US)
    Energy monitoring is basically just recording usage. You can act upon the recorded values only in a very limited way. It allows one to on/off the plug according to a timer or a schedule but you can’t react to say a drop in wattage, so using this to “monitor” a device is a shortfall in design. At least let users be alerted to changes in values, or spikes so that we can actually monitor and deterministically act upon that usage monitoring

    I had to return this device and look elsewhere for a more complete energy monitor, like my Eve Energy or Aqara units
    https://www.amazon.com/Kasa-Energy-Monitoring-Smart-Plug/dp/B08LN3C7WK

    I'm not fully sure, but it seems to imply that you can't base automations off the energy monitoring. I'm not familiar with the Eve Energy or Aqara devices they mention, but they could be worth looking into too.


  • Registered Users Posts: 1,606 ✭✭✭THE ALM


    If you could run home assistant on a rpi or something you could set this up using the automations or node red. TP Ling plugs are supported so should be fairly straight forward.


  • Registered Users Posts: 12,685 ✭✭✭✭R.O.R


    THE ALM wrote: »
    If you could run home assistant on a rpi or something you could set this up using the automations or node red. TP Ling plugs are supported so should be fairly straight forward.

    I have half of that set up with homeassistant, when the smart plugs for the electric blankets turn on they trigger a timer (longer for her side than mine) and when the timers finish the plugs turn off.

    No reason why finishing one timer couldn't trigger another timer and that finishing would trigger the smart plug back on again.

    Done through automations rather than node red. Timers have individual names and can be easily adjusted. There's probably a more straight forward way of doing this, but this way works for me.

    Have homeassistant running in virtualbox on a pc that's also a media server, so always on.


  • Registered Users Posts: 9,028 ✭✭✭Gregor Samsa


    R.O.R wrote: »
    No reason why finishing one timer couldn't trigger another timer and that finishing would trigger the smart plug back on again.

    Yeah, but according to the OP, they want to begin with the smart plug on, and the device off. Then, when the device itself is turned on (not the smart plug), a timer would start to turn the plug off after x amount of time. You need to be measuring the power running through the plug to do that, and be able to run an automation based upon a defined power threshold. After that, the timers are simply based on time elapsed, but the starting condition isn’t something you can do with most smart plugs.


  • Advertisement
  • Registered Users Posts: 12,685 ✭✭✭✭R.O.R


    Yeah, but according to the OP, they want to begin with the smart plug on, and the device off. Then, when the device itself is turned on (not the smart plug), a timer would start to turn the plug off after x amount of time. You need to be measuring the power running through the plug to do that, and be able to run an automation based upon a defined power threshold. After that, the timers are simply based on time elapsed, but the starting condition isn’t something you can do with most smart plugs.

    Missed that bit, long week...

    Will need a plug that can measure power draw then, but from what I've read most aren't too reliable doing that. Might be easier (if possible) to use a smart plug to turn on the device rather than leaving it plugged in but not drawing power.


  • Registered Users Posts: 7,405 ✭✭✭fletch


    Thanks....will invest in an rpi and the tp link with energy monitoring and see what I can do


  • Registered Users Posts: 23,538 ✭✭✭✭ted1


    fletch wrote: »
    Looking for a solution (hardware/software) for the following.
    1. I have a device that's plugged in all the time but not drawing power
    2. When the device is turned on (drawing power), I want it to be powered for X minutes
    3. After the X minutes are up, power should turn off to the device
    4. When Y minutes are up, power should be restored
    5. X & Y should be configurable

    I use the Google ecosystem and have some TP link smart switches if they would be any use. I probably could have done this in Stringify but it's gone and I had a click around IFTTT, and I can't see any way.

    If you can provide more details on the device there might be a easier method. Temperature, humidity based etc.


Advertisement