Denon Heos speakers working with domoticz
Moderator: leecollings
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Denon Heos speakers working with domoticz
Hi,
I’ve managed to get Denon HEOS speaker to work with domoticz. I’am no coder so the way I did it is not nice but It works and I hope that coder will pick this up and get it right.
The Heos speakers have their own Telnet network which communicates on port 1255. The shellscript are giving commands en closes with a telnet cmd. For now a took just a few commands. I will post the API document for more commands.
Putty
• Install/Open putty
• Fill at Host the Heos device IP and set port to 1255
• Give following command in cmd screen:
• heos://player/get_players
The response will be like example below. Important is the PID number. You will need it to command the player.
"name": "'player name 1'",
"pid": "player id 1'",
"gid": "group id'",
"model": "'player model 1'",
"version": "'player verison 1'"
Shellscripts
• Download the Denon HEOS scripts.zip and put in in the scripts location on your raspberry.
• Edit the config.conf file
For example:
HOST=192.168.xxx.xxx
PORT=1255
PID= -133XXXXXX
• Edit path at every .sh file to your own location.
Domoticz
• Add a dummy selector switch with button set
• Make multiple sets en give them names like Play, Pause etc. etc.
• Put script after every levelset.
• And your done.
Next steps
• The device response with a json payload so would be great for the future that the button shows which artist and song the device plays.
• Tunein radio stations listed and playable.
• To implent error handling such as connection timeouts, reconnecting etc. And of course, implement all the API commands and events
API documentation: http://www.eurostar-ostrava.cz/files/01 ... OL_V01.pdf
I’ve managed to get Denon HEOS speaker to work with domoticz. I’am no coder so the way I did it is not nice but It works and I hope that coder will pick this up and get it right.
The Heos speakers have their own Telnet network which communicates on port 1255. The shellscript are giving commands en closes with a telnet cmd. For now a took just a few commands. I will post the API document for more commands.
Putty
• Install/Open putty
• Fill at Host the Heos device IP and set port to 1255
• Give following command in cmd screen:
• heos://player/get_players
The response will be like example below. Important is the PID number. You will need it to command the player.
"name": "'player name 1'",
"pid": "player id 1'",
"gid": "group id'",
"model": "'player model 1'",
"version": "'player verison 1'"
Shellscripts
• Download the Denon HEOS scripts.zip and put in in the scripts location on your raspberry.
• Edit the config.conf file
For example:
HOST=192.168.xxx.xxx
PORT=1255
PID= -133XXXXXX
• Edit path at every .sh file to your own location.
Domoticz
• Add a dummy selector switch with button set
• Make multiple sets en give them names like Play, Pause etc. etc.
• Put script after every levelset.
• And your done.
Next steps
• The device response with a json payload so would be great for the future that the button shows which artist and song the device plays.
• Tunein radio stations listed and playable.
• To implent error handling such as connection timeouts, reconnecting etc. And of course, implement all the API commands and events
API documentation: http://www.eurostar-ostrava.cz/files/01 ... OL_V01.pdf
- Attachments
-
- Overzicht switches.jpg (119.85 KiB) Viewed 10174 times
-
- HEOS overzicht.jpg (121.8 KiB) Viewed 10175 times
-
- Denon HEOS scripts.zip
- Shellscript to communicate with the devices
- (1.18 KiB) Downloaded 515 times
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Very nice, coincidentally I was doing the exact same thing last week, I even compiled some code instead of a bash script to create a socket connection.
I started looking into the Domoticz code and I think adding the code for communication with Heos isn’t that hard. But adding it to the control panel would be to time-consuming for me at the moment.
I started looking into the Domoticz code and I think adding the code for communication with Heos isn’t that hard. But adding it to the control panel would be to time-consuming for me at the moment.
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Re: Denon Heos speakers working with domoticz
Great to hear that other People are working on it. Are you willing to share your code?
Verzonden vanaf mijn iPhone met behulp van Tapatalk
Verzonden vanaf mijn iPhone met behulp van Tapatalk
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Sure all my Domoticz related work I am willing to share.
Everything I have sofar is this:
https://github.com/Sneezydevil/DomoticzHeos/
Don't expect it to be finished real soon though.
Everything I have sofar is this:
https://github.com/Sneezydevil/DomoticzHeos/
Don't expect it to be finished real soon though.
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
A little update on my part, I now forked the Domoticz repository and added my previous work. Tonight I will try compiling, if that works like expected maybe we can see if it can be added to Domoticz. Will have to see how gizmocuz thinks about it, its alot like the Logitech Media Server that is already there.
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Re: Denon Heos speakers working with domoticz
Great work, can't wait.
Verzonden vanaf mijn iPhone met behulp van Tapatalk
Verzonden vanaf mijn iPhone met behulp van Tapatalk
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
I got some stuff working now, can't control them yet though.
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Re: Denon Heos speakers working with domoticz
I'am giggling over here like a little girl
Verzonden vanaf mijn iPhone met behulp van Tapatalk
Verzonden vanaf mijn iPhone met behulp van Tapatalk
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
In the latest version you can use urls to start / stop / pause the players.
Next up:
Working remote button.
Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=heosmediacommand&idx=1&action=play
Working remote button.
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Good news last night gizmocuz merged my HEOS work into the master branch. I have some improvements and a remote lined up, but I still need to do a bit more testing on them.
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Re: Denon Heos speakers working with domoticz
Great work Sneezydevil! Can't wait
Verzonden vanaf mijn iPhone met behulp van Tapatalk
Verzonden vanaf mijn iPhone met behulp van Tapatalk
-
- Posts: 69
- Joined: Tuesday 15 April 2014 17:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Vaassen
- Contact:
Re: Denon Heos speakers working with domoticz
Hey Sneezydevil, can you give a little update? So happy with this functionality. Thanks!
Verzonden vanaf mijn iPhone met behulp van Tapatalk
Verzonden vanaf mijn iPhone met behulp van Tapatalk
-
- Posts: 111
- Joined: Monday 18 January 2016 9:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Been very busy in my new house, so didn't have alot of time to tinker around with this.
Hope to have some more time soon, with the upcoming dark / cold evenings its likely .
Hope to have some more time soon, with the upcoming dark / cold evenings its likely .
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Hy,
Nice to see someone working on this! Can't wait to see the progress!
Soul
Nice to see someone working on this! Can't wait to see the progress!
Soul
-
- Posts: 22
- Joined: Friday 28 August 2015 21:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Hi,
Mabye this is interesting for some users that want to control there HEOS speakers via Domoticz. In my configuration my HEOS speaker isn't working via Domoticz (only start, stop and pause buttons are working OK). The other buttons (for example Favorites button) result in a "2017-04-30 12:01:37.623 Error: HEOS by DENON: Command: 'Favorites'. Unknown command" error.
I used the scripts from steven84 and made some changes.
Here is the layout of my screen :
For every button I made a dummy switch/push on button with the following "on" commands :
script:///home/pi/domoticz/scripts/heos/stop.sh
script:///home/pi/domoticz/scripts/heos/play.sh
script:///home/pi/domoticz/scripts/heos/volume_up.sh
script:///home/pi/domoticz/scripts/heos/volume_down.sh
script:///home/pi/domoticz/scripts/heos/radio10.sh
etc.
For example the code of the play script (see the zip file of steven84):
PS: For play, pause, stop, volume up and down you don't need to be logged in.
To be able to select presets via favorites you need to be logged in.
For example the code of the Radio10 script:
The number of the preset (preset=1) corresponds to the first, second, third etc. station in your favorites list.
Much more HEOS commands can be found in the CLI description on the DENON site.
Have fun with it.
JJ
Mabye this is interesting for some users that want to control there HEOS speakers via Domoticz. In my configuration my HEOS speaker isn't working via Domoticz (only start, stop and pause buttons are working OK). The other buttons (for example Favorites button) result in a "2017-04-30 12:01:37.623 Error: HEOS by DENON: Command: 'Favorites'. Unknown command" error.
I used the scripts from steven84 and made some changes.
Here is the layout of my screen :
For every button I made a dummy switch/push on button with the following "on" commands :
script:///home/pi/domoticz/scripts/heos/stop.sh
script:///home/pi/domoticz/scripts/heos/play.sh
script:///home/pi/domoticz/scripts/heos/volume_up.sh
script:///home/pi/domoticz/scripts/heos/volume_down.sh
script:///home/pi/domoticz/scripts/heos/radio10.sh
etc.
For example the code of the play script (see the zip file of steven84):
PS: For play, pause, stop, volume up and down you don't need to be logged in.
Code: Select all
#!/bin/sh
. /home/pi/domoticz/scripts/heos/config.conf
echo "heos://player/set_play_state?pid=$PID&state=play\r" | nc $HOST $PORT
For example the code of the Radio10 script:
Code: Select all
#!/bin/sh
. /home/pi/domoticz/scripts/heos/config.conf
echo "heos://system/sign_in?un=<username HEOS account>&pw=<password HEOS account>\r" | nc $HOST $PORT
sleep 1s
echo "heos://browse/play_preset?pid=$PID&preset=1\r" | nc $HOST $PORT
Much more HEOS commands can be found in the CLI description on the DENON site.
Have fun with it.
JJ
-
- Posts: 2
- Joined: Monday 15 May 2017 20:24
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Can you please give a summary of what commands can be used with these urls?Sneezydevil wrote:In the latest version you can use urls to start / stop / pause the players.
Next up:Code: Select all
http://127.0.0.1:8080/json.htm?type=command¶m=heosmediacommand&idx=1&action=play
Working remote button.
I tried to change volume levels with this, but was unable to get this working.
-
- Posts: 10
- Joined: Wednesday 07 September 2016 21:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.4834
- Location: Netherlands
- Contact:
Re: Denon Heos speakers working with domoticz
I' couldn't get it to work ether. When i bash the script with te command line. it says port number invalid 1255.
Anybody an idear?
Anybody an idear?
-
- Posts: 2
- Joined: Sunday 10 December 2017 12:12
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
Does this also works when the heos is connected via the wifi? Because when i communicate with putty ( set the ip address and port 1255) it let me see a black screen. ( i found out, set your putty on telnet)
-
- Posts: 2
- Joined: Sunday 10 December 2017 12:12
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Denon Heos speakers working with domoticz
I got the same.. nc: port number invalid: 1255
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: Denon Heos speakers working with domoticz
Set the connection to telnet with port 1255
You will get a black screen, but are able to enter commands like heos://player/get_players and get a respons
Greetings McMelloW
Who is online
Users browsing this forum: No registered users and 1 guest