How to control power amps

I can’t see how to group items so that turning on my AV amp would also turn on external power amp, so would a rule be the way to go?
I have Onkyo AV amp and some external power amps which are plugged in via zwave socket and a Harmony hub for normal AV control.
If I use a Harmony activity to turn on the amp to listen to music or watch TV, then the external power amps are not triggered. Should I write a rule that polls the state of the Onkyo and when changes, trigger the power socket?

Thanks in advance.

Have you tried wiring the 12v trigger outputs from the Onkyo to the trigger inputs of the Power Amp modules?

This way, no matter what controls the Reciever, the PA modules will always be fired up (with no middle man) When needed.

I’m not at home but I’d bind a String item to the current harmony activity (see harmony binding for example) and then set up a rule so when that changes to the specific activity, you send a command to the item bound to the power amp switch.

Thanks for the suggestion, but sadly my amps don’t have 12 trigger.

Did you look at my suggestion?

Hi Daniel, yes I looked at it and will try. I am having issued getting openhab to talk to the Onkyo at the moment.
For the ip address I am using the same as works in my browser (in my case 192.168.1.94) However no commands are getting through.

OK, finally got the Onkyo to respond to commands. Thanks for the suggestions, I’ve ended up with this (note that I’m not getting the logging message as I expect, not sure of the formatting).

rule “Power Amps On”
when
Item onkyoPowerStatus changed from “00” to “01”
then
sendCommand(Power_Socket_Gen5, ON)
logInfo(“hifi”, “Onkyo Power Status change %s”, previousState)
end

rule “Power Amps Off”
when
Item onkyoPowerStatus changed from “01” to “00”
then
sendCommand(Power_Socket_Gen5, OFF)
logInfo(“hifi”, “Onkyo Power Status change %s”, previousState)
end

That’s a pity. If you’re feeling handy with a soldering iron, you might like this retrofit option:

PS: Don’t forget the diode if you end up using a mechanical relay, and to check the input current requirements since the Trigger outputs aren’t usually rated for very much current.

Here are my Harmony rules to switch the Lights either side of the TV. It’ll be similar to what you need for the Harmony to drive the PA units, just remove the conditionals for night-time:

rule "Family Media ON (Great Room)"
when
        Item FamilyHarmony_activity changed from PowerOff
then
        logDebug("house-family", "Family-Media-Great-Room ON")
        var t = now

        val DateTime daylightStart = new DateTime((ClockDaylightStart.state as DateTimeType).getCalendar)
        val DateTime daylightEnd = new DateTime((ClockDaylightEnd.state as DateTimeType).getCalendar)

        var boolean isNight = daylightStart.isAfterNow || daylightEnd.isBeforeNow

        if (isNight) {
                logDebug("house-family", "Family-Media-Great-Room ON Night Time")
                GManagedMediaLights.sendCommand(ON)
        }

        var long x = now.getMillis - t.getMillis
        logInfo("house-family", "PERF Family-Media-Great-Room ON elapsed: " + String::valueOf(x) + "ms")
end

And the Rule to turn if off again:

rule "Family Media OFF (Great Room)"
when
        Item FamilyHarmony_activity changed from TV to PowerOff
then
        logDebug("house-family", "Family-Media-Great-Room Timer OFF")
        var t = now

        GManagedMediaLights.sendCommand(OFF)

        var long x = now.getMillis - t.getMillis
        logInfo("house-family", "PERF Family-Media-Great-Room OFF elapsed: " + String::valueOf(x) + "ms")
end

Here’s the corresponding Harmony Item declaration:

String FamilyHarmony_activity   "Family Activity [%s]" {harmonyhub="*[family:currentActivity]"}

Yup, if you can drive directly from the Onkyo TCP/Serial connection, it’ll be better since it’ll handle all the ways the Amp can be turned on.

I used to do that with an older HA Controller, but I eventually swapped the Onkyo out for a Sherbourn (PT-7030) as the Onkyo was pulling 50W in Standby… just never got around to reading the Sherbourn’s serial interface.

The other Rack components are now switched with an auto-switching Power strip. I was using a Web Power Switch, on wired/ethernet, but the auto-switching Power strip worked better for WAF, and the overall solution is much more reliable.

Assuming previousState is a valid rule variable (I’ve never tried to use it so I don’t know) the below should do what you want.

logInfo(“hifi”, String::format(“Onkyo Power Status change %s”, previousState))

1 Like

Great, thanks @danielwalters86 that formatting worked.