New PioneerAVR version for testing

Tags: #<Tag:0x00007f616f8bde40> #<Tag:0x00007f616f8bdcd8> #<Tag:0x00007f616f8bdb48>

Hi everybody,

Sorry for my (very) long silence. I have just ended the refactoring of the binding I have started last year. This version allows to tweak parameters more precisely than the older version for AVRs that are not “officially” supported by the binding. It should also fix some issues.

Unfortunately, this version is not compatible with the old one so you will have to reconfigure the things if you used the previous binding.

To fill the compatibility list, I will need your help. Could you test your AVR against the binding? This version introduces the ConfigurablePioneerAVR thing type that should be used for testing. If this thing type works well with default parameters for your AVR model, please tell me and I will add it to the compatibility list. If you have to modify some parameters to make it work with your AVR, I will need all the parameters value to add it to the compatibility list. To tweak parameters, you should use the PaperUI client to change them on the fly.

Here is the new bundle. (Edit: link to the last one)

You can also access to the updated documentation here.

Thank you for help.

Edit: update the link to updated documentation

2 Likes

Tested with my VSX-924. Zone1 and the Info Display work fine, however Zone 2 does nothing so i didn’t try the other zones. Furthermore the ConfigurablePioneerAVR thing type does not show volumeDb channel in PaperUI so i didn’t test that as well.

Futhermore i wonder (didn’t test it) if the thing definition in your docs is correct

pioneeravr:ipAvr:vsx921IP [ address="192.168.1.25", tcpPort="23" ]

tcpPort is a string however in the official binding it’s a number. This is my working thing definition

pioneeravr:ipAvr:vsx924 "Pioneer VSX-924" [ address="192.168.1.12", tcpPort=8102 ]

Maybe both works.

Thanks

Thanks for the feedback.

The link to the documentation was bad (it was the old one) so I have updated the OP.

The ConfigurablePioneerAVR is not compatible with the volumeDb channel for now, but you can use the volumeDimmer channel instead.

For zone2 control, could you send me the logs of Openhab with DEBUG level?

Thank you.

Maybe i can try later, i am not at home.
However i can say that since the pull requests from mimo74 #2509 and #2540 it works with the official binding you can install from PaperUI. Hope this helps as well.

Seems to work fine with my VSX-930. Anything specific you want me to try ?
(I have no zone2, though. Need those ports for Atmos :))

One thing that’s been annoying ever: When AVR is OFF, binding displays the last status as " žSurround " if it was Surround when last turned on. Can you change this this to be a proper “OFF” or similar ?

@andirs, I have found and fixed the issue.
@mstormi, done. The status will be cleared when the AVR is Offline.

Here is the new version.

25 mins MTTR. Wow! Thanks.

Hi.

My amp (VSX 930) worked somewhat with the official version from PaperUI (somewhat because I can’t seem to choose the HDMI6/MHL input from the UI).

I tried to use this version instead of the official one, but it doesn’t seem to work: my amp disappeared from the “Control” panel. When I try to add a thing from the inbox, it isn’t found either.

I’m quite a noob when it comes to openhab, so I don’t know what else I can try to be helpful.

@Stratehm Are you planning to provide the volumedB again? My SC-LX72 is running fine with “official binding”. Will there be other enhancements? e.g. Audio-Selection? UP/DOWN/LEFT/RIGHT/OK/RETURN?
@mimo74 is currently also developing a new Pioneeravr binding. Maybe you can stick your heads together?

EDIT: I currently tested your “New Pioneer AVR version” and all is running fine (Zone1, Zone2, Zone3) with my Pioneer SC-LX72 over IP. Normally the SC-LX72 only supports SERIAL, but I connected a “TCP to RS232 adapter” (ME-TCP232-310) see here: link

I tried getting this to work on my old VSX82-TSX which doesn’t have Ethernet/IP connectivity. It does have RS-232 serial which I have been using as a hack with rules and the serial binding in OH2 since I couldn’t figure out the old Pioneer binding. The scripts set up in rules work for changing input and volume but bidirectional data transfer doesn’t work since I haven’t worked out have to get transformations to work. Opening the serial interface in a terminal window lets me send commands to it and get responses back, so I’d think your binding should work.

