[Onkyo] Help with advanced troubleshooting

Good day,
I’m hoping for some troubleshooting advice with my Onkyo add-on.

My set up is Openhabian 2.3 running on a Pi3. Add-on ver 2 installed.
I have an Onkyo TX-616, running the latest firmware.

Sitemap looks like this:

'''php

 Frame label="Lounge" {
                                Switch item=avr1Z1_Power label="Lounge Receiver"
                                Switch item=avr1Z1_Input label="Select Input"  mappings=[0="Dstv", 1="Kodi", 16="Dvd", 43="Spotify"]
                             Slider item=avr1Z1_Volume label="Volume [%s]"
                        }
                        Frame label="Patio" {
                                Switch item=avr1Z2_Power label="Patio Amp"
                                Switch item=avr1Z2_Input label="Select Input" mappings=[43='Net', 05='Bluetooth', 36='FM Radio']
                             Slider item=avr1Z2_Volume label="Volume [%s]"
    
'''

Items file looks like this:

‘’'csv


Switch avr1Z1_Power "Lounge Receiver On/Off" <receiver> [ "Switchable" ] { channel="onkyo:TX-NR616:myOnkyo:zone1#power" }

String avr1Z1_Input "Select" <sofa> { channel="onkyo:TX-NR616:myOnkyo:zone1#input" }

Dimmer avr1Z1_Volume "Volume [%d]" <soundvolume> { channel="onkyo:TX-NR616:myOnkyo:zone1#volume" }

‘’’

The item I’m having trouble with is Input select on Zone 1, our Lounge. When I select inputs, nothing happens on the receiver.
It must be noted that Zone 2, or patio works perfectly.

Things I have tried so far:

reinstalled the Add-on a number of times.

I have verified the input values (0,1,16,43) as valid numbers. (from the demo add-on config)
I also noticed the input values (0,1,16,43) I found were very different from the add-on examples, as well as the Onkyo documentation. Even if the values are wrong, the input sellect should switch to a “wrong” input, but in my case no select change happens.

I have also tried replacing “switch” with “select” as per the sitemap documentation.

The thing I find interesting, if I do a tcpdump on the Pi Interface, there is no tcp/udp output to the receiver from the Pi. For all the other commands, (volume, power and all 3 the zone 2 commands) I see tcp & udp packets to the receiver, but not the Z1 Input commands.

Over the years, I have added and reinstalled the add-on so many times, I fear it may have become broken/confused within Openhab.

Anyway I can look under the hood?

Your advice will be greatly appreciated.

Your configs look good (although, you should REALLY use How to use code fences when posting them… you can edit your post above to include them)

edit: I see a strange character (;) after “Select” (this is why you need to use code fences)

enable TRACE log level on the binding from the console and see what happens when you press the selection on your sitemap for Zone1

log:set TRACE org.openhab.binding.onkyo

Thank you Dim, Didn’t know about code fences, thanks, fixed that now. The ; was from bad posting, sorry.

Now that looks better. :grinning:

There is a difference (now very noticeable) between the two zones, the mappings on one a single quotes, and the other is double quotes, changing them makes no difference.

I didn’t include logs in the original post, here are some event logs. Turned zone 1 on, and then toggling through the inputs.

‘’’


2018-11-18 12:16:01.656 [ome.event.ItemCommandEvent] - Item 'avr1Z1_Power' received command ON

2018-11-18 12:16:01.817 [vent.ItemStateChangedEvent] - avr1Z1_Power changed from OFF to ON

2018-11-18 12:16:02.528 [vent.ItemStateChangedEvent] - avrLrPlayer_Listenmode changed from 1 to 12

2018-11-18 12:16:02.871 [vent.ItemStateChangedEvent] - avrLrZ1_Power changed from OFF to ON

2018-11-18 12:16:03.420 [vent.ItemStateChangedEvent] - avrLrNet_Selection changed from UNDEF to 0

2018-11-18 12:16:03.694 [vent.ItemStateChangedEvent] - avrLrNet_Item0 changed from - to vTuner Internet Radio

2018-11-18 12:16:04.039 [vent.ItemStateChangedEvent] - avrLrNet_Item0 changed from vTuner Internet Radio to -

2018-11-18 12:16:04.061 [vent.ItemStateChangedEvent] - avrLrNet_Item1 changed from - to Last.fm Internet Radio

2018-11-18 12:16:04.063 [vent.ItemStateChangedEvent] - avrLrNet_Selection changed from 0 to UNDEF

