Help with Yamaha binding and manual thing/item configuration

yamaha
yamahareceiver
Tags: #<Tag:0x00007fe054c39650> #<Tag:0x00007fe054c394c0>

(Tommy Sharp) #1

I’m trying to follow the binding documentation but the example of the thing configuration doesn’t marry up with the example item configuration… It’s VERY confusing!

After several attempts and other topics in the form I currently have this… No errors… But my test item for the volume just doesn’t work!
Any help would be greatly appreciated…

Thing

Bridge yamahareceiver:yamahaAV:MyRX-V583 "RX-V583" [host="192.168.1.218", refreshInterval=20] {
    Thing zone MainZone "Main Zone" [zone="Main_Zone", volumeDbMin=-81, volumeDbMax=12]
}

Item

Dimmer Yamaha_VolumeZ1 "Volume [%.1f %%]" <soundvolume> (Yamaha) {channel="yamahareceiver:zone:MyRX-V583:Main_Zone:zone_channels#volume"}

(Tommy Sharp) #2

The thing I have added even shows up in the PaperUI inbox with these details…
And these match the details for the binding I am entering when setting up my volume item…


(Sebastian) #3

Mh, your thing and item definitions look good on first sight. Think we need some more information to figure this out:

See How to ask a good question / Help Us Help You No. 10

Describe your environment

What version of openHAB are you using? What snapshot version (if relevant)? Are you Windows, iOS or Linux? If Linux, is it natively or in Docker/Vm?

Some categories provide you with a template to fill in:

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:
  • Issue of the topic: please be detailed explaining your issue
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue

Also:

  • Do you have other yamahareceiver items working?
  • Have you tried without volumeDbMin, volumeDBMax statements?
  • What happens when sending a command to the Dimmer item?
  • Have you tried setting the yamahareceiver binding into debug mode?

(Tommy Sharp) #4

Hi Sebastian, yeah if it’s not a dumb mistake on my part then these are some extra details…

Running OpenHABian on a RPi3 being openHAB 2.5.0 Build #1502.
I only have the 1 yamaha item setup so far.

When I send a command to the dimmer through the classic UI I see this in the logs.

2019-02-12 23:06:08.890 [ome.event.ItemCommandEvent] - Item 'Yamaha_VolumeZ1' received command 59
2019-02-12 23:06:08.895 [nt.ItemStatePredictedEvent] - Yamaha_VolumeZ1 predicted to become NULL

Just tried removing the volumeDbMin and max settings from the “thing” and this doesn’t look to change anything…

I do notice this in the logs every 20 second based on the refresh interval I guess…


2019-02-12 23:09:07.294 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_ac44f241c6b4:MainZone' has been updated.
2019-02-12 23:09:27.275 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_ac44f241c6b4:MainZone' has been updated.
2019-02-12 23:09:47.387 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_ac44f241c6b4:MainZone' has been updated.
2019-02-12 23:10:07.400 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_ac44f241c6b4:MainZone' has been updated.

And finally… How would I enable debug mode?


(Sebastian) #5

So from a configuration point of view everything seems to work as it should.

Yes. This indicates your Thing is working properly.

So this is a (unstable) snapshot build. Just to mention.
I’m still on openHAB 2.3 and the ItemStatePredictedEvent functionality was just introduced with openHAB 2.4 I think. So, sorry I have no experience with this.

What happens if you try to use other channels (e.g. zone_channels#power to switch the receiver ON/OFF)?

Use the Karaf Console and enter:

log:set DEBUG org.openhab.binding.yamahareceiver

(Tommy Sharp) #6

The power switch has no effect either…

2019-02-13 20:56:31.521 [ome.event.ItemCommandEvent] - Item 'Yamaha_Power' received command ON
2019-02-13 20:56:31.526 [nt.ItemStatePredictedEvent] - Yamaha_Power predicted to become NULL

(Tommy Sharp) #7

Enabled the debugging and when the state of the binding updates I get this…

2019-02-13 21:13:56.457 [DEBUG] [.internal.protocol.xml.XMLConnection] - Making POST to http://192.168.1.218:80/YamahaRemoteControl/ctrl with payload: &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;YAMAHA_AV cmd="GET"&gt;&lt;System&gt;&lt;Power_Control&gt;&lt;Power&gt;GetParam&lt;/Power&gt;&lt;/Power_Control&gt;&lt;/System&gt;&lt;/YAMAHA_AV&gt;
2019-02-13 21:13:56.480 [DEBUG] [ternal.protocol.xml.SystemControlXML] - System state - power: false, partyMode: false
2019-02-13 21:13:56.486 [DEBUG] [.internal.protocol.xml.XMLConnection] - Making POST to http://192.168.1.218:80/YamahaRemoteControl/ctrl with payload: &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;YAMAHA_AV cmd="GET"&gt;&lt;Main_Zone&gt;&lt;Input&gt;&lt;Input_Sel_Item&gt;GetParam&lt;/Input_Sel_Item&gt;&lt;/Input&gt;&lt;/Main_Zone&gt;&lt;/YAMAHA_AV&gt;
2019-02-13 21:13:56.488 [DEBUG] [.internal.protocol.xml.XMLConnection] - Making POST to http://192.168.1.218:80/YamahaRemoteControl/ctrl with payload: &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;YAMAHA_AV cmd="GET"&gt;&lt;Main_Zone&gt;&lt;Basic_Status&gt;GetParam&lt;/Basic_Status&gt;&lt;/Main_Zone&gt;&lt;/YAMAHA_AV&gt;
2019-02-13 21:13:56.540 [DEBUG] [internal.protocol.xml.ZoneControlXML] - Zone Main_Zone state - power: false, mute: false, volumeDB: -60.0, input: NET RADIO, surroundProgram: 7ch Stereo

But when I try control the volume or power switch I just get the same message to say the item received the command “ON” but nothing else so it must not be properly linked up to the binding…


(Tommy Sharp) #8

Okay!
So changing my item to be this has worked… MainZone instead of Main_Zone…

Switch      Yamaha_Power           "Power [%s]"              <switch>       (Yamaha)      { channel="yamahareceiver:zone:9ab0c000_f668_11de_9976_ac44f241c6b4:**MainZone**:zone_channels#power" }

So it was the connection to the item in my item that was off slightly… At least it works now but have to admin that the examples in the docs are still extremely confusing!
And I’ve tried to update documentation in the past but the whole idea of creating a branch etc etc just to update some documentation means I’ll update it in my local OneNote documentation at least :slight_smile:


(Sebastian) #9

Glad you found the solution :+1:
Didn’t see this when checking your posted config. Small cause, big effect :wink:

Can you tell what exactly you find confusing? Only with concrete feedback we can improve the documentation.

I’m no developer and have no idea how to create a branch or set up an IDE or whatever. But to “just” update the documentation you can do this from the GitHub UI. Just open the file in GitHub and click the “edit” symbol.

You can edit the file right in the UI and generate a pull request. But ensure to have a quick look at the contribution guidelines and esp. the “sign your work” part of it (actually this is what I missed doing my first docu PR :see_no_evil:)

Would be great to have your update not just in the private OneNote.