Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

AUTO POWEROFF STANDBY DEVICES


Question

Posted

This simple script is used to auto cutoff power to standby devices.

In my house I found some device (TV Decoder, WIFI printer and so on) that when in standby consume about 20W.

So i've placed a wallplug on every device and with this script i don't need anymore to disconnect the power after their usage .... the script do it for me !!!

HOW TO USE IT :

devices : put your devicesID that need to be controlled.

minpower : for every device in devices, specify here a watt value that is < of the standby power consumption.

timer : for every device in devices, specify an amount of time that need to be on before the cutoff.

names : for every devices, specify the name of the device (only for LOG)

Script autorun every 180 sec .... tune it if you prefer to run more or less frequently !!!

For logging normally I use a global variable called DEBUG : set it to 1 in order to enable log.

Please login or register to see this code.

7 answers to this question

Recommended Posts

  • 0
Posted

I have thought about this too, but there is small problem for me - it takes one more "click" If I want to use this device again later. I always have to turn ON wall plug also this way.

If you think of something that can be triggering device when I need it - then it would be best

Please login or register to see this image.

/emoticons/default_icon_rolleyes.gif" alt=":roll:" />

  • 0
  • Inquirer
  • Posted
    I have thought about this too, but there is small problem for me - it takes one more "click" If I want to use this device again later. I always have to turn ON wall plug also this way.

    Yes, you're right

    If you think of something that can be triggering device when I need it - then it would be best

    Please login or register to see this image.

    /emoticons/default_icon_rolleyes.gif" alt=":roll:" />

    I haven't got your problem (becouse is not problem for me), but a simple solution may be to use a keyfob (like DSA22) to turn on the devices.

    Another solution is to use (if you have) the PIR to turn on devices associted to some room.

    Eg. If PIR detect movement in bedroom, turn on bedroom TV ......

    • 0
    Posted

    Just checking in here to say a big thanks to candrea77. I took the liberty of taking your script and adapted it to my needs which is a power sequencer. I hope you don't mind..

    What I have is fully active speaker setup which is somewhat complicated to switch on for anybody who is not fully aware of how it works. What I did is to get myself a Greenwave 6 port switch to which I have connected my AV receiver to outlet 1 (which is the only one HC2 can currently measure power consumption on). When the AVR is switched on the power consumption is detected and the other outlets are switched on sequentially in order to keep inrush current reasonable and to not have to creep in behind the stuff and switch them on. If I switch the AVR off the reverse happens and all the gear is switched off sequentially.

    maindevice = My first outlet on the Greenwave 6 port switch

    devices = List of IDs for the rest of the outlets to be sequenced

    nextdevicedelay = Delay array in case something needs individual timing

    triggerlevel = Power consumption trigger level

    timer = Original timer from original script

    names = Array of proper names as per original script (Slutsteg=Power Amp, Najda=Active filter, Uttag=Outlet)

    debug = "Debug" is a variable used for debugging and global control of debug messages

    onoff = "StereoOn" is a variable used for storing the stereo state i.e. On (1) or Off (0).

    I use quite agressive indentation so that I at least have a chance of placing my "end" in the right place.

    Please login or register to see this image.

    /emoticons/default_icon_redface.gif" alt=":oops:" />

    Please login or register to see this code.

    • 0
    Posted

    Hi,

    I know this is an old thread but I just bought HC2 and i'm having some trouble configuring it.

    I have a fibaro wall plug to my TV and Receiver. Power consumption in standby is around 80W...and with them working is 400 W

    I would like the wall plug to turn off 5 minutes after I switched the devices off.

    So I took your script and modified device id (the wall plug), set the time to switch off to 5 min. But I don't understand what am I supposed to write at the minpower parameter in the script. I understand from your explanation to put a value which is less then what my devices consume in standby mode ?! I entered 50 which is less then my 80W standby but I get an error:

    line 33: attempt to compare nil with number.

    If I put a value higher then standby consumption, lets say 100, then the script has no error but it doesn't do anything.

    Can you help please?

    Regards

    Claudiu

    • 0
    Posted

    If you put a value lower than your standby consumption then the switch-off will not happen i.e. you should put a value between your standby value and the actual consumption when running.

    Are your running 3.x or 4.x HC2 software? I think the power consumption reado-out has changed in 4.x to "getValue(id, 'power')". I have no idea if the rest of the code works in 4.x.

    • 0
    Posted

    Spot on !

    Thank you !

    Indeed changing the getValue to 'power' solved it. Script running fine now.

    Woops: spoke too soon:

    some power on/off cycles later it came back with an error

    debug:TROPPE SCENE

    And of course it doesn't work anymore

    Claudiu

    EDIT:

    I found another script made by user m-joy in this post

    Please login or register to see this link.

    This works well:)

    Thank you

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...