Yamaha AVR driver

More
2 years 4 months ago - 2 years 4 months ago #1955 by andrew
Yamaha AVR driver was created by andrew
There doesn't seem to be a specific area for Yamaha driver(s) so I've started this topic to keep the general driver release thread clean of discussion of specific drivers.

At the moment it looks like I've got three server variables that were set up when the driver was configured (av_25_connected, av_25_name and av_25_power) but the av_25_power variable always stays as 'Standby' even when the amp is turned on by myServer. av_25_connected does correctly switch between 0 and 1 as the driver connects and disconnects.

I never get an av_25_volume variable created to mirror the volume.

Andrew
Last edit: 2 years 4 months ago by andrew.

Please Log in to join the conversation.

More
2 years 4 months ago - 2 years 4 months ago #1988 by andrew
Replied by andrew on topic Yamaha AVR driver
Somehow I've ended up with two threads but I'll use this one as it's under the newly created "Yamaha AVR" category.

Current position with this driver:
  • 'av_25_power' variable always stays as 'Standby' when the amp is turned on either by myServer or other control
  • I never get an av_25_volume variable created to store the volume
  • Driver disconnects after 40 seconds of inactivity then reconnects 10 seconds after that
The last one is explainable by reference to the YNCA protocol specification. It says the following, so I think all the driver needs to do is send a keep-alive query more frequently than 40 second intervals, say every 30 seconds. The connection needs to be kept alive so that myServer is notified of any state changes on the amp. The 10 second reconnection delay is I assume a timeout in the myServer driver code.

Andrew

Code:
4.2.2.1 Auto Disconnection / Keep Alive The Product will automatically disconnect TCP/IP connection in about 40 seconds with no reception of commands or no status change (meaning no Auto Feedback happens) while TCP/IP connection is alive. Therefore some commands have to be issued periodically (within 40 seconds) in order to keep TCP/IP connection alive. The following is recommended to use as a keep-alive command; @SYS:MODELNAME=?[CR/LF] Also see the example sequence of Keep Alive in section 5.2 Control Examples for details. 4.2.2.2 Necessity of keeping alive the connection With YNCA control on Ethernet, although it is basically assumed that TCP/IP port be kept alive, it can be once disconnected and re-connected as needed basis of sending commands unless Auto Feedback is required in the control system that you’re building. In other words, keep alive has to be done if Auto Feedback status update is a must.
Last edit: 2 years 4 months ago by andrew.

Please Log in to join the conversation.

More
2 years 4 months ago #1991 by andrew
Replied by andrew on topic Yamaha AVR driver
PS I get the impression there should be a plethora of av_25_* variables created for this driver. I don't see any of them, only _connected, _name and _power (which never changes) as stated previously. It's as if the responses back from the amplifier aren't being processed by the driver and stored in variables.

There's a python implementation of a YNCA driver here  github.com/mvdwetering/ynca and it rather helpfully contains a Yamaha avr simulator. It doesn't implement the connection drop after 40s idle but apart from that it seems to work. You 'fill it up' on start up with data from a real amp (or made up) and it uses that in its responses. I've extracted just the relevant files needed to run it and attached them to this post. You can run it like this:
Code:
$ /c/apps/python39/python.exe server.py --loglevel DEBUG --port 50000 RX-V475.txt

then use AddReceiver in myServer to add it and test some commands. Hopefully this will help with the debugging.

 

File Attachment:

File Name: ynca-simulator.zip
File Size:7.7 KB

 

Andrew

Please Log in to join the conversation.

More
2 years 4 months ago #1997 by davep
Replied by davep on topic Yamaha AVR driver
The drivers only query for power, volume, mute and source by default. To get additional settings the polling commands will have to be modified.

Please Log in to join the conversation.

More
2 years 4 months ago #2005 by andrew
Replied by andrew on topic Yamaha AVR driver

The drivers only query for power, volume, mute and source by default. To get additional settings the polling commands will have to be modified.
But none of those are working at the moment, at least not that I can see.

Andrew

Please Log in to join the conversation.

More
2 years 4 months ago #2020 by andrew
Replied by andrew on topic Yamaha AVR driver
I've forked the Python ynca project and updated the simulator so that it times out after 40 seconds of no activity from the myServer client. So that aspect of the driver can be debugged now too.

My fork is at github.com/andrewmk/ynca?tab=readme-ov-file#ynca-server and the simulator is run (as per the readme) from the root of the project:

python3.exe -m ynca.server --loglevel DEBUG --port 50000 /logs/RX-V475.txt

Andrew

Please Log in to join the conversation.

Time to create page: 0.190 seconds