PDA

View Full Version : No More shutdown with xPLHal



Toby
2005-12-07, 11:06
Hey,

for a long time, it was possible for me, to shut down my server by pressing '1', '2', '3' on my remote.

But after several updates of the SlimServer software (no I have 6.2.1 installed) it is not possible anymore.

I tried everything, but nothing happened.

Can anybody help me with that???

Next point:
I'll receive a brand new SB and my dream with that is, to 'switch' on and off my server whenever I want like my room light.
For that, xPLHal must work and the server must not shut down.
It has to go in to the standby mode.
After that, I can send a magic packet with my new SB to the server and awake him.
Are there any suggestions or help, how I can realize that???

Thank you so far.

I forgot: My server software runs on a Windows XP machine

gorstk
2005-12-07, 11:43
Toby wrote:
> Hey,
>
> for a long time, it was possible for me, to shut down my server by
> pressing '1', '2', '3' on my remote.
>
> But after several updates of the SlimServer software (no I have 6.2.1
> installed) it is not possible anymore.
>
> I tried everything, but nothing happened.
>
> Can anybody help me with that???

Can you supply the xplmonitor output when pressing buttons on your
squeezebox - are the messages being sent by slimserver?
Do you have an xplhub installed (the xplhub has been removed from the
latest version of xplhal and you need to install a standalone hub).

> Next point: I'll receive a brand new SB and my dream with that is, to
> 'switch' on and off my server whenever I want like my room light. For
> that, xPLHal must work and the server must not shut down. It has to go
> in to the standby mode. After that, I can send a magic packet with my
> new SB to the server and awake him.
> Are there any suggestions or help, how I can realize that???

I think that is possible (?only with squeezebox2/3).... but someone else
will have to tell you how! Is it on the wiki.slimdevices.com?

Toby
2005-12-07, 15:37
Toby wrote:
> Hey,
>
> for a long time, it was possible for me, to shut down my server by
> pressing '1', '2', '3' on my remote.
>
> But after several updates of the SlimServer software (no I have 6.2.1
> installed) it is not possible anymore.
>
> I tried everything, but nothing happened.
>
> Can anybody help me with that???

Can you supply the xplmonitor output when pressing buttons on your
squeezebox - are the messages being sent by slimserver?
Do you have an xplhub installed (the xplhub has been removed from the
latest version of xplhal and you need to install a standalone hub).

> Next point: I'll receive a brand new SB and my dream with that is, to
> 'switch' on and off my server whenever I want like my room light. For
> that, xPLHal must work and the server must not shut down. It has to go
> in to the standby mode. After that, I can send a magic packet with my
> new SB to the server and awake him.
> Are there any suggestions or help, how I can realize that???

I think that is possible (?only with squeezebox2/3).... but someone else
will have to tell you how! Is it on the wiki.slimdevices.com?

The xplmonitor output looks like this:
STAT slimdev-slimserv.LIVINGROOM * HBEAT.APP 12.05.2007 23:29 1 interval=5, port=50001, remote-ip=192.168.2.17, schema=audio.slimserv, status=stopped
STAT slimdev-slimserv.LIVINGROOM * HBEAT.APP 12.05.2007 23:24 1 interval=5, port=50001, remote-ip=192.168.2.17, schema=audio.slimserv, status=stopped
STAT xpl-xplhal.server * HBEAT.APP 12.05.2007 23:24 1 interval=5, port=50000, remote-ip=192.168.2.17

TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
STAT xpl-monitor.SERVER * HBEAT.APP 12.05.2007 23:20 1

I think I've the xplhub installed. Under File -> Properties -> General I have the option to check or uncheck 'Use internal hub'. The option is checked.

I've read the wiki but there is nothing written (or I haven't seen it) for my second question. xPLHal uses 'poweroff.exe'. And poweroff means poweroff, but maybe I could say to poweroff, that it should go into the standby mode???

gorstk
2005-12-07, 16:55
Toby wrote:

> The xplmonitor output looks like this:
> STAT slimdev-slimserv.LIVINGROOM * HBEAT.APP 12.05.2007
> 23:29 1 interval=5, port=50001, remote-ip=192.168.2.17,
> schema=audio.slimserv, status=stopped
> STAT slimdev-slimserv.LIVINGROOM * HBEAT.APP 12.05.2007
> 23:24 1 interval=5, port=50001, remote-ip=192.168.2.17,
> schema=audio.slimserv, status=stopped
> STAT xpl-xplhal.server * HBEAT.APP 12.05.2007 23:24 1 interval=5,
> port=50000, remote-ip=192.168.2.17
>
> TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007
> 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
> TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007
> 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
> TRIG slimdev-slimserv.LIVINGROOM * REMOTE.BASIC 12.05.2007
> 23:21 1 zone=slimserver, device=LIVINGROOM, keys=dead, power=off
> STAT xpl-monitor.SERVER * HBEAT.APP 12.05.2007 23:20 1

Would you confirm that when you go to slimserver web interface -->
server settings -->network --> xpl settings --> infrared
processing is set as buttons?

Would you also confirm that you are trying the above with the squeezebox
turned off (it says so in the log actually power=off).

This is exactly the response I get when I have infrared processing set
as buttons and have the squeezebox off. If you switch it on however it
then sends out keys=numberscroll_1 (or 2 or 3) instead of keys=dead.

I am not sure if this behaviour has changed in recent builds - but I
doubt it as the xpl and infrared code has probably not changed for a
long time! Edit: looking at the example script on the xplhal website it
states that it only runs when the player is swtiched off - so this is a
new behaviour? Any one any idea when/why this was introduced?

I would suggest editing the infrared processing option and set it as "both".

This means every time you press a infrared button the 'code' for that
button is sent via xpl regardless of whether the squeezebox is on or off
and it recognises /any/ remote (alomost).

For example when I press '1' I get the output (even if the squeezebox is
on or off)
zone=slimserver
device=Lounge
keys=7689f00f
power=on

for 2... keys=768908f7
for 3....keys=76898877

Therefore in your script in xplhal you can change the following (copy
and pasted from the xplproject website)


if lcase(xpl.getparam(XplMsg,"keys",true)) = "7689f00f" Then

ElseIf lcase(xpl.getparam(XplMsg,"keys",true)) = "768908f7" and

ElseIf lcase(xpl.getparam(XplMsg,"keys",true)) = "76898877" and

Basically numberscroll_x has been changed to the corresponging 'code' as
above. You can check the appropriate code for the remote control button
yo want to use by looking in the xplmonitor whilst pressing the button
as you did earlier.

Hope this helps.
Please post back if you have any queries.
It may be worth informing the maintainer of xplproject.org that they
need to change their 'how-to' on this subject if you have success with this.

Toby
2005-12-07, 18:22
gorstk wrote:

Would you confirm that when you go to slimserver web interface -->
server settings -->network --> xpl settings --> infrared
processing is set as buttons?

Would you also confirm that you are trying the above with the squeezebox
turned off (it says so in the log actually power=off).

This is exactly the response I get when I have infrared processing set
as buttons and have the squeezebox off. If you switch it on however it
then sends out keys=numberscroll_1 (or 2 or 3) instead of keys=dead.

I am not sure if this behaviour has changed in recent builds - but I
doubt it as the xpl and infrared code has probably not changed for a
long time! Edit: looking at the example script on the xplhal website it
states that it only runs when the player is swtiched off - so this is a
new behaviour? Any one any idea when/why this was introduced?

I would suggest editing the infrared processing option and set it as "both".

This means every time you press a infrared button the 'code' for that
button is sent via xpl regardless of whether the squeezebox is on or off
and it recognises /any/ remote (alomost).

For example when I press '1' I get the output (even if the squeezebox is
on or off)
zone=slimserver
device=Lounge
keys=7689f00f
power=on

