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