PDA

View Full Version : Squeezelite -G GPIO misbehaving



Gobuleberbu
2018-12-07, 08:02
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

DJanGo
2018-12-07, 08:36
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...

Gobuleberbu
2018-12-07, 09:06
I'm using Max2Play v1.0.2 based on v1.8.4-726


Envoyé de mon iPhone en utilisant Tapatalk

Jeff07971
2018-12-07, 09:17
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. 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 ?

Gobuleberbu
2018-12-07, 13:05
In max2play,
I run it with the following flag
-G 24:H

Gobuleberbu
2018-12-07, 13:07
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]

Jeff07971
2018-12-07, 14:52
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

Gobuleberbu
2018-12-07, 15:53
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+

Jeff07971
2018-12-07, 15:57
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 ?

I use GPIO 13 as its not used by my Hifiberry DAC+'s

Gobuleberbu
2018-12-07, 16:01
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

Jeff07971
2018-12-07, 16:03
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

Gobuleberbu
2018-12-07, 20:05
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

paul-
2018-12-07, 21:33
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 the power button is pushed.

The -G option was Never intended/nor can it interface with shairport-sync. You will need to handle that interface separately with separate program.

Jeff07971
2018-12-08, 04:13
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 !