Discussion:
[SlimDevices: Plugins] Squeezelite -G GPIO misbehaving
Gobuleberbu
2018-12-07 15:02:26 UTC
Permalink
Hi! I'm trying to activate a relay to turn on my amplifier with the -g
option for squeezelite.

So far, I only had erratic behaviors. Playing,Pausing a song, and fast
forwarding/rewinding a song will trigger the relay.
It seems like it's responding to playback status rather than power
status.

Anyone has an idea on how I could achieve that feature without this bug?

Maybe I could use the -S option. Anyone wiling to share their power on
and power off scripts ?

Thank you! [emoji3]


Envoyé de mon iPhone en utilisant Tapatalk




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
DJanGo
2018-12-07 15:36:34 UTC
Permalink
What Version do you use?

i am using Squeezelite v1.9.0-1113from Ralph that doesnt have a -g
support.

I am using -S for my stuff and i never seen some strange things...


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-07 16:06:59 UTC
Permalink
I'm using Max2Play v1.0.2 based on v1.8.4-726


Envoyé de mon iPhone en utilisant Tapatalk




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Jeff07971
2018-12-07 16:17:42 UTC
Permalink
Post by Gobuleberbu
Hi! I'm trying to activate a relay to turn on my amplifier with the -g
option for squeezelite.
So far, I only had erratic behaviors. Playing,Pausing a song, and fast
forwarding/rewinding a song will trigger the relay.
It seems like it's responding to playback status rather than power
status.
Anyone has an idea on how I could achieve that feature without this bug?
Maybe I could use the -S option. Anyone wiling to share their power on
and power off scripts ?
Thank you! [emoji3]
Envoyé de mon iPhone en utilisant Tapatalk
Never had a single problem with the -G switch.

What version of SQUEEZELITE are you using "squeezelite -v" I think.

What GPIO are you using ?

How are you buffering the signal from the GPIO ?



*Players:* SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
*Server:* LMS Version: Latest Nightly on Centos 7.5 VM on ESXi 6.5.0U2
on Dell T320
*Plugins:*
AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player
Groups
*Remotes:* iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
*Music:* 522GB,1660 albums with 23087 songs by 5204 artists mostly
FLACs

*Want a webapp ?* See
http://forums.slimdevices.com/showthread.php?104305-Webapp-for-LMS
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-07 20:07:15 UTC
Permalink
Never had a single problem with the -G switch. And its -G not -g
What version of SQUEEZELITE are you using "squeezelite -?" I think.
What GPIO are you using ?
How are you buffering the signal from the GPIO ?
Buffering? I'm not sure I quite understand how to do that [emoji52]




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Jeff07971
2018-12-07 21:52:47 UTC
Permalink
Post by Gobuleberbu
Buffering? I'm not sure I quite understand how to do that [emoji52]
The GPIO on a Pi does not have enough power to run MOST relays, there
are a few it can but not many and are specialised.
Buffering is the circuit used to increase the power available to drive a
relay - See attached image.

Lets get the basics first:-
What raspberry Pi have you got ?
What DAC do you use ?

How does the relay power the amplifier 120/220 Vac ?

Then we can go from there, as I said I have never had any problems with
the -G option on pCP (PiCorePlayer) and use -G in 4 systems

Jeff

26180


+-------------------------------------------------------------------+
|Filename: How-to-Control-a-Relay-using-Raspberry-Pi-Relay-Drive.jpg|
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=26180|
+-------------------------------------------------------------------+


*Players:* SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
*Server:* LMS Version: Latest Nightly on Centos 7.5 VM on ESXi 6.5.0U2
on Dell T320
*Plugins:*
AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player
Groups
*Remotes:* iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
*Music:* 522GB,1660 albums with 23087 songs by 5204 artists mostly
FLACs

*Want a webapp ?* See
http://forums.slimdevices.com/showthread.php?104305-Webapp-for-LMS
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-07 20:05:49 UTC
Permalink
In max2play,
I run it with the following flag
-G 24:H




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-07 22:53:23 UTC
Permalink
Ok! I'm driving a power switch tail II with my pi 3B+

It should work decently...
Maybe it's my firmware, I've updated everything. I'll test it tonight.

