Connection Status Variable

Discuss the Indigo Reflector service here. Indigo Reflectors allow Indigo Touch and other clients to securely connect back to your Indigo server from anywhere on the net, all without any router configuration. They are included in your Up-to-Date subscription.
autoindigo
Posts: 3
Joined: Mon Feb 05, 2024 8:21 am

Connection Status Variable

Post by autoindigo »

I need to detect if indigo has lost its internet connection for various triggers. While I have a script for it, reflector also maintains this information. Is there (or could there be) a variable set when Reflector is down/up?
User avatar
DaveL17
Posts: 6839
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Connection Status Variable

Post by DaveL17 »

I wrote a small script that puts an icon on the menu bar (green when connected to the reflector, red if not connected).

https://github.com/DaveL17/Indigo-Reflector-Bug

The key lines are these:

Code: Select all

reflector_url = indigo.server.getReflectorURL()
self.icon = BASE_URL + (OFFLINE_ICON if not reflector_url else ONLINE_ICON)
I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]
Post Reply

Return to “Indigo Reflectors (remote access)”