Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Questions and comments specific to a particular plugin should go here.
Mastiff
Experienced User
Posts: 754
Joined: Thu May 03, 2012 10:43 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Mastiff » Sat Sep 09, 2017 9:53 pm

Great, thanks!

Dragon470
Experienced User
Posts: 202
Joined: Thu Feb 10, 2011 2:16 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Dragon470 » Tue Sep 12, 2017 11:20 pm

I have been looking and have discovered answers on both for the scene information and digital audio signal input.

For the scene information I never did implement any code for it. I found my old notes on why I didn't finish, and it is because the scene presets are just a set of variables that are to be changed when you select it. It does not even keep knowledge that a scene was selected. Each scene holds data on numerous items. If you wanted to keep track of them it would be monumental.

For the digital audio signal, I found no data slot in the YNC protocol that stores this data. I guess the display on the receiver gets it direct from a chip inside the device. At least this is the case for my RX-V775. I did check on the receiver's local http server and noticed it did not display anything like it either.


On the bright side I might take some time and implement the save, load and retrieval of the scene information now that it has been brought back to my attention.

Mastiff
Experienced User
Posts: 754
Joined: Thu May 03, 2012 10:43 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Mastiff » Wed Sep 13, 2017 7:16 am

Hmm... OK, the format may not be possible to find. I have asked in the AVS Forum if anybody knows if that's possible to find anywhere, no answer so far. And the scene stuff sounds complicated. I see that not even the app retains memory of what scene's used. OK, workaround: Is it possible to check for what setting pattern (speaker setup) that's chosen, 1 or 2? Because all my scenes that uses Atmos (which is what I want to check for if it's not possible to find the format automatically) are using setting pattern 2, while the rest of the scenes are using setting pattern 1. From my setup it seems like the synthax is Pattern_Sel. That gives me a bunch of errors, but I'm guessing that's because you haven't implemented it. :mrgreen:

Mastiff
Experienced User
Posts: 754
Joined: Thu May 03, 2012 10:43 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Mastiff » Fri Oct 06, 2017 9:52 am

I have a problem checking for source. I get errors in the logger so something's wrong with the code, probably the name. This is the threaded script I got a "bit" of help with:

Code: Select all

print(u'Starter Yamaha-script for sjekking av strøm og demp')
import threading
import time

def worker(element, zone, kill=False):
    #setup PreviousVar with actual data from receiver
    PreviousVar = Yamahavariable = eg.plugins.YamahaRX.GetInfo(element, zone)
    while True:
        TempVar = Yamahavariable = eg.plugins.YamahaRX.GetInfo(element, zone)
        if TempVar != PreviousVar:
            eg.TriggerEvent(zone + " - " + element, TempVar, "YamahaRX")
            PreviousVar = TempVar
        time.sleep(3) #time in seconds
        if kill():
            break
    print "Exiting " + zone + " - " + element

eg.globals.Yamaha_Stop_Threads = False
eg.globals.YamahaThreads = []  #stores all the thread info for later managment
objects = []
objects.append(["Power","Main Zone"])
objects.append(["Mute","Main Zone"])
objects.append(["Source","Main Zone"])
objects.append(["Power","Zone 2"])
objects.append(["Mute","Zone 2"])


for i in objects:
    t = threading.Thread(target=worker, args=(i[0],i[1], lambda: eg.globals.Yamaha_Stop_Threads))
    eg.globals.YamahaThreads.append(t)
    t.start()
   
It checks the other stuff fine, but the Source (which I have tried calling source, SourceInput and so on) does not work. Can you please tell me what's wrong with that? Here's the errors I get:

Code: Select all

11:52:09   Exception in thread Thread-21459:
11:52:09   Traceback (most recent call last):
11:52:09     File "threading.pyc", line 532, in __bootstrap_inner
11:52:09     File "threading.pyc", line 484, in run
11:52:09     File "157", line 132, in worker
11:52:09     File "C:\Program Files (x86)\EventGhost\plugins\yamaha-network-receivers-master\client.py", line 558, in __call__
11:52:09       return get_status_string(self.plugin, object,zone)
11:52:09     File "C:\Program Files (x86)\EventGhost\plugins\yamaha-network-receivers-master\yamaha_xml.py", line 135, in get_status_string
11:52:09       value = xmldoc.getElementsByTagName(param)[0].firstChild.data
11:52:09   IndexError: list index out of range
11:52:09   
11:52:09   Exception in thread Thread-21457:
11:52:09   Traceback (most recent call last):
11:52:09     File "threading.pyc", line 532, in __bootstrap_inner
11:52:09     File "threading.pyc", line 484, in run
11:52:09     File "157", line 138, in worker
11:52:09   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:09   
11:52:09   Exception in thread Thread-21460:
11:52:09   Traceback (most recent call last):
11:52:09     File "threading.pyc", line 532, in __bootstrap_inner
11:52:09     File "threading.pyc", line 484, in run
11:52:09     File "157", line 138, in worker
11:52:09   Exception in thread Thread-21461:
11:52:09   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:09   Traceback (most recent call last):
11:52:09     File "threading.pyc", line 532, in __bootstrap_inner
11:52:09   
11:52:09     File "threading.pyc", line 484, in run
11:52:09     File "157", line 138, in worker
11:52:09   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:09   
11:52:10   Exception in thread Thread-21375:
11:52:10   Traceback (most recent call last):
11:52:10     File "threading.pyc", line 532, in __bootstrap_inner
11:52:10     File "threading.pyc", line 484, in run
11:52:10     File "156", line 143, in worker
11:52:10   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:10   
11:52:10   Exception in thread Thread-21379:
11:52:10   Traceback (most recent call last):
11:52:10     File "threading.pyc", line 532, in __bootstrap_inner
11:52:10     File "threading.pyc", line 484, in run
11:52:10     File "156", line 143, in worker
11:52:10   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:10   
11:52:10   Exception in thread Thread-21373:
11:52:10   Traceback (most recent call last):
11:52:10     File "threading.pyc", line 532, in __bootstrap_inner
11:52:10     File "threading.pyc", line 484, in run
11:52:10     File "156", line 143, in worker
11:52:10   AttributeError: 'NoneType' object has no attribute 'sleep'
11:52:10   

Dragon470
Experienced User
Posts: 202
Joined: Thu Feb 10, 2011 2:16 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Dragon470 » Fri Oct 06, 2017 11:50 am

Code: Select all

objects.append(["Input Selection", "Main Zone"])
Is what you need for source.

For figuring out any others you can make a new macro of the "Get Info"

Then afterwords right click and do copy as python.

In any text editor or script paste it.

Example:
eg.plugins.YamahaRX.GetInfo('Input Selection', 'Main Zone')

Within it you can see what you need.

Mastiff
Experienced User
Posts: 754
Joined: Thu May 03, 2012 10:43 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Mastiff » Fri Oct 06, 2017 12:04 pm

Thanks a lot! :D Btw did you have a chance to look at if you could add (if it's not there) checking for what speaker setup, 1 or 2, that's in use at any given time?

Mastiff
Experienced User
Posts: 754
Joined: Thu May 03, 2012 10:43 am

Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!

Post by Mastiff » Sat Oct 07, 2017 9:17 am

I see from the Get Info-thing that there is no mentioning of Speaker setup, all though scene is there. But from what you said I can probably not check reliably for that, right?

Post Reply