News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Has anyone created a program to monitor the connection status? Alert when down.

Started by MrTom, April 01, 2017, 05:22:11 PM

Previous topic - Next topic

MrTom

My OBi is basically set-it-and-forget-it. It hardly gets used, but mainly for incoming calls from dentists, doctors, pest control, etc. But just a while ago it was down and wasn't working. I missed a few messages from the dentists office. I rebooted it and it was back up again.

I have a 24/7 computer on my network and would like a program to be running 24/7 to monitor my OBi LAN Status page (IPADDRESS/DI_S_.xml). Has anyone made a program yet that logs into the status webpage and downloads the .XML file to monitor the connection status? This way no internet connection required for the software and it's relying only on local networking.

If not I'm considering breaking out my VB to make an XML parser. Any ideas?

SteveInWA

You don't need to write any software.  The work has already been done for you.

You simply need to add your OBi device to the OBiTALK dashboard, then click on the device name, click on OBiEXTRAs, then click on Settings.  See my screenshot below.  You do not need to pay for OBiEXTRAs to make this feature work.  Obihai will periodically test that it can contact your device.  If it can't reach it, it can send you an email, or a text message.  Note:  OBi 1x0 devices are not supported, but this feature is available for all current OBi products.


ubergoober

MrTom,
If you've got a 100 series device, or want to do things in a more custom manner, there's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.  I have node-red rebooting my 202 each night, but not before it checks the web interface to see if either of the ports are off hook. 

In your case you could periodically check the web page containing your service provider status for anything other than connected, and upon finding a problem, e-mail, tweet, etc. 

MrTom

Quote from: ubergoober on April 03, 2017, 05:48:07 PM
MrTom,
If you've got a 100 series device, or want to do things in a more custom manner, there's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.  I have node-red rebooting my 202 each night, but not before it checks the web interface to see if either of the ports are off hook. 

In your case you could periodically check the web page containing your service provider status for anything other than connected, and upon finding a problem, e-mail, tweet, etc. 

I have a 200. I'll look into Node-red. As long as I can run it on a Windows PC it might do the trick. Thanks.

I've tried the OBi notify option. I thought it was part of the paid OBi Extras since it was near that configuration. I entered my email address and ran over and pulled the plug. But I didn't see anything in my email. I gave it 5 or ten minutes, but nothing. I figured it was broke. I checked my email the other day and found the alert notifying me that my OBi was down. I never did get a text message even though I had my phone number entered too. Definitely not the real-time monitoring I'd expect. Which is why I'd want something more local to alert me at least within a 30 second time frame.

SteveInWA

Quote from: MrTom on April 03, 2017, 10:13:26 PM
Quote from: ubergoober on April 03, 2017, 05:48:07 PM
MrTom,
If you've got a 100 series device, or want to do things in a more custom manner, there's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.  I have node-red rebooting my 202 each night, but not before it checks the web interface to see if either of the ports are off hook. 

In your case you could periodically check the web page containing your service provider status for anything other than connected, and upon finding a problem, e-mail, tweet, etc. 

I have a 200. I'll look into Node-red. As long as I can run it on a Windows PC it might do the trick. Thanks.

I've tried the OBi notify option. I thought it was part of the paid OBi Extras since it was near that configuration. I entered my email address and ran over and pulled the plug. But I didn't see anything in my email. I gave it 5 or ten minutes, but nothing. I figured it was broke. I checked my email the other day and found the alert notifying me that my OBi was down. I never did get a text message even though I had my phone number entered too. Definitely not the real-time monitoring I'd expect. Which is why I'd want something more local to alert me at least within a 30 second time frame.

Thirty seconds?  The server(s) at Obihai would have to ping every OBi device every few seconds to detect that quickly - a big waste of resources.  It would also drive (normal) people crazy if it sent alerts for such brief outages.  It does work; it just needs a longer outage to meet its threshold.

You said:

Quote
It hardly gets used, but mainly for incoming calls from dentists, doctors, pest control, etc. But just a while ago it was down and wasn't working. I missed a few messages from the dentists office. I rebooted it and it was back up again.

You know, there is this amazing invention known as voicemail, that can take a message when your phone can't be answered.

ubergoober

Node-Red does indeed work on windows  Here's the installation page: http://nodered.org/docs/getting-started/installation.html