2018-11-18 12:16:04.066 [vent.ItemStateChangedEvent] - avrLrNet_Item1 changed from Last.fm Internet Radio to -

2018-11-18 12:16:04.848 [ome.event.ItemCommandEvent] - Item 'avr1Z1_Input' received command 1

2018-11-18 12:16:06.108 [vent.ItemStateChangedEvent] - avr1Z1_Input changed from 16 to 1

2018-11-18 12:16:07.159 [ome.event.ItemCommandEvent] - Item 'avr1Z1_Input' received command 0

2018-11-18 12:16:07.172 [vent.ItemStateChangedEvent] - avr1Z1_Input changed from 1 to 0

2018-11-18 12:16:10.934 [ome.event.ItemCommandEvent] - Item 'avr1Z1_Input' received command 16

2018-11-18 12:16:11.177 [vent.ItemStateChangedEvent] - avr1Z1_Input changed from 0 to 16

2018-11-18 12:16:12.182 [ome.event.ItemCommandEvent] - Item 'avr1Z1_Input' received command 43

2018-11-18 12:16:12.330 [vent.ItemStateChangedEvent] - avr1Z1_Input changed from 16 to 43

Now doing the same for zone 2,



2018-11-18 12:16:18.236 [ome.event.ItemCommandEvent] - Item 'avr1Z2_Power' received command ON

2018-11-18 12:16:18.369 [vent.ItemStateChangedEvent] - avr1Z2_Power changed from OFF to ON

2018-11-18 12:16:19.462 [vent.ItemStateChangedEvent] - avrLrZ2_Power changed from OFF to ON

2018-11-18 12:16:20.741 [ome.event.ItemCommandEvent] - Item 'avr1Z2_Input' received command 43

2018-11-18 12:16:20.958 [vent.ItemStateChangedEvent] - avr1Z2_Input changed from 5 to 43

2018-11-18 12:16:21.066 [vent.ItemStateChangedEvent] - avrLrNet_Selection changed from UNDEF to 0

2018-11-18 12:16:22.846 [vent.ItemStateChangedEvent] - avrLrNet_Item3 changed from - to AUPEO! PERSONAL RADIO

2018-11-18 12:16:23.061 [vent.ItemStateChangedEvent] - avrLrNet_Item5 changed from - to MP3tunes

2018-11-18 12:16:23.151 [vent.ItemStateChangedEvent] - avrLrNet_Item1 changed from - to Last.fm Internet Radio

2018-11-18 12:16:23.167 [vent.ItemStateChangedEvent] - avrLrNet_Item2 changed from - to Spotify

2018-11-18 12:16:23.169 [vent.ItemStateChangedEvent] - avrLrNet_Item4 changed from - to simfy

2018-11-18 12:16:23.421 [vent.ItemStateChangedEvent] - avrLrNet_Item0 changed from - to vTuner Internet Radio

2018-11-18 12:16:23.450 [ome.event.ItemCommandEvent] - Item 'avr1Z2_Input' received command 5

2018-11-18 12:16:23.459 [vent.ItemStateChangedEvent] - avrLrNet_Item6 changed from - to My Favorites

2018-11-18 12:16:23.468 [vent.ItemStateChangedEvent] - avrLrNet_Item7 changed from - to Home Media

2018-11-18 12:16:23.476 [vent.ItemStateChangedEvent] - avrLrZ2_Input changed from 5 to 43

2018-11-18 12:16:23.696 [vent.ItemStateChangedEvent] - avrLrNet_Item8 changed from - to DLNA

2018-11-18 12:16:24.077 [vent.ItemStateChangedEvent] - avr1Z2_Input changed from 43 to 5

2018-11-18 12:16:24.341 [vent.ItemStateChangedEvent] - avrLrNet_Item0 changed from vTuner Internet Radio to -

2018-11-18 12:16:24.500 [vent.ItemStateChangedEvent] - avrLrNet_Selection changed from 0 to UNDEF

2018-11-18 12:16:24.819 [vent.ItemStateChangedEvent] - avrLrNet_Item5 changed from MP3tunes to -

2018-11-18 12:16:24.947 [vent.ItemStateChangedEvent] - avrLrNet_Item1 changed from Last.fm Internet Radio to -

2018-11-18 12:16:24.950 [vent.ItemStateChangedEvent] - avrLrNet_Item2 changed from Spotify to -

2018-11-18 12:16:25.182 [vent.ItemStateChangedEvent] - avrLrNet_Item4 changed from simfy to -