I uninstalled the Serial binding then copied your jar file. There are log entries saying things are sending an ON/OFF signal but it says a thing is missing.
I don’t see Pioneer 2.2 binding listed in the bindings nor any things listed in the PaperUI.

So here are my config files and the event log. This is on Raspbian Stretch on a RPI2 running Openhab 2.1.

/var/log/openhab2/openhab.log has the following error
2017-11-02 12:12:53.031 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update ‘OFF’ for item ‘vsx82PowerSwitch’ to handler for channel ‘pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#power’, because no thing with the UID ‘pioneeravr:ConfigurablePioneerAVR:vsx82Serial’ could be found.

pioneeravr.things
pioneeravr:ConfigurablePioneerAVR:vsx82Serial [ useSerial=true, serialPort="/dev/ttyUSB0", nbZones=3, volumeStepDbZone1=1 ]

avrtest.items
/* Pioneer AVR Items */
Switch vsx82PowerSwitch “Power” { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#power” }
Switch vsx82MuteSwitch “Mute” (All) { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#mute” }
Dimmer vsx82VolumeDimmer “Volume [%.1f] %” (All) { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#volumeDimmer” }
Number vsx82VolumeNumber “Volume [%.1f] dB” (All) { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#volumeDb” }
String vsx82InputSourceSet “Input” (All) { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:zone1#setInputSource” }
String vsx82InformationDisplay “Information [%s]” (All) { channel=“pioneeravr:ConfigurablePioneerAVR:vsx82Serial:displayInformation” }

avrtest.sitemap
sitemap avrtest label="Pioneer Receiver Menu"
Frame label=“Pioneer AVR” {
Switch item=vsx82PowerSwitch
Switch item=vsx82MuteSwitch mappings=[ON=“Mute”, OFF=“Un-Mute”]
Slider item=vsx82VolumeDimmer
Setpoint item=vsx82VolumeNumber minValue=-80 maxValue=12 step=1
Switch item=vsx82InputSourceSet mappings=[02=“Radio”, 06=“SAT”, 14=“Plex”, 10=“Fire TV”]
Text item=vsx82InformationDisplay
}
}

I used the RS-232 protocol reference for the VSX82 to figure out the commands to send the receiver.
I used this document https://www.pioneerelectronics.com/pio/pe/images/portal/cit_3424/349506363VSX82TXS_RS232C_Protocols.pdf from the Pioneer AV page at https://www.pioneerelectronics.com/PUSA/Support/Home-Entertainment-Custom-Install/RS-232+&+IP+Codes/A+V+Receivers

For reference here are the config files for the serial port set up which doesn’t use the PioneerAVR binding and sort of works. I renamed these to .old to prevent any naming conflicts that I may have overlooked.

avr.items
String AVR “Receiver” { serial="/dev/ttyUSB0" }
Switch AVRPower "Power"
Switch AVRMute "Mute"
Switch AVRVolUp "Volume Up"
Switch AVRVolDown "Volume Down"
String AVRInput "[%s]"
String AVRRadio "[%s]"
Dimmer AVRCurVol “Volume [%02d %%]”

avr.sitemap
sitemap avr label="Receiver Menu"
Frame {
Text label=“AV Receiver” icon=“video” {
Text item=AVRPower label="Power [%s]"
Switch item=AVRPower
Switch item=AVRVolUp mappings=[ON=“Volume Up”] visibility=[AVRPower==ON]
Switch item=AVRVolDown mappings=[ON=“Volume Down”] visibility=[AVRPower==ON]
Switch item=AVRMute mappings=[ON=“Mute”, OFF=“Un-Mute”] visibility=[AVRPower==ON]
Switch item=AVRInput mappings=[SAT=“DirecTV”, PLEX=“Plex”, FIRETV=“Fire TV”, TUNER=“Radio”]
}
}

avrinput.rules
/**

  • Rule for Receiver Power command
    */

rule "AVR Input"
when
Item AVRInput received command
then
if (AVRInput.state == “DirecTV”)
{
sendCommand(AVR, “06FN”)
sendCommand(AVR, “\r”)
logInfo(“avr”, “AVR Input rule”)
logInfo(“avr”, “AVR Input changed to DirecTV”)
}
if (AVRInput.state == “Plex”)
{
sendCommand(AVR, “14FN”)
sendCommand(AVR, “\r”)
logInfo(“avr”, “AVR Input rule”)
logInfo(“avr”, “AVR Input changed to Plex”)
}
if (AVRInput.state == “Radio”)
{
sendCommand(AVR, “02FN”)
sendCommand(AVR, “\r”)
logInfo(“avr”, “AVR Input rule”)
logInfo(“avr”, “AVR Input changed to Radio”)
}
if (AVRInput.state == “FireTV”)
{
sendCommand(AVR, “10FN”)
sendCommand(AVR, “\r”)
logInfo(“avr”, “AVR Input rule”)
logInfo(“avr”, “AVR Input changed to FireTV”)
}
end

rule "AVR Vol Up"
when
Item AVRVolUp received command
then
if (AVRVolUp.state == ON)
{
sendCommand(AVR, “VU”)
sendCommand(AVR, “\r”)
postUpdate(AVRMute, OFF)
logInfo(“avr”, “Receiver Volume Up Rule”)
}
end

rule "AVR Power"
when
Item AVRPower received command
then
if (AVRPower.state == ON)
{
sendCommand(AVR, “PO”)
sendCommand(AVR, “\r”)
logInfo(“avr”, “Receiver Power Rule”)
logInfo(“avr”, “Receiver Power ON”)
}
if (AVRPower.state == OFF)
{
sendCommand(AVR, “PF”)
sendCommand(AVR, “\r”)
postUpdate(AVRMute, OFF)
logInfo(“avr”, “Receiver Power Rule”)
logInfo(“avr”, “Receiver Power OFF”)
}
end

Thank you all for your feedbacks.

@lakhay Have you tried to refresh PaperUI (through Ctrl+F5 in your browser) after adding thing from the Inbox? If it does not work, could you send me the content of your OH2 Logging file please? An error should be present in it when you add the thing.

@Celaeno1 If the SC-LX72 works fine with the default configuration of the “New Pioneer AVR version”, I will add it to the compatibility list and you should get the volumeDB channel back. Just for information, I have not found solution to make the volumedB channel compatible with the ConfigurablePioneerAVR thing. But when I add a model with well defined parameters, I can add this channel back.
Where have you seen that @mimo74 is developping a new binding?

@ericsnis Your configuration file seems good. The warning tells that Openhab does not find the pioneeravr:ConfigurablePioneerAVR:vsx82Serial thing. Do you have another error in the log file? Could you try to create a new thing through PaperUI ?

@Stratehm Ok, thanks for information! :slight_smile: mimo74 has published it here:

But I didn’t test it…

My logs have a lot of the cruft typical to OpenHAB. I can try trimming it back to remove entries from other bindings, but it may be a day or two before I can get to it.
I renamed the pioneeravr.thing file to .old then tried making a new thing through PaperUI. I clicked the add button, then PioneerAVR Binding but it just comes up with a blank screen.

Ok, I have the logs.

openhab.log

pioneer.log

I am not doing an own and/or new binding… I have just done some bug fixing and enhancements on the old one for zone support and support for newer devices and their inputs.

I see the version number is 2.2. Is that your version number or does it mean that the binding needs the OpenHAB 2.2 snapshot running?

same issue at my system (blank screen at pioneer-binding)

2017-11-25 17:23:21.896 [ERROR] [org.openhab.binding.pioneeravr ] - [org.openhab.pioneeravr.thingtypeprovider(233)] The activate method has thrown an exception java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.type.ChannelGroupType.<init>(Lorg/eclipse/smarthome/core/thing/type/ChannelGroupTypeUID;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V

Looks like it did need OH v2.2. Some of the basics started working after doing the upgrade last night, keeping the .jar file for this binding rather than installing the main Pioneer binding. I’m not sure that they are the same since the official documentation is a bit different from this one.

A couple questions?
Is there a way to increment the volume up or down?
Is there a command to select a radio preset?

The command reference shows both are available. I can send the command via serial and get it to work, but I don’t know how to do it with the Pioneer binding?

I guess nobody can get the old 1.11 binding working in 2?

The new binding is OK for a VSX 1020 but I sorely miss the SPEAKERS command. The zone commands do not work with the 1020 but the speakers command was more useful to me as it allowed me to control remote speakers. Any chance of getting that command added to 2.0?