Denon & Globalcache
Moderator: leecollings
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Denon & Globalcache
Hi,
I'm new here and currently looking at Domoticz to replace some other automation software I have.
Sorry if this has been asked before however I can't find the answers by searching. Has anyone managed to integrate Domoticz with the following hardware:
1. Denon AV receivers
2. Globalcache GC-100
Thanks,
Rob
I'm new here and currently looking at Domoticz to replace some other automation software I have.
Sorry if this has been asked before however I can't find the answers by searching. Has anyone managed to integrate Domoticz with the following hardware:
1. Denon AV receivers
2. Globalcache GC-100
Thanks,
Rob
- mongoose
- Posts: 42
- Joined: Friday 22 November 2013 10:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Denon & Globalcache
I have an onkyo receiver and commands work great through Domoticz, Im sure you would be able to do something similar for Denon, maybe something similar as this: http://www.domoticz.com/forum/viewtopic.php?f=17&t=1491
but instead of the onkyo github, try https://github.com/jtangelder/denon-remote or maybe another....
but instead of the onkyo github, try https://github.com/jtangelder/denon-remote or maybe another....
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Thanks - that has pointed me in the right direction and I have found that I can send commands to the Denon via Telnet. Now I just need to workout how to send telnet commands.....
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Hi Rob, did you ever manage to get telnet commands sent from Domoticz?
Cheers
Cheers
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Hi,
No I have not progressed on the Telnet commands yet. The lack of sockets in the Domoticz Lua and the fact I was running on Windows stopped me.
I have just (last night) started moving over to a Raspberry Pi. I will get round to the telnet part at some point however I have given priority to the GlobalCache first as that can control the Denon as well.
Now that I am on Raspberry Pi I can run Python scripts to do what I want, so here is a script that will send an IR signal to a GlobalCache:
This sends a Sky button press on a UK Sky+HD box. All in all that is pretty simple and works well - now I just need to work out how to trigger this in Lua on a scene change.
No I have not progressed on the Telnet commands yet. The lack of sockets in the Domoticz Lua and the fact I was running on Windows stopped me.
I have just (last night) started moving over to a Raspberry Pi. I will get round to the telnet part at some point however I have given priority to the GlobalCache first as that can control the Denon as well.
Now that I am on Raspberry Pi I can run Python scripts to do what I want, so here is a script that will send an IR signal to a GlobalCache:
Code: Select all
#!/usr/bin/python
#
# Python script to send IR to GlobalCache GC-100
# Rob Dobson - 4/3/2014
#
import socket
# set host and port
HOST = '192.168.1.70'
PORT = 4998
# connect to GC-100
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
# Send IR - Sky box - Sky button
s.sendall("sendir,4:2,2,36000,1,1,97,32,16,16,16,16,16,32,16,32,32,16,16,16,16,16,16,16,16,16,32,32,32,16,16,16,16,32,16,16,16,16,32,32,32,16,16,16,16,32,16,16,16,4473,97,32,16,16,16,16,16,32,16,32,32,16,16,16,16,16,16,16,16,16,32,32,32,16,16,16,16,32,16,16,16,16,32,32,32,16,16,16,16,32,16,16,16,32\r")
#This is the echo back from GC-100
response = s.recv(24)
print "Response from send():", response
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Ah very good. I use the SQ Blaster and control that via a script using my Pi. I have a GC iTach Flex however never integrated it as the SQ Blaster is far better. It just sits in the corner and controls everything above it, below it , behind it, in front, well you get the idea. However I wonder if your script would work for my iTach Flex as it would be ideal for another room.
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
I think it should, the devices are from the same manufacturer and the API's look the same (at a quick glance). I think it may have been an iTach script that I started with.
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
I've just had a quick look at using Python for the telnet part as well and the following script will change the Master Volume on the Denon to 50:
So now I have achieved both of what I want to do - next stage is to get it all integrated into my scenes.
Code: Select all
#!/usr/bin/python
#
# Python script to send Telnet commands to Denon Receiver
# Rob Dobson - 4/3/2014
#
import socket
# set host and port
HOST = '192.168.1.108'
PORT = 23
# connect to Denon
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
# Send Command - Denon - Volume to 50
s.sendall("MV50\r")
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Excellent. Will take a gander and see if I can get it to work with my set up [SMILING FACE WITH OPEN MOUTH]
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Do you think your python/telnet script would send a command to a squeezebox device.. Only to turn them off..
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Looks like you wouldn't even need to use Python. Seems someone has already written a Perl script to do it all:
https://github.com/pssc/squeezy
You could just call this from Lua as an OS command.
https://github.com/pssc/squeezy
You could just call this from Lua as an OS command.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Script didn't work for me. I got this:-


