Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
I changed the AddActions in the plugin as I had implemented it wrong. It is corrected, but if you use the "Copy As Python" from a previously added action, it will still be wrong.
Any action added with the new version, will work. So if you wanted to do the "Copy As Python" from an older action, just recreate the action and then do the "Copy As Python" from the new one.
I did it this way so it would not break everybody's configuration trees.
Any action added with the new version, will work. So if you wanted to do the "Copy As Python" from an older action, just recreate the action and then do the "Copy As Python" from the new one.
I did it this way so it would not break everybody's configuration trees.
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Yep, that works now, thanks! Took me a few seconds to discover that it changed anything, since I was using pattern 2, but then I saw the 1 at the end of the command...
What I can't understand is GetInfo. I tried this:
I also tried to switch around Level and Subwoofer_1, and I tried to drop Level (which didn't work since it needs more parameters). This is the error message:
I'm guessing that my syntax is wrong, I doubt that it's something that isn't available, since the 3067 has that info in the Receiver Manager software. 
Code: Select all
print (eg.plugins.YamahaRX.GetInfo('Level', 'Subwoofer_1'))Code: Select all
13:52:38 Input not active or unavailable with your model.
13:52:38 NoneRe: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
here is a way to get an individual speaker per-out level.
Code: Select all
speakers = eg.plugins.YamahaRX.GetInfo('PreOut Levels', 'System')
for x in speakers:
if x[0] == "Subwoofer_1":
level = x[1]
#now variable level carries the correct value
print levelRe: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Thanks! Works as a charm!
So I guess it's not possible to get it straight out. I was thinking about doing a logic like this to increase the subs:
But it seems it takes a bit too long to get the level, so I will probably have to do it by getting the level into the variable when I turn on the receiver and then keep that variable and use that with +1 and -1 to adjust, before clearing it when the receiver is turned off.
Btw is it possible to get the receiver to tell when it's being turned off in another way than using a Nexa signal switch connected to a relay on the 12V control output? With a Sony I have in my daughter's room I can get all commands as events in EG. I'm guessing that the Yamaha has to send something like that since it tells both the built in control web page and the app that it's turned off, but maybe the problem is receiving it as an event?
Code: Select all
NewLevelSubwoofer1 = ({get subwoofer 1 level from the receiver})+1
NewLevelSubwoofer2 = ({get subwoofer 2 level from the receiver})+1
eg.plugins.YamahaRX.SetPattern1([['Subwoofer_1', NewLevelSubwoofer1], [NewLevelSubwoofer2, 4.0]])Btw is it possible to get the receiver to tell when it's being turned off in another way than using a Nexa signal switch connected to a relay on the 12V control output? With a Sony I have in my daughter's room I can get all commands as events in EG. I'm guessing that the Yamaha has to send something like that since it tells both the built in control web page and the app that it's turned off, but maybe the problem is receiving it as an event?
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
The only real way (and the same way the webpage does) is to query the device. I don't really want to continuously query the receivers at a constant interval. Newer sony receivers do it differently as they have 2-way communication with each pc, tablet, phone that connects to its web page. The source of a yamaha receiver says that it updates every 5 seconds. I also know it updates on any button press.
It is possible to do this, but to store everything would be a bit cumbersome. The only nice way to do this would be to grab the whole xml profile at once and then do whole comparisons with consecutive xml grabs. This was an idea a long time ago and I had abandoned it.
It is possible to do this, but to store everything would be a bit cumbersome. The only nice way to do this would be to grab the whole xml profile at once and then do whole comparisons with consecutive xml grabs. This was an idea a long time ago and I had abandoned it.
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
here is an example you could use within your configuration tree
Then just for the opposite (lower volume)
This will help the speedup and will be maintained until eventghost is open. You could also look at the pvar plugin to extend beyond closing eventghost.
Code: Select all
try:
Sub1 = eg.globals.Sub1 #checks if global variable has data / sets the local variable
except: #only happens if eg does not have the data
speakers = eg.plugins.YamahaRX.GetInfo('PreOut Levels', 'System')
for x in speakers:
if x[0] == "Subwoofer_1":
Sub1 = x[1]
eg.globals.Sub1 = Sub1 #sets for future use so it doesn't have to poll the receiver again
#now local variable carries the correct value
#print Sub1
#small condition to prevent error messages
if Sub1 < 9.5:
eg.plugins.YamahaRX.SetPattern1([['Subwoofer_1', Sub1 + 1]])
#reset the eg global variable
eg.globals.Sub1 = Sub1 + 1Then just for the opposite (lower volume)
Code: Select all
try:
Sub1 = eg.globals.Sub1 #checks if global variable has data / sets the local variable
except: #only happens if eg does not have the data
speakers = eg.plugins.YamahaRX.GetInfo('PreOut Levels', 'System')
for x in speakers:
if x[0] == "Subwoofer_1":
Sub1 = x[1]
eg.globals.Sub1 = Sub1 #sets for future use so it doesn't have to poll the receiver again
#now local variable carries the correct value
#print Sub1
#small condition to prevent error messages
if Sub1 > 9.5:
eg.plugins.YamahaRX.SetPattern1([['Subwoofer_1', Sub1 - 1]])
#reset the eg global variable
eg.globals.Sub1 = Sub1 - 1This will help the speedup and will be maintained until eventghost is open. You could also look at the pvar plugin to extend beyond closing eventghost.
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Thanks! Very nice!
As for keeping variables I prefer to use the system registry. I have a key for home automation, with temperatures for all rooms, modes and so on (day, night, no-frost), which are all set when a change is made.I have tried using a file before, but had an instance where the computer must have crashed in the middle of a write, and that garbled the file. So since that I've been using the system registry and it has never let me down. 
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
This is more general Python: I need to limit the range to -10 to 10 (which are the limits of my receiver). I tried this (after having changed the variables a bit, I have 15" subs on 1 and 12" subs on 2):
I thought that should work, but it didn't. Do you know what's wrong with the syntax there?
Code: Select all
if eg.globals.Subwoofer15 > 10
eg.globals.Subwoofer15 = 10
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Code: Select all
if eg.globals.Subwoofer15 > 10:
eg.globals.Subwoofer15 = 10
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Thanks!
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Here is a simple script that could be expanded for a constant monitoring of a yamahaRX.
Then to stop the thread run:
Code: Select all
#for reference
#item[0] = object
#item[1] = zone/category
#item[2] = value
#item[3] = suffix in TriggerEvent
from threading import Thread
import time
def MYFunction(objects):
while eg.globals.YamahaRXscan:
time.sleep(1) #wait time in between checks
for item in objects:
temp = eg.plugins.YamahaRX.GetInfo(item[0], item[1])
if temp != item[2]:
item[2] = temp
eg.TriggerEvent(item[3], payload=item[2], prefix="YamahaRX")
print "Exiting YamahaRXscan"
#initial setups
objects = []
objects.append(["Power", "Main Zone", eg.plugins.YamahaRX.GetInfo('Power', 'Main Zone'), "MZPower"])
objects.append(["Volume Level", "Main Zone", eg.plugins.YamahaRX.GetInfo('Volume Level', 'Main Zone'), "MZVolume"])
objects.append(["Input Selection", "Main Zone", eg.plugins.YamahaRX.GetInfo('Input Selection', 'Main Zone'), "MZInput"])
eg.globals.YamahaRXscan = True
T = Thread(target=MYFunction, args=[objects])
T.start()Code: Select all
eg.globals.YamahaRXscan = FalseRe: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Thank you very much! I'm at home now for a week or two, going back to the cabin either next weekend or the one after. I will try that then! 
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
Hello there,
I'm having trouble changing the inputs on my Yamaha RX-V477. Some of the commands work, as you can see by my screenshots, but not the inputs.
I'm using a Z-Wave Vera which has an HTTP plug-in http://forum.micasaverde.com/index.php?topic=23079.0 which sends 'HDMI1', or 'HDMI2', rather than the renamed source input, and that works, so maybe that is the issue.
It's not a dealbreaker for me, because I can use EventGhost to send a message to the Vera, which in turn runs a scene which will change the inputs, but I thought it might help others if I let you know of the problem.
Here are some screenshots, and Wireshark captures if it helps any:
http://imgur.com/a/8Jmiv
I'm having trouble changing the inputs on my Yamaha RX-V477. Some of the commands work, as you can see by my screenshots, but not the inputs.
I'm using a Z-Wave Vera which has an HTTP plug-in http://forum.micasaverde.com/index.php?topic=23079.0 which sends 'HDMI1', or 'HDMI2', rather than the renamed source input, and that works, so maybe that is the issue.
It's not a dealbreaker for me, because I can use EventGhost to send a message to the Vera, which in turn runs a scene which will change the inputs, but I thought it might help others if I let you know of the problem.
Here are some screenshots, and Wireshark captures if it helps any:
http://imgur.com/a/8Jmiv
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
I see the issue that you can rename your inputs on the receiver and they even show up in the "get available" action, but can't use them. I will look into the remapping them back to their internal name. Update to come when I have enough time. Thanks for pointing this out, as I don't usually rename any of my inputs.
Re: Yamaha RX-Vxxx (or similar) Ethernet Plugin!
An update is up for the renaming of inputs. I think I covered all actions, but I don't really have time now to check every action that uses sources.