Denon & Globalcache
Moderator: leecollings
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Denon & Globalcache
Hi Rob, I looked at the squeezy today. Did as you said, I commented out all the other players and put my players in, the test subject is Squeezebox Lounge. I changed the location of script etc however it hasn't worked. I only spent 20 mins on it before work. Not sure if there is a log I can upload..
Is it /Squeezy/squeezy -Squeezebox Lounge -off' or should it be /Squeezy/_squeezy -Squeezebox Lounge -off'
Regards
Simon
Is it /Squeezy/squeezy -Squeezebox Lounge -off' or should it be /Squeezy/_squeezy -Squeezebox Lounge -off'
Regards
Simon
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
My scripts are using:
squeezy -SQ-Bedroom -on
Where -SQ-Bedroom is the SqueezeBox name. To check that squeezy is working navigate to the directory where you extracted it and run the command:
./squeezy
This should show you a list of all your players - make sure in your conf file you have the 2 autodiscover lines uncommmented.
squeezy -SQ-Bedroom -on
Where -SQ-Bedroom is the SqueezeBox name. To check that squeezy is working navigate to the directory where you extracted it and run the command:
./squeezy
This should show you a list of all your players - make sure in your conf file you have the 2 autodiscover lines uncommmented.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Hi,
Not sure if my JSON is working properly:-

Not sure if my JSON is working properly:-

- Iron Man
- Posts: 17
- Joined: Wednesday 05 March 2014 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherland
- Contact:
Re: Denon & Globalcache
I think you did some great work there. I have been looking for a good way to control may Denon from my Raspberry. I already knew of telnet and worked with it on my computer. But when I tried it on my raspberry I failed many time. Until I found this.
I tried it and it worked just perfect. I made al de commands I wanted to be able to send to my Denon. And it all worked fine. I did all this yesterday and today my Denon avr 1912 just got totally crazy.
After sending a couple of commands he just stops reacting, but in a really strange way. I mean I can still turn him on/off with both the remote and the commands. And the source switches go alright most of the time. But the volume can only be changed when he is turning on but not totally ready. And thinks like the settings and source select are just gone. And most of the time the display on my TV also stops working after a little time.
I have now already used the reset function 3 times in a hour I guess.
Can anyone please help me because I actually don’t know what could be the problem.
Many thanks for every input on this.
I tried it and it worked just perfect. I made al de commands I wanted to be able to send to my Denon. And it all worked fine. I did all this yesterday and today my Denon avr 1912 just got totally crazy.
After sending a couple of commands he just stops reacting, but in a really strange way. I mean I can still turn him on/off with both the remote and the commands. And the source switches go alright most of the time. But the volume can only be changed when he is turning on but not totally ready. And thinks like the settings and source select are just gone. And most of the time the display on my TV also stops working after a little time.
I have now already used the reset function 3 times in a hour I guess.
Can anyone please help me because I actually don’t know what could be the problem.
Many thanks for every input on this.
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Simon - I don't get that JSON error. I'm using the Raspberry SD image with little or no changes - I did run the update commands to make sure the Linux was up to date.
The output after the JSON part looks correct - I get a similar line listing all of my Squeezeboxes.
Iron Man - I'm not sure what is going on, I don't send too many commands to my Denon. Some thoughts:
1. Are you sending lots of commands in one script? If so maybe they are happening too quickly, have you tried putting delays in between the commands?
2. Are you using lots of different scripts? I didn't close the connection at the end of my scripts (bad practice by me and I will fix mine), maybe there are too many connections left open to the Denon, try adding this at the end of your scripts:
s.close()
The output after the JSON part looks correct - I get a similar line listing all of my Squeezeboxes.
Iron Man - I'm not sure what is going on, I don't send too many commands to my Denon. Some thoughts:
1. Are you sending lots of commands in one script? If so maybe they are happening too quickly, have you tried putting delays in between the commands?
2. Are you using lots of different scripts? I didn't close the connection at the end of my scripts (bad practice by me and I will fix mine), maybe there are too many connections left open to the Denon, try adding this at the end of your scripts:
s.close()
- Iron Man
- Posts: 17
- Joined: Wednesday 05 March 2014 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherland
- Contact:
Re: Denon & Globalcache
RobDob, I was also thinking on a delay.
At the moment I am using 2 different scripts for one command. One LUA script to notice a button press in my domoticz and this script calls for the second. The second script is a python. Actually it is your script but then whit a different command.
When it got wrong I had two thoughts about the wrong call.
1. a script command is wrong, and my Denon couldn’t work with it.
2. the amount of commands in a short time.
But the first thought was gone after I took the (possible) bad scripts out of the list and still got the error. So I thought about the delay, but didn’t know how to set it. But on second thought I think your theory about the open commands is the problem. Or at least it would explain why I didn’t had those problems yesterday, when I used the same commands under the same conditions.
But I am going to try it with a delay and a closed command. And message back about the result.
Thanks for the fast replay and help.
At the moment I am using 2 different scripts for one command. One LUA script to notice a button press in my domoticz and this script calls for the second. The second script is a python. Actually it is your script but then whit a different command.
When it got wrong I had two thoughts about the wrong call.
1. a script command is wrong, and my Denon couldn’t work with it.
2. the amount of commands in a short time.
But the first thought was gone after I took the (possible) bad scripts out of the list and still got the error. So I thought about the delay, but didn’t know how to set it. But on second thought I think your theory about the open commands is the problem. Or at least it would explain why I didn’t had those problems yesterday, when I used the same commands under the same conditions.
But I am going to try it with a delay and a closed command. And message back about the result.
Thanks for the fast replay and help.

