openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.69k forks source link

[Denon] Handling of Input name IRADIO #5300

Open andyzlen opened 7 years ago

andyzlen commented 7 years ago

[Denon] Handling of Input name IRADIO [Denon binding 1.10.0 installed]

Expected Behavior

Binding should handle input name of source "Internet radio" in property "INPUT" as defined in Denon Contol Protocol Documentation which is "IRADIO" - not "Internet Radio".

Current Behavior

For my Denon receiver I use Internet radio as one source which seems to be addressable via property “IRADIO” (according to Denon Contol Protocol Documentation), even not documented in bindings description. Now I’m struggling with a selection item in my sitemap: Selection item=DenonInput mappings=[TV="TV", IRADIO="Internetradio", BT="Bluetooth", BD="Bluray", NET="Online Musik", MPLAY="Mediaplayer", AUX2="Raspberry"] When selecting one of this options in sitemap in general correct value is shown on UI after selection (e.g. option BT="Bluetooth" shows value "Bluetooth"), but only option IRADIO="Internetradio" is not displayed after it was selected. When option IRADIO="Internet Radio" is selected, receiver switches correctly to source internet radio, but having a look on /var/log/openhab2/events.log shows: => Item 'DenonInput' received command IRADIO => DenonInput changed from TV to Internet Radio

It seems that the binding INTERNALLY changed value from ‘IRADIO’ to ‘Internet Radio”. This of course is the reason why on UI the option "Internetradio" representing the value ‘IRADIO’ is not displayed. When trying to correct this by a rule

rule "Set DenonInput for IRadio" // switched by Denon Binding internally from IRADIO to "Internet Radio" when Item DenonInput changed then if(DenonInput.state == "Internet Radio") DenonInput.postUpdate("IRADIO") end

this ends in a ping pong when looking once m ore on /var/log/openhab2/events.log: => DenonInput changed from Internet Radio to IRADIO => DenonInput changed from IRADIO to Internet Radio => DenonInput changed from Internet Radio to IRADIO => DenonInput changed from IRADIO to Internet Radio …

By the way: regarding "Selection item=DenonInput" also the mapping "Internet Radio"="Internetradio" does not work either.

For the sake of completeness the item definition: String DenonInput "Source" {denon="avr6200#INPUT"}

Your Environment

Raspbian Jessie, OH2 version 2.1.0-1, Denon AVR X6200

9037568 commented 7 years ago

When selecting one of this options in sitemap in general correct value is shown on UI after selection (e.g. option BT="Bluetooth" shows value "Bluetooth"), but only option IRADIO="Internetradio" is not displayed after it was selected.

What IS displayed under this circumstance?

Please also attach a debug log.

andyzlen commented 7 years ago
  1. After option IRADIO="Internetradio" was selected the display field of the selection item (="Quellenwahl") is empty – that means showing no value:

Denon_Input

When checking console with ‘smarthome:status DenonInput’ it reveals the value “Internet Radio”.

  1. Console log (org.openhab.binding.denon log level = DEBUG):
15:11:11.082 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'DenonInput' received command IRADIO
15:11:11.107 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonInput changed from TV to IRADIO
15:11:11.792 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonInput changed from IRADIO to TV
15:11:16.982 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonInputTV changed from ON to OFF
15:11:16.986 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonInput changed from TV to Internet Radio
15:11:16.991 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonSurroundMode changed from DTS Neural:X to Multi Ch Stereo
15:11:17.023 [INFO ] [marthome.event.ItemStateChangedEvent] - DenonIRadioVisible changed from OFF to ON
9037568 commented 7 years ago

The openhab.log file should contain a number of debug outputs. eg.:

[DEBUG] Denon binding has been started.

If you're not seeing those, your log isn't configured correctly.

andyzlen commented 7 years ago

After setting DEBUG mode for all packages ("log:set DEBUG") - here we are:

Denon_DEBUG_IRADIO.txt

9037568 commented 7 years ago

Very strange. I don't see any output from the Denon binding in there.

andyzlen commented 7 years ago

I don't know what does this mean for my Denon binding installation. I can only say in general it's working fine for me. Any ideas?

9037568 commented 7 years ago

Only thing I can think of is to make sure you're looking at the output in userdata/logs/openhab.log.

andyzlen commented 7 years ago

Next try for DEBUG:

  1. Raspberry rebooted
  2. Console: log:set DEBUG && log:set DEBUG org.openhab.binding.denon
  3. Selected option IRADIO="Internetradio" in Basic UI
  4. Saved /var/log/openhab2/openhab.log (Repository Installation): openhab_log.txt

I checked log but no “org.openhab.binding.denon” entries, sorry. Possibly something wrong with my DEBUG mode – or with my configuration?