Amplifier Switch Plugin

Discuss, contribute and orient Volumio development!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Amplifier Switch Plugin

Postby felixheller » Sun Mar 31 2019 09:35

Hello,
I tried almost all gpios and have the same problem no matter what pin i use..

Dont know how to solve this :roll:
Random avatar
felixheller
Sunday DIYer
Sunday DIYer
 
Posts: 13
Joined: Sun Mar 17 2019 10:05

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Amplifier Switch Plugin

Postby ashthespy » Sun Mar 31 2019 11:49

felixheller wrote:I can only turn it on in sysfs but cant turn it of, I/O error appears which i dont understand, even tried it with a second installation of volumio on another sd card..


felixheller wrote:Hello,
I tried almost all gpios and have the same problem no matter what pin i use..

Dont know how to solve this :roll:


What board are you using and what Volumio version is it running, and what is the I/O error you get?

EDIT: I just looked at the relay board - you posted https://www.hellasdigital.gr/electronic ... bot/?sl=en
It's a 5v board - the pi is 3.3v, you would need a logic level convertor. A simple transistor(2N2222 for e.g) would also do the trick.
If you want to get a new board - then the same web shop has a SSR based board that should work.
User avatar
ashthespy
Objectivist
Objectivist
 
Posts: 280
Joined: Fri Jul 22 2016 08:16


Amplifier Switch Plugin

Postby felixheller » Tue Apr 02 2019 09:05

That seemed to be the Problem!

Thanks, works now like a charm which is weired because I used the same relais with another project without any troubles but as long as it works i am happy.

thanks,
Felix
Random avatar
felixheller
Sunday DIYer
Sunday DIYer
 
Posts: 13
Joined: Sun Mar 17 2019 10:05


Amplifier Switch Plugin

Postby Skysurfer14 » Fri Jun 07 2019 20:26

Hi all,

I want to share my solution for switching my Yamaha AVR (RX-V473) on and off by Volumio. Since I have no skills in writing a volumio plugin I decided to do it on an other way, by writing a batch script working together with the Amplifier Switch plugin.

    - SSH on volumio
    - #sudo apt-get update
    - #sudo apt-get install netcat
    - create a file "avr_switch.sh"
    - edit the file to get this code:
    Code: Select all
    #!/bin/bash

    while true
    do
        while [ 0 = $(gpio -g read 17) ]
        do
            sleep 0.1;
        done
        echo "switch on"
        printf "@MAIN:PWR=On\r\n" | nc -q 1 RX-V473 50000
        printf "@MAIN:INP=AV1\r\n" | nc -q 1 RX-V473 50000

        while [ 1 = $(gpio -g read 17) ]
        do
            sleep 0.1;
        done
        echo "switch off"
        printf "@MAIN:PWR=Standby\r\n" | nc -q 1 RX-V473 50000
    done

    - make this file executable
    - edit the file /etc/rc.local and insert this line before "exit 0":
    Code: Select all
    sh /home/volumio/avr_switch.sh&

    - reboot volumio
    - in the volumio settings / Plugins / Amplifier Switch set the Output to 17
This works perfect for me! There is no need to make modifications at the hardware, since the by "Amplifier Switch" selected GPIO can be read by the batch script.

Have fun!
Random avatar
Skysurfer14
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Fri Jun 07 2019 20:05

Previous

Return to Development talks

Who is online

Users browsing this forum: No registered users and 1 guest