2018-11-18 12:16:25.362 [vent.ItemStateChangedEvent] - avrLrNet_Item3 changed from AUPEO! PERSONAL RADIO to -

2018-11-18 12:16:25.364 [vent.ItemStateChangedEvent] - avrLrNet_Item6 changed from My Favorites to -

2018-11-18 12:16:25.372 [vent.ItemStateChangedEvent] - avrLrNet_Item7 changed from Home Media to -

2018-11-18 12:16:25.565 [vent.ItemStateChangedEvent] - avrLrNet_Item8 changed from DLNA to -

2018-11-18 12:16:25.784 [vent.ItemStateChangedEvent] - avrLrZ2_Input changed from 43 to 5

2018-11-18 12:16:27.913 [ome.event.ItemCommandEvent] - Item 'avr1Z2_Input' received command 36

2018-11-18 12:16:28.103 [vent.ItemStateChangedEvent] - avr1Z2_Input changed from 5 to 36

2018-11-18 12:16:29.259 [vent.ItemStateChangedEvent] - avrLrZ2_Input changed from 5 to 36

I did the log trace, although I didn’t see anything, as in, no log was generated. I will pursue that for a while, I’m obviously doing something wrong. But thanks for the direction.

Dim, I managed to get the log:tail to work,

I see log entries when I turn the receiver Zone 1 on and off, as well as if I change the sound values. But nothing gets logged when I change the input values.

On Zone 2 I get all the values as expected.

Have you tried using ’ instead of " as you do for zone2?
Like this:

 Switch item=avr1Z1_Input label="Select Input" mappings=[0='Dstv', 1='Kodi', 16='Dvd', 43='Spotify']

Since zone2 works, maybe post those .items defs as well? For comparison.
Also nice to put logs in code fences :slight_smile:

1 Like

Yea oops again about the fences.

I noticed in the logs above, some the log events (avrLrNet) came from the Onkyo demo files. So I’ve renamed them now to ensure they are not in play anymore.

@OMR when I swop the avr1Z1_Input with avr1Z2_Input input in the sitemap, then Zone2 is changed by Zone1 menu item, so it leads me to believe the problem is not tin sitemap file, but has to be in the items file.

I did notice this in the openhab.log file, not sure if it is significant…

2018-11-18 15:38:13.929 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '16' of item avr1Z1_Input with format '%.0f': f != java.lang.String
2018-11-18 15:38:15.090 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '16' of item avr1Z1_Input with format '%.0f': f != java.lang.String
2018-11-18 15:38:15.853 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '16' of item avr1Z1_Input with format '%.0f': f != java.lang.String
2018-11-18 15:38:18.815 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '16' of item avr1Z1_Input with format '%.0f': f != java.lang.String
2018-11-18 15:38:19.111 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '16' of item avr1Z1_Input with format '%.0f': f != java.lang.String

check something using the console:

items list |grep avr

do you have a duplicate Item named avr1Z1_Input ?

here is my output…

                                                                                                                                                                                                                                                                  
openhab> items list |grep avr                                                                                                                                                                                                                                                  
avr1Z1_Input (Type=StringItem, State=43, Label=Select, Category=null)
avr1Z1_Volume (Type=DimmerItem, State=45, Label=Volume, Category=soundvolume)
avr1Z1Player_Control (Type=PlayerItem, State=PAUSE, Label=Control, Category=text)
avr1Z2_Input (Type=NumberItem, State=43, Label=Select, Category=patio1)
avr1Z2_Volume (Type=DimmerItem, State=0, Label=Volume, Category=soundvolume)
avr1Z2Player_Control (Type=PlayerItem, State=PAUSE, Label=Control, Category=text)
avr1Z1_Power (Type=SwitchItem, State=ON, Label=Lounge Receiver On/Off, Category=receiver, Tags=[Switchable])
avr1Z2_Power (Type=SwitchItem, State=ON, Label=Patio Speaker On/Off, Category=receiver, Tags=[Switchable], Groups=[grp_amp])
openhab>                                 

Change avr1Z1 to Number type also

DUDE!!! It’s working!!!

Freek, I cannot tell you how many times I’ve looked at those lines and never noticed it!!!

F@^#$^%$^%

Thank you! Thank you!

1 Like

thank you @Dim and @OMR for your time and teaching me about fences!!

Hope to contribute much in the future.!!

Have a great day further!

1 Like

We would had caught it with this info as well :slight_smile:

2 Likes