-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Its a Python script not a shell script. Try:
python denon.sh
python denon.sh
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Ah, I'm very new to this and that worked just fine haha. Thank you! I'll look into the squeezy thing, I did see that befofe however looked a bit complicated for me.
Hopefully domoticz will know to run the script as python and not bash..
Thanks again Rob.
Hopefully domoticz will know to run the script as python and not bash..
Thanks again Rob.
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
You can force Domoticz to use Python, here is an example of how I call the scripts, its a Lua script called "script_device_LoungeTV.lua", in the directory /home/pi/domoticz/scripts/lua/
My scene has a dummy device in it and when that changes to On the script is triggered.
I would have though that you wouldn't need to explicitly call Python but I prefer to be 100% on these things.
Code: Select all
--
-- When scene changes run GlobalCache script
-- Sending Sky Button press
--
commandArray = {}
if (devicechanged['LoungeTVDummy'] == 'On') then
os.execute('python /autoscripts/gc-sky-skybutton.py')
print('Scene: LoungeTV started')
end
return commandArray
I would have though that you wouldn't need to explicitly call Python but I prefer to be 100% on these things.
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
You should be able to download the SqueezeBox thing and call it via os.execute in the same way I am calling the Python scripts.
Maybe I will have a look at the SqueezeBox thing at some point, I have a couple of them as well.
Maybe I will have a look at the SqueezeBox thing at some point, I have a couple of them as well.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
The squeezebox's are good, shame they were discontinued. I have one in every room.. They do not turn off automatically when they are turned on at the mains. They are powered up via a switch in domoticz, so when they are turned on they receive an off command via domoticz so they go into standby mode. To be honest this is all a bit over my head however I am trying and willing to learn. 

-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
I've had a play around with the SqueezeBox stuff and seem to have it working. Try the following:
1. Download the stuff I linked to earlier
2. Extract to a directory on the Pi
3. Configure the squeezy.conf file - I let it auto discovery the server and devices and also commented out all of the other devices
4. Create a Dummy Device in the switches part of Domoticz
5. Create a LUA script that triggers off the dummy device, below is an example of the script I used
The key part is the name of the SqueezeBoxes in the os.execute line, it must match what they are called in the server. Mine is called "SQ-Lounge".
I now have Domoticz turning the SqueezeBox on and off.
1. Download the stuff I linked to earlier
2. Extract to a directory on the Pi
3. Configure the squeezy.conf file - I let it auto discovery the server and devices and also commented out all of the other devices
4. Create a Dummy Device in the switches part of Domoticz
5. Create a LUA script that triggers off the dummy device, below is an example of the script I used
Code: Select all
--
-- Turn the Lounge Squeezebox Off
--
commandArray = {}
if (devicechanged['SqueezeBoxLounge'] == 'Off') then
os.execute('perl /autoscripts/Squeezy/squeezy -SQ-Lounge -off')
print('SqueezeBoxLounge Off')
end
return commandArray
I now have Domoticz turning the SqueezeBox on and off.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Ah excellent. I will attempt this when I get 5 mins. I am working the next 4 days. Hopefully Sunday!!
Thank you!

Thank you!
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Denon & Globalcache
Hi Rob,
Been trying to get the python script to run when a switch is switched with no luck. I see your path in both examples is /autoscripts/ have you created a folder someone called autoscripts? What would be the path to the default scripts fodder created by domoticz on a Raspberry Pi?
Thank you
Edit:- its working!!! For anyone else reading this its... home/pi/domoticz/scripts/
Been trying to get the python script to run when a switch is switched with no luck. I see your path in both examples is /autoscripts/ have you created a folder someone called autoscripts? What would be the path to the default scripts fodder created by domoticz on a Raspberry Pi?
Thank you
Edit:- its working!!! For anyone else reading this its... home/pi/domoticz/scripts/
Who is online
Users browsing this forum: No registered users and 1 guest