Go to flows.nodered.org and search up obi202 for a couple of example flows.  The easy one is the scheduled reboot flow. 

30 seconds should be easily achieved without causing any undue load on Obi infrastructure.

Now, what will monitor that node-red is up and running?  :)

MrTom

Quote from: SteveInWA on April 03, 2017, 10:21:37 PM
Thirty seconds?  The server(s) at Obihai would have to ping every OBi device every few seconds to detect that quickly - a big waste of resources.  It would also drive (normal) people crazy if it sent alerts for such brief outages.  It does work; it just needs a longer outage to meet its threshold.

You know, there is this amazing invention known as voicemail, that can take a message when your phone can't be answered.

Hey there, numb nutts. Didn't you read my post?
"Which is why I'd want something more local to alert me at least within a 30 second time frame."

That's why I want something local ON MY NETWORK to give a quicker alert, instead of the 10-30? minute time frame from the PAID Premium Support "Notify".

It's only free for the first year of warranty.
From their ad:
To get OBi Notify, your OBi device must be an OBi200, OBi202 phone adapter or an OBi1000 series IP phone and it must be entitled to OBiTALK Premium Support. If you have OBiEXTRAs – a subscription service that provides advanced features on your OBi – you automatically get OBiTALK Premium Support (and OBi Notify) at no additional cost, for the duration of the OBiEXTRAs subscription.

Also, I already have an answering machine on the OBi, which is where I want my message to go. Not to some online Google Voicemail when a msg is missed and my machine is not beeping in the kitchen. Get real, gimp.

MrTom

Quote from: ubergoober on April 04, 2017, 06:46:55 PM
Now, what will monitor that node-red is up and running?  :)

Heh, ya. I do have a 24x7 media PC in the living room. It runs a clock on the front LCD while the computer is running. I look at the clock all the time. I love those old Antec Fusion cases. If the computer ceases to function I'll know soon enough. If the computer and the OBi both lock up, then oh well, that's technology for ya.  :-\

EDIT: I tried to import the Schedule Reboot, but the item right after Set Schedule says "unknown: www-request".
EDIT2: I hate Linux command line crap. I think I found the install, "npm install node-red-contrib-http-request". But I also keep getting the error "no such file or directory, open 'C:\Users\...\package.json". Did I mention I hate Linux command line crap?

ubergoober

MrTom.  You've behaved rudely.  I think you went overboard with the previous poster and owe an apology.  I regret I ever attempted to provide help to you.  We live in a self serve world, so a forum like this where advice and knowledge is offered freely should be treasured, not abused.  As for Obi Extras, I'm not a subscriber, and likely won't be, but when I look at how much money obi saves me, I don't begrudge them trying to make a living.  If they don't, I don't save.  So, when my warranty runs out, if it costs me $10/year to maintain good service, it's a small nick in the $700 annual savings I enjoy.  Pardon me, if I proceed on the assumption that you're a smart guy and will figure something out on your own.

MrTom

Quote from: ubergoober on April 06, 2017, 08:39:48 PM
MrTom.  You've behaved rudely.  I think you went overboard with the previous poster and owe an apology.  I regret I ever attempted to provide help to you.  We live in a self serve world, so a forum like this where advice and knowledge is offered freely should be treasured, not abused.  As for Obi Extras, I'm not a subscriber, and likely won't be, but when I look at how much money obi saves me, I don't begrudge them trying to make a living.  If they don't, I don't save.  So, when my warranty runs out, if it costs me $10/year to maintain good service, it's a small nick in the $700 annual savings I enjoy.  Pardon me, if I proceed on the assumption that you're a smart guy and will figure something out on your own.

Woops. Too much sauce.
If I play around with Node-RED some more I'll post my Flow.

MrTom

Quote from: ubergoober on April 03, 2017, 05:48:07 PMthere's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.

Well thanks for the info on Node-RED. I created a flow that monitors the OBi's status page and will email and/or text message you an alert when it's not connected or if the OBi device is not available.
(eat that OBiEXTRAs Niggers/Spics/Jews/Zipperheads)

http://flows.nodered.org/flow/2417af9101b096f64662348750f122eb

SBL110

Hi Everyone,

