The Vera Community forums have moved!

General => Vacation & Rental => Topic started by: integlikewhoa on April 20, 2014, 01:57:48 pm

Title: Alert if Vera offline
Post by: integlikewhoa on April 20, 2014, 01:57:48 pm
I have multiple Vera's. One at a vacation home. I just found out the other day the vacation home is offline. I haven't been out there yet to see whats going on. 
I don't check that Vera Daily and I have no Idea when it went offline. My question is

Whats the easiest way to check in on that Vera and send me an alert when It looses online connection to me.

Can I have one Vera ping the other and send me an alert if the other doesn't respond? If so how would that be done?
Title: Re: Alert if Vera offline
Post by: clippermiami on April 20, 2014, 02:21:51 pm
I have multiple Vera's. One at a vacation home. I just found out the other day the vacation home is offline. I haven't been out there yet to see whats going on. 
I don't check that Vera Daily and I have no Idea when it went offline. My question is

Whats the easiest way to check in on that Vera and send me an alert when It looses online connection to me.

Can I have one Vera ping the other and send me an alert if the other doesn't respond? If so how would that be done?

I don't have a remote Vera but I do have my local Vera setup to ping some important connections such as my Internet router, my ISP's Gateway, the Alarm System Gateway, my SysLog server, the tablets around the house used for home control, etc. Depending on the function these are polled from every 15 seconds to every 60 seconds using the Ping Sensor Plugin. Notifications are sent depending on the criticality of the connection.

