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

[Question] Power Outage Alarm


Question

Posted

Hello,

I tried to build a scene that will detect dead z-wave plugs and trigger an alarm/notification.

I like to get notification when a group of plugs/lights went dead and another notification when all devices restored their power back reporting also the time period.

Also I see that it takes a lot of time fro scene to understand that plug is offline. 

Problem is that is did not work correct. Does anyone can help or have anything similar? 

 

Please login or register to see this code.

 

Recommended Posts

  • 0
Posted (edited)

hi!

 

1) are you sure what "dead" state means is a power outage?

2) you may never (or get after a very long period) get a dead state for devices

3) dead mean what HC2 have too many issues with a device... and these issues doesn't have to be is a power outage

 

Edited by 10der
  • 0
Posted

btw: we already have a post like this comment, but I can't find it.

so. little experiment

 

given:

1) one Fibaro plug in the powered socket 

2) lua script

 

so. be sure what Fibaro plug in socket and when you press "B" button fibaro plug light.

(let Id = 969)

 

simple lua scrip

 

 

Please login or register to see this code.

 

run and press "B" button

 

Please login or register to see this image.

 

cool! yeah?

 

ok. unplug Fibaro plug from a socket (sic!)

 

YpkMfsAR9t.png

 

a-ha-ha!

 

surprise! 

 

leave script running and you still can see 1 as value for plug what you now have in your arms.... lol.

 

 

 

  • 0
Posted

I have installed an Aeon HEM on electric feed for the house. When the grid power would go off, HEM would be dead, but Fibaro would still show the last recorded power consumption value... For 6 months I thought the power never went out, until I realized what was happening...

  • Like 1
  • 0
  • Inquirer
  • Posted
    1 minute ago, 10der said:

    hi!

     

    1) are you sure what "dead" state means is a power outage?

    2) you can never (or get after a very long period) get a dead state for devices

    3) dead mean what HC2 have too many issues with a device... and these issues doesn't have to be is a power outage

     

    Thank you for your answer, I try to find a way to get power outages, I dig a lot to find any decent code that does that. I build a new version but still I can not get it trigger as I suppose "dead" state never comes active by fibaro itself. Here is the update

     

    Please login or register to see this code.

     

     

    • 0
    Posted (edited)

    @korniza maybe I was unclear... but I am trying again. You can do this on Z-wave infrastructure. alas. 

    end of story

    btw: I have RPI with battery power backup. this board is not good. it has one cons - RPI reboot when a power source is changed.

    but I make one pros = I send to HC2 event about "power source was changed and HC2 can use this event as well.

    yes. it's not good  but it's works

     

     

     

     

     

    Edited by 10der
    • Like 1
    • 0
  • Inquirer
  • Posted (edited)

    Still using the "value" of a plug, it did not respond! I have to press the button from UI to poll the value :(. Do I miss something else?

    Right now I'm thinking the second step to get data from UPS and combine them.

    Also as many times on the past, we had power outage that was flapping (Offline/Online). I like to add extra some code to detect flapping and power on devices with a delay.

    Another issue that hue lights owners may faced on past, is when power comes back after a outage, all lights turn on! I had this situation during my vacation period multiple times. 

     

    Hope someone will be inspired by real problems and be better than me to code....

     

     

     

    1 hour ago, Ros said:

    I have installed an Aeon HEM on electric feed for the house. When the grid power would go off, HEM would be dead, but Fibaro would still show the last recorded power consumption value... For 6 months I thought the power never went out, until I realized what was happening...

    I get the same on a coolcam z-wave plug. it keeps last value even if it is unplugged!

     

    Edited by korniza
    • 0
    Posted

    I have a 7 kwh battery backup for the house. Switch time to backup in case of power outage is milisecs, so all the electronics stay on. HEM is powered though the backup , but is measuring power consumption from the outside grid. My script is that whenever outside power consumption falls near 0kW for several secs, HC2 changes the power variable, which puts all the non-core systems to sleep....

    • 0
  • Inquirer
  • Posted

    Thank to @Lambik there is already a implementation using NUT for UPS. Polling VD, I can get power status. Still flapping status require much faster way....I'm stuck inside my brain....

     

     

     

    • 0
    Posted (edited)

    I understand you have a Synology connected to an UPS. So you receive a notification about the power shortage. So that is not the problem.

     

    Just thinking outside the box;

    If you have an IP-camera and Synology Surveillance Station activated, you could config an Surveillance Station action rule when a camera is disconnected (power outage) to send an http-command. You could use this http command to write a value to a HC2 global variable to trigger dead-node detection HC2 lua code.

     

    Never tested it, but it could, theoretically, work IMHO......^_^

     

    EDIT: What is the reason of this flapping power outage?

    Edited by Lambik
    • 0
    Posted
    Just now, Lambik said:

    If you have an IP-camera and Synology Surveillance Station activated, you could config an Surveillance Station action rule when a camera is disconnected (power outage) to send an http-command. You could use this http command to write a value to a HC2 global variable to trigger dead-node detection HC2 lua code.

    5

    I have disables this feature, cuz QNAP (sorry not Synology) Surveillance Station SPAM my email :)

     

    and one notice. You can ask UPS via network protocol.

    here is example

     

    Please login or register to see this code.

     

    • Like 1
    • 0
    Posted

    Nice code @10der

     

    But still what is the source of this flapping power outage?

    I had the same behaviour several years ago and the problem was an electrical group switch with bad (burned) contacts. I replaced the group switch and the issue was solved.

    • 0
  • Inquirer
  • Posted

    We had a real problem here in Greece this summer with wildfires that created a huge issue on power supply. I had 2-3 times power going up and down on a period of minute for multiple times! Fridge is got a strange sound after that.

    I know it is rare case scenario but the cost of aftermath is huge. On my low voltage electronics are protected by 4 KVA UPS but all the other are on the mercy of power flapping. 

    • 0
    Posted
    Just now, korniza said:

    We had a real problem here in Greece this summer with wildfires that created a huge issue on power supply.

    yesss! the same here! I living in a resort town... (Black sea) and situation in summer the same of you!

    • 0
    Posted

    Wow! o.O

     

    So @korniza what do you want to accomplish? A way to prevent 'flapping'?

    • 0
  • Inquirer
  • Posted
    1 minute ago, 10der said:

    yesss! the same here! I living in a resort town... (Black sea) and situation in summer the same of you!

    I feel you! As extreme climate is getting more and more a reality, the source of power flapping will get bigger and even more destructive. I hope to find a way and get power outage detected less that 10 seconds. I Love to put a global variable PowerFlap =1 if multiple power on/off is detected so the next time will delay to power on the fridge for X seconds.

    • 0
    Posted

    Do have an one or three phase main power supply to your house?

    • 0
  • Inquirer
  • Posted
    2 minutes ago, Lambik said:

    Wow! o.O

     

    So @korniza what do you want to accomplish? A way to prevent 'flapping'?

    yes!!!! Power flapping can create more failures than a power outage. Prevent flapping is my request.

    • 0
    Posted

    Do have an one or three phase main power supply to your house?

    • 0
  • Inquirer
  • Posted
    Just now, Lambik said:

    Do have an one or three phase main power supply to your house?

     1 phase... You are thinking too clever I can admit :P but is it not effective in my case. I feel creativity is in the air...

    • 0
    Posted
    Just now, Lambik said:

    Do have an one or three phase main power supply to your house?

    I have three 

     

    Please login or register to see this image.

    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...