-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Did update and upgrade with the same error.. Couldn't find anything on google either..
- Iron Man
- Posts: 17
- Joined: Wednesday 05 March 2014 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherland
- Contact:
Re: Denon & Globalcache
RobDob I think the problem is solved. I have changed all the codes. I have tried them for a time and my Denon doesn’t complain about it. So I think its oke then. Thanks for script and changes.
/Iron Man
/Iron Man
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Hi Rob,
I think I've found what I need to do to get this working.. I need to install this:- libjson-rpc-perl for Debian
I found the website however cannot find a way to install it via the command line.. Just wondered if you could point me in the right direction as your clever enough to help silly old me.
Regards
Simon
I think I've found what I need to do to get this working.. I need to install this:- libjson-rpc-perl for Debian
I found the website however cannot find a way to install it via the command line.. Just wondered if you could point me in the right direction as your clever enough to help silly old me.
Regards
Simon
-
- Posts: 28
- Joined: Wednesday 29 January 2014 9:59
- Target OS: Windows
- Domoticz version: v2.2563
- Location: Wiltshire, UK
- Contact:
Re: Denon & Globalcache
Try running these 2 commands from the console:
sudo apt-get update
sudo apt-get install libjson-rpc-perl
I've not tried them but the apt command is how I add packages.
sudo apt-get update
sudo apt-get install libjson-rpc-perl
I've not tried them but the apt command is how I add packages.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Haha, I'm sure I tried all of those variations before and I got errors, I copied your suggestion and it worked!
Thank you! Hopefully I will not get the error I was getting above.
Thank you! Hopefully I will not get the error I was getting above.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Denon & Globalcache
Excellent, running the ./squeezy command I now get a list of my devices with no error 
From the command line I have tried to turn on my squeezebox touch in my living room. I typed
squeezy squeezebox lounge -on and I get a bash: squeezy command not found. Have I missed something?
Edit:- I copied the squeezy file to usr/bin and made it executable, the above error has gone however other errors now but still trying
Edit 2:- All working!!! Thank you so much, just need to implement it all

From the command line I have tried to turn on my squeezebox touch in my living room. I typed
squeezy squeezebox lounge -on and I get a bash: squeezy command not found. Have I missed something?
Edit:- I copied the squeezy file to usr/bin and made it executable, the above error has gone however other errors now but still trying

Edit 2:- All working!!! Thank you so much, just need to implement it all

