Yamaha AVR driver

More
2 years 1 week ago #3010 by andrew
Replied by andrew on topic Yamaha AVR driver
Now I've actually got my official hardware I feel I can raise this again.

The Yamaha AVR driver has a problem in that the Yamaha amp drops any network connection after 40 seconds of no activity. The myServer driver notices this, waits for 10 seconds then reconnects again. If I'm unlucky enough to want to control the amp during that 10 seconds (20% of the time) then nothing will happen. The solution is to send a keep alive message to the Yamaha amp more frequently than every 40 seconds - say every 30 seconds if no control messages have been sent in the last 30 seconds?

In my previous message I linked to a Yamaha AVR simulator project which I've forked to include the timeout so fixing this problem can be done even if one doesn't have an actual amp.

I'd be grateful if this could be fixed as I would love to use network control from the start rather than IR through a Global Caché device.

Extract from Yamaha docs:
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]

Log file extract:
26/07/2024 17:52:15.52 · DEBUG · YamahaAVR.NetDisconnect - Device 23 has disconnected.
26/07/2024 17:52:25.52 · DEBUG · YamahaAVR.NetConnect - Device 23 has connected.
26/07/2024 17:53:05.53 · DEBUG · YamahaAVR.NetDisconnect - Device 23 has disconnected.
26/07/2024 17:53:15.53 · DEBUG · YamahaAVR.NetConnect - Device 23 has connected.
26/07/2024 17:53:55.53 · DEBUG · YamahaAVR.NetDisconnect - Device 23 has disconnected.
26/07/2024 17:54:05.54 · DEBUG · YamahaAVR.NetConnect - Device 23 has connected.

Andrew

Please Log in to join the conversation.

More
2 years 1 week ago #3011 by andrew
Replied by andrew on topic Yamaha AVR driver
I see that the originating Yamaha AVR simulator project has added the timeout at my suggestion so you can use the original instead: github.com/mvdwetering/ynca

Andrew

Please Log in to join the conversation.

More
2 years 1 week ago - 2 years 1 week ago #3018 by andrew
Replied by andrew on topic Yamaha AVR driver
As a very temporary workaround I've created a crontab for the allonis user as follows:

Code:
# m h  dom mon dow   command * * * * * ( /home/allonis/keep-alive-yamaha.sh ) * * * * * ( sleep 30 ; /home/allonis/keep-alive-yamaha.sh )


and the script file at /home/allonis/keep-alive-yamaha.sh contains:

Code:
#!/bin/sh (/usr/bin/wget -q -O /dev/null "http://192.168.1.101/api/docommand/?command=AV|23~Test~@SYS:MODELNAME=?") > /dev/null

Andrew
Last edit: 2 years 1 week ago by andrew. Reason: Formatting

Please Log in to join the conversation.

Time to create page: 0.171 seconds