You could do the same with your remote Vera assuming it has a fixed IP or a Dynamic DNS configured. You could then send an alert to yourself using SMTP, Twilio (SMS or voice), Pushover, or some combination using Vera Alerts (which it's what I use)

Title: Re: Alert if Vera offline
Post by: BulldogLowell on April 20, 2014, 02:30:38 pm
Or have it send you something (an alert or notification attached to something that happens daily) every day.

No alert that day, you may have a problem.
Title: Re: Alert if Vera offline
Post by: integlikewhoa on April 20, 2014, 03:26:21 pm
I don't have a remote Vera but I do have my local Vera setup to ping some important connections such as my Internet router, my ISP's Gateway, the Alarm System Gateway, my SysLog server, the tablets around the house used for home control, etc. Depending on the function these are polled from every 15 seconds to every 60 seconds using the Ping Sensor Plugin. Notifications are sent depending on the criticality of the connection.

You could do the same with your remote Vera assuming it has a fixed IP or a Dynamic DNS configured. You could then send an alert to yourself using SMTP, Twilio (SMS or voice), Pushover, or some combination using Vera Alerts (which it's what I use)

Didn't know there was a Ping Sensor Plugin, I think that is exactly what I'm looking for. Going to play with it now. Thanks
Title: Re: Alert if Vera offline
Post by: integlikewhoa on April 20, 2014, 04:31:55 pm
Well I haven't been known to be the brightest bulb..... But for some reason I can't get this to work right. I went back to just testing a local ip of my main computer which is 192.168.1.100.  I set poll sec. To 15. And I'm not really sure what to set time out sec. It was at 0 then I set it at 15. It never seems to change for me. Always red. I do have it on armed and normal. Any thoughts? I'm sure it's a simple mistake.
Title: Re: Alert if Vera offline
Post by: clippermiami on April 20, 2014, 04:48:50 pm
Try setting it to "Invert", all of mine are set that way and everything is fine.
Title: Re: Alert if Vera offline
Post by: integlikewhoa on April 20, 2014, 09:47:03 pm
Try setting it to "Invert", all of mine are set that way and everything is fine.

Thanks, I did figure out I like the Invert on colors seem better for me that way.

My real problem is right now is looks like I can't ping a port.

So while I'm away my WAN IP is only one number. But with port forwarding I have access to each camera, Each wireless Access point, Blueiris and much more. The way it's working now I can only tell if my WAN is up or not and not if a particular device is running.

If I had 2 Veras in one location and one went down this would work. But 2 devices in one location and modem or router down I would get no alert. So doesn't help me much.

Anyone Have any Ideas?  I don't really don't want to get an "OK" message everyday just to see if its up. 
Title: Re: Alert if Vera offline
Post by: garrettwp on April 20, 2014, 10:47:40 pm
First be very careful of Port forwarding! Second, it may be easier to create a scene on each Vera to write a variable say a time stamp to the other Vera. Have a scene check that time stamp if it's older than a certain time.

- Garrett

Title: Re: Alert if Vera offline
Post by: clippermiami on April 21, 2014, 07:03:53 am
Try setting it to "Invert", all of mine are set that way and everything is fine.

Thanks, I did figure out I like the Invert on colors seem better for me that way.

My real problem is right now is looks like I can't ping a port.

So while I'm away my WAN IP is only one number. But with port forwarding I have access to each camera, Each wireless Access point, Blueiris and much more. The way it's working now I can only tell if my WAN is up or not and not if a particular device is running.

If I had 2 Veras in one location and one went down this would work. But 2 devices in one location and modem or router down I would get no alert. So doesn't help me much.

Anyone Have any Ideas?  I don't really don't want to get an "OK" message everyday just to see if its up.

Unfortunately that's the way PING works :-) You might be able to work out something using HTTPS requests in LUA code talking directly the device or via MiOS forwarders?
Title: Re: Alert if Vera offline
Post by: integlikewhoa on August 08, 2014, 05:41:22 pm
Anyone have a new or better idea on this? Had power go out at the vacation house last week sometime.

I would like to get an alert when it goes offline rather then finding out a week or more later when I happen to physically log into vera and can't get a connection.
Title: Re: Alert if Vera offline
Post by: BOFH on August 08, 2014, 06:56:04 pm
The problem is that when the power goes out, so most likely does your vera and router. Ergo, no power, no notification.
At one time, someone made a plugin for UI4 that allowed Vera to communicate with a UPS. Which would be just what you need.
Vera and internet router on UPS. If power fails, UPS signals Vera who sends you a notification. hopefully before the UPS dies ;)
If power returns and UPS is till powering Vera she could send a 'power back' notification. Not sure how you coudl do that if the outage is longer than your UPS battery lasts.

I'm unsure where that plugin went and if it's even compatible with UI5 or even UI6.

I tought about this some more and came up with the below scenario:

If you have a DD-WRT router at your vacation, you can use it, the geo-fencing script for those and an IP device (eg a camera)
Have Vera, your internet router and the DD-WRT router on UPS but have the IP camera directly connected to the mains. Using the geofencing script, if the camera disconnects from the routee, you can assume power failed. The script will trigger a (multi)switch plugin on Vera which can then send you a notification. An added benefit would be that you can use the camera to look at your vacation home.

I use this solution with my cell so Vera knows when I come home and leave. It also pings my main server and my ISP's DNS server.
I'm gonna add one of my camera's so I can use it as a 'power outage' detector as described above.

Required hardware:
1 UPS
1 DD-WRT (atheros) compatible router (These can be had pretty cheaply recertified)
1 IP Camera (Vera compatible)


Title: Re: Alert if Vera offline
Post by: integlikewhoa on August 13, 2014, 10:59:43 pm
The problem is that when the power goes out, so most likely does your vera and router. Ergo, no power, no notification.
At one time, someone made a plugin for UI4 that allowed Vera to communicate with a UPS. Which would be just what you need.
Vera and internet router on UPS. If power fails, UPS signals Vera who sends you a notification. hopefully before the UPS dies ;)
If power returns and UPS is till powering Vera she could send a 'power back' notification. Not sure how you coudl do that if the outage is longer than your UPS battery lasts.

I'm unsure where that plugin went and if it's even compatible with UI5 or even UI6.

I tought about this some more and came up with the below scenario:

If you have a DD-WRT router at your vacation, you can use it, the geo-fencing script for those and an IP device (eg a camera)
Have Vera, your internet router and the DD-WRT router on UPS but have the IP camera directly connected to the mains. Using the geofencing script, if the camera disconnects from the routee, you can assume power failed. The script will trigger a (multi)switch plugin on Vera which can then send you a notification. An added benefit would be that you can use the camera to look at your vacation home.

I use this solution with my cell so Vera knows when I come home and leave. It also pings my main server and my ISP's DNS server.
I'm gonna add one of my camera's so I can use it as a 'power outage' detector as described above.

