Page 4 of 4

Re: Telnet Type Data to Domoticz Help

Posted: Monday 04 April 2016 22:24
by NickHead
I have been thinking of this one.

If this was my system, I would use Realterm, a communications terminal, to connect to the Amp
on the IP and port itself, using the Telnet section of the program.

Run the program and see if it is actually connecting, or has a channel/socket to each other.

I know it says connecting to Denon, it could have said anything and not necessarily doing anything in
particular. Don't forget, this is run on my system and I have more knowledge of this than yours.

If you see PW? sent, then you should expect the return Ascii back. This happens here, and when I put it
in a loop, it works every time, and switches the switch accordingly.

So , to check to see if my handy work is actually doing anything, I think this is the way we should proceed
to iron out bugs and glitches before we go any further.

Re: Telnet Type Data to Domoticz Help

Posted: Monday 04 April 2016 22:56
by simon_rb
Hi,

I have just tried to download RealTerm but it won't run on my computer. I only have a Mac and Windows 10. :(

Re: Telnet Type Data to Domoticz Help

Posted: Monday 04 April 2016 22:58
by simon_rb
Does this help... This is how I connect to the amp to set quick mode/setting.

Code: Select all

#!/usr/bin/python

# Python script to send Telnet commands to Denon Receiver


import socket

# set host and port
HOST = '192.168.1.12'
PORT = 23

#import time
#time.sleep(1)

# connect to Denon
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))

# Send Command - Denon - quick set 2
s.sendall("MSQUICK2\r")

Re: Telnet Type Data to Domoticz Help

Posted: Tuesday 05 April 2016 0:10
by simon_rb
Found a computer that has XP on it but its very slow. Managed to install realterm but I can't figure out how to use it. I managed to connect to Denon I think on 192.168.1.12:23 and it says connected. When I run the script I get this instead:-

Code: Select all

pi@raspberrypi ~ $ python /home/pi/domoticz/scripts/Denon_Airplay_Check.py
          Socket successfully created
Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/Denon_Airplay_Check.py", line 44, in <module>
    s.connect((denon_host,denon_port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
pi@raspberrypi ~ $ 

Re: Telnet Type Data to Domoticz Help

Posted: Thursday 28 April 2016 2:06
by trixwood