Just thought I'd throw my two cents in.  I use a program called NetWatch.  It's part of a free suite of programs from Axence.  The program allows you to set up and monitor a device (called a host) like the Obi by pinging it.  If the host doesn't reply within "X" number of minutes, it can send an email with the warning.  It will also email you when things are back up and running.  While the program is free, you need to register with the company to get an activation key.  After that, it's a breeze to set up.  Here's the website for the software:

http://axence.net/en/axence-nettools

While this would be useless if your internet connection went down, you could have it display a message on your computer.  I could see this being used in a company where they need to monitor critical devices like file servers and the like.  If someone accidentally unplugs the network connection to a server being monitored, you'll get an email alert, and/or a message on your computer.

The program has some definite benefits.  Hope you find this information useful.

Scott


MrTom

Quote from: SBL110 on May 08, 2017, 02:45:03 PM

http://axence.net/en/axence-nettools


Thanks for the info. It's always good to have more information.

Even though the OBi device is on your network and pingable, it could be disconnected from the OBitalk sevice and you wouldn't receive calls and you'd never know. The flow I wrote actually logs into the device (should work on any OBi device) and grabs the status page and determines if it's connected and logged into the network. If it's not connected after X amount of tries, or it's off the network after X amount of tries for X amount of time you can send a text or email.

I've been running my flow a little over 2 weeks now. A few times I've received a text that my OBi was not connected even though obiextras never sent me anything. Just at random times it gets disconnected for a very short period. I do have a crappy wifi signal to the OBi though. My pings range from 2ms to 100ms. I need a better connection to determine why it disconnects.

GAKW

Quote from: MrTom on April 21, 2017, 12:08:17 AM
Quote from: ubergoober on April 03, 2017, 05:48:07 PMthere's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.

Well thanks for the info on Node-RED. I created a flow that monitors the OBi's status page and will email and/or text message you an alert when it's not connected or if the OBi device is not available.
(eat that OBiEXTRAs Niggers/Spics/Jews/Zipperheads)

http://flows.nodered.org/flow/2417af9101b096f64662348750f122eb
@MrTom

Hi,
I am hoping you can assist. I installed node.js and node.red. Then I inserted your flow. It looks everything went in ok. I dont think I am entering all the data though? Only info I could find was IP address for obi. Would I not need to enter user and password?
It doesnt run for me and gives an error at xml node
P.S. Do I need to disable auto provisioning? Sorry I have forgotten about this

GAKW

Quote from: GAKW on January 15, 2019, 03:55:11 AM
Quote from: MrTom on April 21, 2017, 12:08:17 AM
Quote from: ubergoober on April 03, 2017, 05:48:07 PMthere's a lot you can accomplish using node-red, an open source Internet Of Things project originally authored by IBM, and released to open source.

Well thanks for the info on Node-RED. I created a flow that monitors the OBi's status page and will email and/or text message you an alert when it's not connected or if the OBi device is not available.
(eat that OBiEXTRAs Niggers/Spics/Jews/Zipperheads)

http://flows.nodered.org/flow/2417af9101b096f64662348750f122eb
@MrTom

Hi,
I am hoping you can assist. I installed node.js and node.red. Then I inserted your flow. It looks everything went in ok. I dont think I am entering all the data though? Only info I could find was IP address for obi. Would I not need to enter user and password?
It doesnt run for me and gives an error at xml node
P.S. Do I need to disable auto provisioning? Sorry I have forgotten about this
Figured out ... I had to check basic auth on check obi status node and enter user/pass
Now it works. One change I am trying to make is to be able to tell for each Service Provider if the service is up or not. There are four of them (I have google voice, freephoneline and a couple of long distance providers)
Any tips appreciated

ubergoober

The system status page of the web interface reports status for all four of the service providers.  You could modify that flow to add 3 more service providers.

GAKW


ubergoober

it looks like the author is just looking for the word connected in the system status page, which works for Google Voice, but you may find the status as Registered for a SIP provider, or Service Not Configured (not in your case, of course).

The flow is written with the assumptions of 1 Service provider and that provider is Google Voice.

I'd recommend using an www-request node (which you'd have to add) and then a html node, which will allow you to isolate the html td elements and leave them in an array. From there you can determine which indexes hold the information you see and test them for the correct status, fail them and check them for what they look like in a failed state, etc.

Good luck.