Raspberry PI - Service and tunnel status notifications

Status
Not open for further replies.

4site

Joined
Sep 18, 2014
Messages
4
Reaction score
3
Hello,

Has anyone tried to use the GPIO pins on a Raspberry Pi to identify whether the 3CX service is a.) Running b.) tunnel connected OK. By way of LED

It would be great to be able to use something like https://shop.pimoroni.com/products/blinkt as a cheap and simple way of having customers able to confirm the status of the device!

Of course showing up in the 3CX Dashboard/bridge status would be really helpful too!

Any one?
 
Great idea... Guessing it is possible with some scripting/jobs running on the Pi.
 
I'm getting somewhere.

I have manged to write a Python script to check for the status of the 3CXSBC service and look for an 'Established' TCP/UDP connection on port 5090 and return an on screen 'Print' with colour coding.

See screenshot!
Capture.jpg



Now just waiting for my Blinkt to try and add LED output instead of onscreen. I'll keep you posted
 
Huzzah!

Blinkt arrived today and with a little modification I have managed to get my script to do as desired.

The 1st 4 LEDs are for the Service Status
2nd 4 are for Tunnel Status

LED's are a little bright but on the lowest setting they are acceptable. I guess I could have just used 2 LEDs rather than a bank of 4.


Service running but with Ethernet unplugged the Tunnel is obviously not

IMG_4711.jpg

With Ethernet connected the 2nd bank go green when the tunnel is up.
IMG_4712.jpg


Also tested Tunnel status by entering incorrect tunnel address and restarting SBC service.

Script set to execute on startup.

~20 seconds for Pi to boot and script to run (all RED)
+~10 Seconds for Service to start, (half green)
+~1(or less) second for tunnel to connect (all Green)

I haven't had time yet to fully test but so far I am quite pleased!
 
Status
Not open for further replies.