Otherwise which kernel version are you running? I'm 4.14.85-v7+




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Jeff07971
2018-12-07 22:57:38 UTC
Permalink
Post by Gobuleberbu
Ok! I'm driving a power switch tail II with my pi 3B+
It should work decently...
Maybe it's my firmware, I've updated everything. I'll test it tonight.
Otherwise which kernel version are you running? I'm 4.14.85-v7+
Yes that should work fine !

I doubt if its firmware, but possible

What DAC do you use ? Does it use GPIO 24 ?



*Players:* SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
*Server:* LMS Version: Latest Nightly on Centos 7.5 VM on ESXi 6.5.0U2
on Dell T320
*Plugins:*
AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player
Groups
*Remotes:* iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
*Music:* 522GB,1660 albums with 23087 songs by 5204 artists mostly
FLACs

*Want a webapp ?* See
http://forums.slimdevices.com/showthread.php?104305-Webapp-for-LMS
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-07 23:01:01 UTC
Permalink
Allo boss

And no, it's not being used by the board...
It uses bcm 3 5 12 27 28 31 35 50

And gpio 24 is at pin 18




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Jeff07971
2018-12-07 23:03:54 UTC
Permalink
Post by Gobuleberbu
Allo boss
And no, it's not being used by the board...
It uses bcm 3 5 12 27 28 31 35 50
And gpio 24 is at pin 18
Hmm thats very strange then !

Why not try Picoreplayer and see if it does the same then at least
you'll know whether or not its Max2Play or something else



*Players:* SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
*Server:* LMS Version: Latest Nightly on Centos 7.5 VM on ESXi 6.5.0U2
on Dell T320
*Plugins:*
AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player
Groups
*Remotes:* iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
*Music:* 522GB,1660 albums with 23087 songs by 5204 artists mostly
FLACs

*Want a webapp ?* See
http://forums.slimdevices.com/showthread.php?104305-Webapp-for-LMS
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Gobuleberbu
2018-12-08 03:05:48 UTC
Permalink
Ok nailed it.

At the end of the text box, which I could not see on my iPad, was the -C
5 flag, which was suppose to release the output after 5 seconds to allow
shairport-sync to use ALSA.

In the end, it really is a bug since the -C command should not trigger
the amp power off, only the disconnection to ALSA.

[emoji41][emoji851][emoji1]

Thanks a lot for your help, your input really helped to see the problem
under a new angle!! Have a great evening!


Envoyé de mon iPad en utilisant Tapatalk




------------------------------------------------------------------------
Gobuleberbu's Profile: http://forums.slimdevices.com/member.php?userid=68135
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
paul-
2018-12-08 04:33:49 UTC
Permalink
That is how it works, squeezelite/lms, Squeezelite does not get power
button status, LMS tells it to play a stream or not, and to shutdown
alsa when not playing.

The -G option was Never intended/nor can it interface with
shairport-sync



piCorePlayer a small player for the Raspberry Pi in RAM.
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=U7JHY5WYHCNRU&lc=GB&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer
------------------------------------------------------------------------
paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Jeff07971
2018-12-08 11:13:15 UTC
Permalink
Post by Gobuleberbu
Ok nailed it.
At the end of the text box, which I could not see on my iPad, was the -C
5 flag, which was suppose to release the output after 5 seconds to allow
shairport-sync to use ALSA.
In the end, it really is a bug since the -C command should not trigger
the amp power off, only the disconnection to ALSA.
[emoji41][emoji851][emoji1]
Thanks a lot for your help, your input really helped to see the problem
under a new angle!! Have a great evening!
Envoyé de mon iPad en utilisant Tapatalk
Glad you got it working !



*Players:* SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
*Server:* LMS Version: Latest Nightly on Centos 7.5 VM on ESXi 6.5.0U2
on Dell T320
*Plugins:*
AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player
Groups
*Remotes:* iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
*Music:* 522GB,1660 albums with 23087 songs by 5204 artists mostly
FLACs

*Want a webapp ?* See
http://forums.slimdevices.com/showthread.php?104305-Webapp-for-LMS
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=109850
Loading...