pepiho
(Petr )
June 6, 2023, 4:24pm
1
Please help me with automation with my Denon.
When I enter this and run it, I get answer Device is on or off.
condition: device
device_id: 60d879c22b7d0ac8f662541a8f12d5a1
domain: media_player
entity_id: media_player.denon_avc_s660h
type: is_on
What should I write in Action when I want to start my Denonn (turn_on) .
I’ve tried a lot but I can’t.
Thank you.
Rudd-O
(Rudd-O)
June 6, 2023, 9:00pm
2
You need to copy the whole YAML of the automation. This part is not useful to diagnose your problem.
pepiho
(Petr )
June 7, 2023, 4:15pm
3
Hi, This is my simple test code.
The first functional part detects if my Denon is on and the second would have more volume. I won’t be using the script, but I want to understand the control of my Denon for future automation.
alias: '1'
description: ''
trigger: []
condition:
- condition: device
device_id: 60d879c22b7d0ac8f662541a8f12d5a1
domain: media_player
entity_id: media_player.denon_avc_s660h
type: is_on
action:
- service: denonavr.get_command
data:
command: /goform/formiPhoneAppDirect.xml?MVUP<>
target:
device_id: 60d879c22b7d0ac8f662541a8f12d5a1
mode: single
I’m new to HA and have read many hours of documentation and still no functionality.
I think the communication using denonavr is functional, but I can’t control anything on the Denod using automation (the Denon control works from the basic HA desktop).
sorry for my english…
pepiho
(Petr )
June 7, 2023, 5:56pm
4
… control of my Denon works for me now…
service: denonavr.get_command
data:
command: /goform/formiPhoneAppDirect.xml?MVUP
target:
entity_id: media_player.denon_avc_s660h
Rudd-O
(Rudd-O)
July 10, 2023, 8:48pm
5
For volume you can just use the set volume service. No need to use raw goform commands.
The function node command (from Node-RED) to set modes 1 thru 4 in my Marantz AVR is thus:
var selectors = {
"button.marantz_av7702mkii_quick_select_3": 3,
"button.marantz_av7702mkii_quick_select_1": 1,
"button.marantz_av7702mkii_quick_select_2": 2,
"button.marantz_av7702mkii_quick_select_4": 4
}
var value = selectors[msg.topic];
if (value === undefined) {
node.status({fill: "red", text: "No such button " + msg.topic});
return null;
}
node.status({ fill: "blue", text: "Selected mode " + value });
msg.headers = {
"Content-Type": "text/xml; charset=\"utf-8\""
};
msg.payload = {
"tx": {
"cmd": {
"$": {
"id": [1],
},
"_": "SetQuickSelect"
},
"zone": {
"_": "Main"
},
"value": {
"_": value
}
}
}
return msg;
I plug this into an XML generate node and then that one to an HTTP request node.