for 2... keys=768908f7
for 3....keys=76898877

Therefore in your script in xplhal you can change the following (copy
and pasted from the xplproject website)


if lcase(xpl.getparam(XplMsg,"keys",true)) = "7689f00f" Then

ElseIf lcase(xpl.getparam(XplMsg,"keys",true)) = "768908f7" and

ElseIf lcase(xpl.getparam(XplMsg,"keys",true)) = "76898877" and

Basically numberscroll_x has been changed to the corresponging 'code' as
above. You can check the appropriate code for the remote control button
yo want to use by looking in the xplmonitor whilst pressing the button
as you did earlier.

Hope this helps.
Please post back if you have any queries.
It may be worth informing the maintainer of xplproject.org that they
need to change their 'how-to' on this subject if you have success with this.


FANTSTIC gorstk!!!!!
Thank you very much!!!!!

Changing the script with the 'new keys' (7689f00f, 768908f7, 76898877) after setting it in Slimserver to 'both' was the big secret.

Thank you again!

I'm not really sure,
at what time the squeezebox is turned off ...
After starting the server SB shows me a display with the date/time, pressing the power button means the display shows me the menu ' now running' pressing again means it shows me the date/time display. Now, the SB is off, I think ... Isn't it???

Now, I have to find out, how I can bring the server into the standby modus instead of shutting down/power off ...

Toby
2005-12-08, 06:43
I'm still interested in wether it is possible to say poweroff.exe not to shut down but to go into standby modus.

I'm happy because now I can power off again my server pressing '1,2,3' on my SB remote.

But with the new SB I can send a magic packet. So if the server is in the standby modus (by the way: what is the hibernate mode?)
I can awake him by pressing the power button on my remote.

I'm dreaming of switching on and off my server like my room light or my HIFI.

Anybody out there to help me???

gorstk
2005-12-08, 15:40
Toby wrote:

>
> FANTSTIC gorstk!!!!!
> Thank you very much!!!!!
>
> Changing the script with the 'new keys' (7689f00f, 768908f7, 76898877)
> after setting it in Slimserver to 'both' was the big secret.
>
> Thank you again!
>
> I'm not really sure,
> at what time the squeezebox is turned off ...
> After starting the server SB shows me a display with the date/time,
> pressing the power button means the display shows me the menu ' now
> running' pressing again means it shows me the date/time display. Now,
> the SB is off, I think ... Isn't it???

It is turned off when the date and time is displayed (unless you have
the date/time screensaver to work when the unit is not playing anything
but still switched on)

>
> Now, I have to find out, how I can bring the server into the standby
> modus instead of shutting down/power off ...

Doesnt really make any difference if it is on or off it will use the
same amount of power. The on off switch is just to make people feel better.

If you want your script to work no matter if the player is on or off
then delete the lines....

' We're only interested if the player is powered off
If not lcase(xpl.getparam(XplMsg,"power",true)) = "off" Then
Exit Sub
End If

gorstk
2005-12-08, 15:47
Toby wrote:
> I'm still interested in wether it is possible to say poweroff.exe not to
> shut down but to go into standby modus.
>
> I'm happy because now I can power off again my server pressing '1,2,3'
> on my SB remote.
>
> But with the new SB I can send a magic packet. So if the server is in
> the standby modus (by the way: what is the hibernate mode?)
> I can awake him by pressing the power button on my remote.
>
> I'm dreaming of switching on and off my server like my room light or my
> HIFI.
>
> Anybody out there to help me???

A quick google search for 'standby.exe' revealed...
http://www.neowin.net/forum/lofiversion/index.php/t74077.html

This links to a file....
http://chrisxp.no-ip.info/files/standby.exe

Save standby.exe in your c:\windows\System32 directory and replave
shutdown.exe in the script to standby.exe

(note, I have never used this file and can not vouch for its abilities
or security!)

With regard to how to wake up your system from standby from the SB I
will need to let others help you with that!
Have fun