Logic Machine Forum
Use Lm3 to control your Yamaha Receiver using HTTP commands ( RX- V671) - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Use Lm3 to control your Yamaha Receiver using HTTP commands ( RX- V671) (/showthread.php?tid=793)



Use Lm3 to control your Yamaha Receiver using HTTP commands ( RX- V671) - phongvucba - 17.05.2017

Help me!
I have information about a device that can connect to control it via HTTP.
I want to control the Yamaha RX-V671 through Lm3.
Has anyone ever done it, or who can write a script to do it. Help me, I am very thankful!
I am new to Lm3! Should not be very understanding.

Https://github.com/a-lurker/Vera-Plugin-Yamaha-RX-HTTP
-----------------
https://www.google.com.vn/search?q=V671_3071_FuncTree_1.10.xls&oq=V671_3071_FuncTree_1.10.xls&aqs=chrome..69i57.530j0j4&sourceid=chrome&ie=UTF-8

https://forums.homeseer.com/showthread.php?t=157837

Can you write a script to turn off or turn on the player via Lm3?
Select HDMI 1, Select Audio 1
Thank so much!


RE: Use Lm3 to control your Yamaha Receiver using HTTP commands ( RX- V671) - Magnus Lindgren - 17.05.2017

Maybe this?    I made this script to mute my receiver when i go out:


Code:
http = require("socket.http")
url_string = "http://192.168.0.43:80/YamahaRemoteControl/ctrl"

http.TIMEOUT = 5


value = event.getvalue()

if (value == false) then
post_request_body ='<?xml version="1.0" encoding="UTF-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Mute>Off</Mute></Volume></Main_Zone></YAMAHA_AV>'
elseif (value == true) then
post_request_body ='<?xml version="1.0" encoding="UTF-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Mute>On</Mute></Volume></Main_Zone></YAMAHA_AV>'
end

http.request(url_string, post_request_body)





Just change IP to your receiver and put the script in a event.


RE: Use Lm3 to control your Yamaha Receiver using HTTP commands ( RX- V671) - eilert - 26.01.2022

(17.05.2017, 15:51)Magnus Lindgren Wrote: Maybe this?    I made this script to mute my receiver when i go out:


Code:
http = require("socket.http")
url_string = "http://192.168.0.43:80/YamahaRemoteControl/ctrl"

http.TIMEOUT = 5


value = event.getvalue()

if (value == false) then
post_request_body ='<?xml version="1.0" encoding="UTF-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Mute>Off</Mute></Volume></Main_Zone></YAMAHA_AV>'
elseif (value == true) then
post_request_body ='<?xml version="1.0" encoding="UTF-8"?><YAMAHA_AV cmd="PUT"><Main_Zone><Volume><Mute>On</Mute></Volume></Main_Zone></YAMAHA_AV>'
end

http.request(url_string, post_request_body)





Just change IP to your receiver and put the script in a event.

If someone is interested, I found out that more recent Yamaha receivers use this protocol; https://www.sdu.se/pub/yamaha/yamaha-ynca-receivers-protocol.pdf
TCPIP port should be 50000
A power on command would look like this:
Code:
post_request_body ='<?xml version="1.0" encoding="UTF-8"?><YAMAHA_AV cmd="PUT">@MAIN:PWR=On\r\n</YAMAHA_AV>'

Best regards
Eilert Bjerkan