-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Hi Rob,
As I'm not using my itach flex at the mo for IR I thought I'd try something else like using the RS232 option. I was wondering if you knew if your script would work to send RS232 commands - I'm guessing you probably haven't. Just thought I'd ask.
Cheers
Simon
As I'm not using my itach flex at the mo for IR I thought I'd try something else like using the RS232 option. I was wondering if you knew if your script would work to send RS232 commands - I'm guessing you probably haven't. Just thought I'd ask.
Cheers
Simon
-
- 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 not looked into at as I am not using the serial ports on my GC100.
However it should be fairly easy to modify, you just need to look at the API and see what the command is for serial. This part:
sendir,4:2
Refers to the IR, so you would need to know what the command for serial is and also what the module is, e.g. module 4:2 is one of the IR ones - its all in the API.
However it should be fairly easy to modify, you just need to look at the API and see what the command is for serial. This part:
sendir,4:2
Refers to the IR, so you would need to know what the command for serial is and also what the module is, e.g. module 4:2 is one of the IR ones - its all in the API.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Ah, OK Rob, thank you for your reply and sorry it's taken me a while to respond - I hadn't realised you had replied.
I had a quick look at the API and it's a bit complex for me. I'll take another look and let you know how I get on.
Thank you
I had a quick look at the API and it's a bit complex for me. I'll take another look and let you know how I get on.
Thank you

-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
I have looked over the APIs I could find and am at a loss...
http://www.globalcache.com/files/docs/API-Flex_TCP.pdf and http://www.globalcache.com/files/docs/API-Flex_HTTP.pdf
http://www.globalcache.com/files/docs/API-Flex_TCP.pdf and http://www.globalcache.com/files/docs/API-Flex_HTTP.pdf
-
- 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 quick look though the API, I haven't tried any of it but from my reading you have to first setup the serial port and then send the raw data to the device and it will transmit it down the serial cable, so:
Port 4998 for setting up the port:
set_SERIAL,1:1,38400,FLOW_HARDWARE,PARITY_NO
And Port 4999 for sending the data to. Give this script a go and see how far you get - will likely need a little tweaking:
You might need to change your serial connection speed etc... and I'm not sure about the \r at the end of the send lines.
As said I haven't tested it so use at your own risk but hopefully it will get you going.
Port 4998 for setting up the port:
set_SERIAL,1:1,38400,FLOW_HARDWARE,PARITY_NO
And Port 4999 for sending the data to. Give this script a go and see how far you get - will likely need a little tweaking:
Code: Select all
#!/usr/bin/python
#
# Python script to send Serial to GlobalCache
# Rob Dobson - 19/4/2014
#
import socket
# set host and port
HOST = '192.168.1.70'
CONTROLPORT = 4998
SERIALPORT = 4999
# connect to GlobalCache control
c = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
c.connect((HOST, CONTROLPORT))
# Setup serial connection
c.sendall("set_SERIAL,1:1,38400,FLOW_HARDWARE,PARITY_NO\r")
#This is the echo back from GlobalCache
response = c.recv(24)
print "Response from send():", response
c.close()
# connect to GlobalCache serial port
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, SERIALPORT))
# Send serial
s.sendall("MY_SERIAL_DATA\r")
#This is the echo back from Globalcache
response = s.recv(24)
print "Response from send():", response
s.close()
As said I haven't tested it so use at your own risk but hopefully it will get you going.
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: Denon & Globalcache
Brilliant mate, thank you. I'll give it a go when I receive my serial cable 

- Iron Man
- Posts: 17
- Joined: Wednesday 05 March 2014 21:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherland
- Contact:
Re: Denon & Globalcache
Hallo everybody,
After long work on my Domoticz system I came to the question if it is possible to launch a Denon command written in a Python script from a html page.
A little explanation I have been working on a control panel for my Domoticz system. I am almost done and I thought maybe I can connect my Denon command scripts to the page. For short I press a button on the webpage and by clicking the button it will launch a python script that’s located on the raspberry.
I hope somebody can help me with this.
Kind regards,
Iron Man
After long work on my Domoticz system I came to the question if it is possible to launch a Denon command written in a Python script from a html page.
A little explanation I have been working on a control panel for my Domoticz system. I am almost done and I thought maybe I can connect my Denon command scripts to the page. For short I press a button on the webpage and by clicking the button it will launch a python script that’s located on the raspberry.
I hope somebody can help me with this.
Kind regards,
Iron Man
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Denon & Globalcache
Are you running on a device With PHP support?
What does the python script do? Call an url, that can be done from JavaScript
What does the python script do? Call an url, that can be done from JavaScript
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
Who is online
Users browsing this forum: No registered users and 1 guest