Page 1 of 1

Squeezeserver interface and restarts

Posted: Sat Jun 09, 2012 4:44 pm
by jdr0berts
I'm using the SqueezeServer interface to allow me to remotely switch off the powered speakers or amp's attached to each squeezebox.

I'd like to setup the machine running squeezeserver to shut down during certain hours, but I've noticed that when the connection to the server is lost from Domotiga, it doesn't appear to be re-established until a config change is made in the GUI.

Is there anyway of setting up a cron job or something to check if no connection exists and restart the SqueezeServer module ?

Thanks
James

Re: Squeezeserver interface and restarts

Posted: Mon Jun 11, 2012 2:26 pm
by RDNZL
I have added some reconnect code to other interface types which tries to reconnect at an increasing interval when a connection is lost.
But it doesn't do this for hours, it gives up after a number of retries so it doesn't clutter the logfile and strain the server.

But you can use this instead:

Define an event with a trigger of type TimeCron , set it to some time after the squeezeserver is running again.
Define and attach an action with type script, and use this contents:

Code: Select all

Main.Restart_SqueezeServer()

Re: Squeezeserver interface and restarts

Posted: Mon Jun 11, 2012 10:22 pm
by jdr0berts
Perfect!

Thanks Ron.