Required hardware:
1 UPS
1 DD-WRT (atheros) compatible router (These can be had pretty cheaply recertified)
1 IP Camera (Vera compatible)

I think your on the wrong track. I don't need the vera that's down to report to me. I have more then one vera in different locations. Would be easier to use the vera that has power and internet to check in with the other and if no response report to me.

Internet down the communication to UPS wouldn't help me.

I have posted many times in the DDWRT post and currently use that on multiple routers in both houses for home away.

What I really need is a way to use my DDWRT from one house to ping the vera from the other house. Problem like above is a can't ping anything but the router as you can't ping ports. Anyone know away (script) to use the MIOS servers to try and see if the vera is online. 
Title: Re: Alert if Vera offline
Post by: SOlivas on August 15, 2014, 09:27:28 pm
There are quite a few different ways you could go about this, but most involve things like playing with advanced networking concepts, VPN protocols, etc. 

One idea that does come to mind (mind you this is a half-baked idea I have not played with and doesn't require you to modify your router settings to setup port forwarding):

1. Go get yourself a very cheap VPS host (I'm a FreeBSD person myself, but places like vr.org will give you a basic VPS server for $10/month).

2. Setup some user accounts, generate some user key(s)

3.  On your vacation home's Vera 3, setup a cron job that fires off a script that connects to the VPS host with SSH and updates the timestamp/data of a file on the system.

4.  On your system at home, setup another cron job to fetch this remote file and compare timestamps.  If the timestamps are off than say x+y minutes (x = the update interval of the Vera in your vacation home, y = how much of a time difference you are willing to tolerate before generting an alert), raise an alert.


Mind you, this assume that:

1.  You know *nix and how to do shell scripting
2.  Have logged into your Vera via SSH and know how to setup cron jobs
3.  Are willing to pay $10 (or whatever nominal fee) for a VPS host to basically act as a file server for a single file.


--

Other fun ideas (don't recommend trying unless you really know what you are doing):

Setup tunneling between your two networks (home and vacation house). 
You can use a VPN protocol and put the networks on separate subnets.

Use EoIP (Ethernet over IP) to transport Ethernet frames over IP packets to basically glue your two networks together (don't do this).  www.youtube.com/watch?v=Sj8I7J3J0Ek




Title: Re: Alert if Vera offline
Post by: integlikewhoa on August 17, 2014, 01:05:34 pm
There are quite a few different ways you could go about this, but most involve things like playing with advanced networking concepts, VPN protocols, etc. 

One idea that does come to mind (mind you this is a half-baked idea I have not played with and doesn't require you to modify your router settings to setup port forwarding):

1. Go get yourself a very cheap VPS host (I'm a FreeBSD person myself, but places like vr.org will give you a basic VPS server for $10/month).

2. Setup some user accounts, generate some user key(s)

3.  On your vacation home's Vera 3, setup a cron job that fires off a script that connects to the VPS host with SSH and updates the timestamp/data of a file on the system.

4.  On your system at home, setup another cron job to fetch this remote file and compare timestamps.  If the timestamps are off than say x+y minutes (x = the update interval of the Vera in your vacation home, y = how much of a time difference you are willing to tolerate before generting an alert), raise an alert.


Mind you, this assume that:

1.  You know *nix and how to do shell scripting
2.  Have logged into your Vera via SSH and know how to setup cron jobs
3.  Are willing to pay $10 (or whatever nominal fee) for a VPS host to basically act as a file server for a single file.

Never used VPS before. May or may not be over my head at this point. I'm still thinking that there has to be an easier way and or a way without a monthly hosting fee. Going by your theory of time stamps and such. I'm thinking of a new idea.

What about a having one vera flip a virtual switch on the the other vera every so often. Then using pleg to say if this switch doesn't get flipped (ture) after more then X minutes then its down.

Other thing would also be a count down timer. I use Richards timers already. I would have the timer set to so many min. and the other vera needs to keep reseting it, if it fails to reset it then time runs out and sends me an alert.

I ofcourse would like to know as soon as possible when its down so I don't know whats a good check in time. 24 hours seems ideal for load, but of course I would like every min.
Maybe have a scene trigger every hour to send a HTTP command threw mios to the other Vera to flip the switch?
Title: Re: Alert if Vera offline
Post by: integlikewhoa on August 18, 2014, 09:46:48 pm
Well I did it. I'm not sure repercussion is doing it the way I did, but it works. Maybe resource hog? Looking for opinions, other options and comments on this. 

So on my vacation house VERA I setup a scene to run every 5 min. and it runs this luup code which turns on a virtual multiswitch on my other vera.

Code: [Select]
luup.inet.wget("https://fwd2.mios.com/[b]USER[/b]/[b]Password[/b]/[b]Vera Serial[/b]/data_request?id=lu_action&DeviceNum=81&serviceId=urn:dcineco-com:serviceId:MSwitch1&action=SetStatus7&newStatus7=1")
On my daily home vera I used an existing multiswitch (Device #81 and button #7) and set the multiswitch to PULSE button #7 (flip it back off as soon as it turns on).

Then I used PLEG to send me an alert if Button #7 hasn't been turned on (or been off more then) within the last 5.5min.

I'm instrested to see or know the negative effects on running a scene or HTTP every 5 min. If there is none I would like to bump it up to 1 min. Is there is strain then I could knock it down to every hour or 24 hours.
Title: Re: Alert if Vera offline
Post by: RexBeckett on August 19, 2014, 02:40:50 am
That looks like a good solution. It's a classic watchdog timer. I would not expect much resource impact on either Vera with a five minute cycle time.

The PLEG logic at the receiving end needs some care to ensure it catches the reset cycle stopping during a restart.
Title: Re: Alert if Vera offline
Post by: karenbobiv on November 05, 2014, 09:04:05 pm
I also have a vacation rental, about 7 hrs away, and I can't afford to have the system go down, so I put in redundancies.  First, I have two Vera boxes.  The Primary Vera is attached to two iBoot devices that have auto-ping function.  It pings both the Vera box and the internet.  After a set number of failures (either one) it cycles and then tries again.  If it fails a second time then it turns off the Primary Vera and DSL Modem and switches on the Backup Vera that is connected to a 4G Hotspot device (using wi-fi dongle into Vera WAN).  This gives me complete redundancy of both Vera and communication pathway.  Backup Vera has a scene that notifies me that it's operational. 

But that's not all....  I also have everything on UPS and a TED5000 (plus Vera plugin) that I use to determine if the power is out, which Vera then uses to launch a notification.  UPS lasts about 95 minutes before it dies, so even with a sudden power outage I get a notification.  I also have a Dataprobe "Power Pal" that I can use to phone in and check on the power state, as well as reset everything back to the Primary Vera.  I also use a Cisco VPN to tunnel in so I can check on things, such as the two iBoots status or TED5000 webpage.  Using the VPN access, I can reset the iBoot counters or manually switch power.  Given amount of home automation I have, as well as volume of guests throughout much of year, I can't afford to lose contact with the house.  Lots of trial and error.  As soon as I think I've got all the bases covered, something new happens.
Title: Re: Alert if Vera offline
Post by: ldomingues on January 07, 2016, 05:15:38 pm
Hello,

I'm looking for a similar solution, to be notified that the Internet is done, and thus any push notifications from Vera are not being sent.

I don't want to invest in a virtual server neither a 4G Dongle.

The best/cheapest solution I could find was using an old Android phone with Tasker ((https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm).

I would then use a script to ping several servers, and if the connection fails, send me a text message.

This approach has the following advantages:
no monthly cost, except the cost of each text message sent
cheap old android device
no need for additional internet connection
text message will work even if I had disabled data services while I'm travelling to reduce roaming costs
the phone battery will be the UPS - so, if the internet fails because of power failure, the text message would be sent anyway
I can also setup an alert when the power fails (tasker can be setup to send a text message when the phone is running on battery and again when the power is back)

So far, it's only theory, I haven't yet implemented any of this. Any suggestions?
Title: Re: Alert if Vera offline
Post by: integlikewhoa on January 07, 2016, 05:59:47 pm
Hello,

I'm looking for a similar solution, to be notified that the Internet is done, and thus any push notifications from Vera are not being sent.

I don't want to invest in a virtual server neither a 4G Dongle.

The best/cheapest solution I could find was using an old Android phone with Tasker ((https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm).

I would then use a script to ping several servers, and if the connection fails, send me a text message.

This approach has the following advantages:
no monthly cost, except the cost of each text message sent
cheap old android device
no need for additional internet connection
text message will work even if I had disabled data services while I'm travelling to reduce roaming costs
the phone battery will be the UPS - so, if the internet fails because of power failure, the text message would be sent anyway
I can also setup an alert when the power fails (tasker can be setup to send a text message when the phone is running on battery and again when the power is back)

So far, it's only theory, I haven't yet implemented any of this. Any suggestions?

Where are you located and what text plan do you have in mind on using without a monthly cost or recharging every few months required?
In the USA it doesn't seem to have many no monthly options without you having to add or use so much to keep your account active.

What happens when power is out at the house (modem, switch, router, vera)?

After you get a text (I would assume your away from home) what is your next step?

How often do you loose power or internet?

What's your option to remotely restore either of these? (this is kind of a repeat maybe of questions 2)
Title: Re: Alert if Vera offline
Post by: hellovn on January 07, 2016, 06:56:37 pm
I just know about IFTTT and already use it for my home automation. I think you can check if Vera or Luup code is offline by using IFTTT. You will have to open port from your vera and use IFTTT by:

1. The Maker Channel.

2. Phone Channel.

The Maker channel will send a request to your vera web server and will trigger an event. You can set it up to call or SMS to your phone.

Title: Re: Alert if Vera offline
Post by: RichardTSchaefer on January 07, 2016, 07:08:53 pm
If I loose Internet  connectivity (And it happens often ... since I live way outside a city/town using multi-hop radio links) my Vera's reboot automatically when the connection is restored. I did not have do anything.

Then I get notified by the "Vera Alerts" plugin  when Vera Restarts.

So I do not know when it happens ... but I am never off the air for more than an hour.
Title: Re: Alert if Vera offline
Post by: integlikewhoa on January 07, 2016, 07:17:53 pm
If I loose Internet  connectivity (And it happens often ... since I live way outside a city/town using multi-hop radio links) my Vera's reboot automatically when the connection is restored. I did not have do anything.

Then I get notified by the "Vera Alerts" plugin  when Vera Restarts.

So I do not know when it happens ... but I am never off the air for more than an hour.

I'm in the same boat, I just curious to as what you can do when your away from home get a text your ISP is down. Never been worth my hassle to setup a sim card just for this purpose. Last time I looked here in the US, every prepaid phone had some min. payment every so often to keep your phone number or account active. So even if I thought I wouldn't use it much I had to keep recharging so much anyways as it expires. I think if I got to far into it, it would be better for me just to add on to my unlimited sprint data plan for so much a month. Then I can use the router on the UPS to fall over to LTE backup and keep vera up even during a power loss. But that would cost me 20ish a month which I have avoided. 
Title: Re: Alert if Vera offline
Post by: ldomingues on January 08, 2016, 05:26:49 am
Where are you located and what text plan do you have in mind on using without a monthly cost or recharging every few months required?
In the USA it doesn't seem to have many no monthly options without you having to add or use so much to keep your account active.

I'm in Portugal. Vodafone provides a free SIM card. You just need to use it once a month, otherwise you get billed for ?0.50/month.

Sorry, content is in Portuguese, the plan is Vodafone Flat: http://www.vodafone.pt/main/particulares/tarifarios/plano-flat.html

There should be similar plans for other Vodafone countries in Europe.

What happens when power is out at the house (modem, switch, router, vera)?
If the power is down, the Android phone has battery and will detect power is down and text me.

After you get a text (I would assume your away from home) what is your next step?
I cannot access Vera neither the cameras, so I would call my neighbors to check if there's anything wrong. In any case, when the power is back I can use the cameras if there was any burglary (providing they didn't steal the cameras attached to the ceiling ;-)

How often do you loose power or internet?
Not often, sometimes when the router gets automatic firmware upgrades from the ISP.

What's your option to remotely restore either of these? (this is kind of a repeat maybe of questions 2)
Call the neighbors. Everything should be working again once power is back up, or the router reboots.
So, the approach would be, if it's down for too long, there's something wrong. If it's down for 5 minutes is business as usual.
Title: Alert if Vera offline
Post by: HarriettDigTD on January 27, 2017, 09:13:46 am
hell, the file properties are not giving me the option to change the file type. Still researching this problem.... any ideas?
Title: Re: Alert if Vera offline
Post by: Derek on March 04, 2017, 04:11:47 pm
I may be missing what you're trying to do, but UI7 has an option for the Vera mothership to send an alert when you're Vera is offline.  I have my Vera reboot itself every day (using a cheap timer plug in from Walmart that it's plugged into) and I get an alert every day of it being offline and then back online.

The setting is under User/Account Info, Notification Settings, and "Controller Offline Alert (Your Vera lost its Internet connection.)



Hello,

I'm looking for a similar solution, to be notified that the Internet is done, and thus any push notifications from Vera are not being sent.

I don't want to invest in a virtual server neither a 4G Dongle.

The best/cheapest solution I could find was using an old Android phone with Tasker ((https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm).

I would then use a script to ping several servers, and if the connection fails, send me a text message.

This approach has the following advantages:
no monthly cost, except the cost of each text message sent
cheap old android device
no need for additional internet connection
text message will work even if I had disabled data services while I'm travelling to reduce roaming costs
the phone battery will be the UPS - so, if the internet fails because of power failure, the text message would be sent anyway
I can also setup an alert when the power fails (tasker can be setup to send a text message when the phone is running on battery and again when the power is back)

So far, it's only theory, I haven't yet implemented any of this. Any suggestions?
Title: Re: Alert if Vera offline
Post by: herbertsherbert on May 14, 2017, 10:17:51 pm
I am finding it quite a disappointing that Vera does not have a contingency to warn the user if their box has failed.  I have always assumed that there was some kind of minimal communication from Vera to our vera units that checked that it was working. 

I have set some units up in some very remote places and will have to replace them with something that does not put me in a bad position. 
Title: Re: Alert if Vera offline
Post by: RichardTSchaefer on May 15, 2017, 10:22:27 am
I do not use the Vera app ... but I would think it would complain if it could not talk to your Vera.

I use Vera Proximity for my GeoFencing. It let's me know if it can't talk to Vera when it tries to update the status of location.
But my house is so automated ... I know when Vera is down ... I have to remember where the light switches are and how to use them ;)
Title: Re: Alert if Vera offline
Post by: integlikewhoa on May 15, 2017, 11:47:45 am
I do not use the Vera app ... but I would think it would complain if it could not talk to your Vera.

I use Vera Proximity for my GeoFencing. It let's me know if it can't talk to Vera when it tries to update the status of location.
But my house is so automated ... I know when Vera is down ... I have to remember where the light switches are and how to use them ;)

Yes but on vacation houses or remote houses your not there everyday (sometimes several months) and your also not opening the app everyday to that house to manually test the connection. When I finally do check on it, it may have been down for sometime (and probley no way to tell at that point how long either). Also everyone has different redundancy's (power/internet) but If I find out a week later that my vera is down and power or internet was cut to the house a week prior during an break in I would be a bit upset.

It would be nice to have vera's server send a notification when vera is down or up. This would log times and let you know somethings up check cameras or other devices at the house to see if all connections are lost, is vera just locked up or whats going on before finding out who knows when you manually check the next time.
Title: Re: Alert if Vera offline
Post by: herbertsherbert on June 18, 2017, 05:40:04 pm
Vera has this option but Vera had to do some magic to make mine work.  Be aware, that the option is login dependent so you can't just use the admin login to alter whether you want to system notifications turned on or off for each user.

My issue now is that the unit (units in my case) continually go up and down for unknown reasons.  I checked my unit once during a warning and it was offline while my internet connection was perfectly sound.  I emailed Vera about this and got no response.  Too many errors is just as bad as no errors. They just get ignored.

It would be nice if you could specify "don't warn me unless the unit or error has persisted for over an hour or some specified time".  That is, if the mysterious and continual controller down/controller up messages persist.
Title: Re: Alert if Vera offline
Post by: Mike Yeager on April 28, 2018, 03:36:27 pm
I am looking for a way to know that the controller is "offline" from the perspective of remote access. I've had several days of not being able to access mine remotely when it was perfectly fine. Vera told me I needed to check the Ergy plugin and that it might be causing memory issues, but I removed that obnoxious hog a year or so ago. Will try the settings method to see if that does what I need, but will keep looking...