Squeezeserver interface and restarts

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Squeezeserver interface and restarts

Postby jdr0berts » Sat Jun 09, 2012 4:44 pm

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
jdr0berts
Starting Member
Starting Member
 
Posts: 15
Joined: April 2012

Re: Squeezeserver interface and restarts

Postby RDNZL » Mon Jun 11, 2012 2:26 pm

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()
Regards, Ron.
http://domotiga.nl - open source home automation software for Linux.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 922
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Squeezeserver interface and restarts

Postby jdr0berts » Mon Jun 11, 2012 10:22 pm

Perfect!

Thanks Ron.
jdr0berts
Starting Member
Starting Member
 
Posts: 15
Joined: April 2012


Return to DomotiGa Forum

Who is online

Users browsing this forum: No registered users and 3 guests