Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

How to send Command to Global Cache iTech IPToIR

If you have a question or need help, this is the place to be.
onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

Hi everyone
if someone please help me with my problem I want to send command to my global cache device through network using EventGhost read somewhere in the forum that i should use python script like this

Code: Select all

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.11.36'
PORT = 4999
s.connect((HOST, PORT)) # the Host in " " works too.
s.send('\x08\x01\x01\x08') # in my case, no LF or CR needed
s.close()
my qustion is how to change this command

Code: Select all

sendir,1:2,2445,40000,1,1,4,5,4,5,8,9,4,5,8,9,8,9
to s.send() format

thanks a lot
onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

Re: How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

no one ??
User avatar
zian
Site Admin
Posts: 569
Joined: Wed Jun 24, 2009 3:54 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by zian »

onecd2000 wrote:no one ??

Ya' might wanna try to give it some time one.
Patience.
eventghost.net
Be there or be square.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: How to send Command to Global Cache iTech IPToIR

Post by krambriw »

If it can be sent as one complete string, maybe you could do like this

Code: Select all

import socket
HOST = '192.168.11.36'
PORT = 4999

try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.settimeout(5.0)
    s.connect((HOST, PORT)) # the Host in " " works too.
    s.sendall("sendir,1:2,2445,40000,1,1,4,5,4,5,8,9,4,5,8,9,8,9")
    rsp = s.recv(4096)
    print rsp
    s.close()

except socket.error, e:
    print e

onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

Re: How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

I well try it thanks a lot :wink: :wink:
onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

Re: How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

I try this scrip

Code: Select all

import socket
HOST = '192.169.2.17'
PORT = 4998

try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.settimeout(5.0)
    s.connect((HOST, PORT)) # the Host in " " works too.
    s.sendall("sendir,1:1,1,38109,1,1,344,171,22,21,22,64,22,64,22,64,22,64,22,64,22,64,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,64,22,1518,343,86,22,3810")
    rsp = s.recv(4096)
    print rsp
    s.close()
    except socket.error, e:
    print e
but it seem no right syntax
Error compiling script.
Traceback (most recent call last):
SyntaxError: invalid syntax (7, line 14)
onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

Re: How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

No it correct the script and it working but the response is error message :

ERR_0:0,016
any one have an idea about this please help me
thanks a lot
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: How to send Command to Global Cache iTech IPToIR

Post by krambriw »

Try this:
http://globalcache.zendesk.com/entries/ ... ion-issues

Try in your script to add +"\r\n" at the end of the string. Something like

Code: Select all

s.sendall("sendir,1:1,1,38109,1,1,344,171,22,21,22,64,22,64,22,64,22,64,22,64,22,64,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,64,22,1518,343,86,22,3810"+"\r\n")
Best regards, Walter
onecd2000
Posts: 6
Joined: Sun May 15, 2011 8:54 am

Re: How to send Command to Global Cache iTech IPToIR

Post by onecd2000 »

Thanks a lot brother it worked best regard :D :D :D
Derbyboy
Posts: 6
Joined: Mon Aug 01, 2011 11:01 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by Derbyboy »

Could you pls post the entirely code that worked for you. I have tried the exakt code below but It wont work. Of course I┬┤ve changed the IP, Port and sendir post.

1. I ran the script in Eventgost as a pyton spript
2. I┬┤ve opened the port, 4998 in my routers firewall

Code: Select all

import socket
HOST = 192.168.0.13
PORT = 4998

try:

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.settimeout(5.0)
    s.connect((HOST, PORT)) # the Host in " " works too.
s.sendall("sendir,1:1,4,38000,11,342,172,22,22,22,64,22,22,22,22,22,64,22,22,22,64,22,64,22,64,22,22,22,64,22,64,22,22,22,64,22,64,22,22,22,22,22,22,22,64,22,22,22,22,22,22,22,22,22,22,22,64,22,64,22,22,22,64,22,64,22,64,22,64,22,64,22,1484,342,85,22,3677"+"\r\n")     rsp = s.recv(4096)
    print rsp
    s.close()
    except socket.error, e:
    print e

I get this:

Error compiling script.
Traceback (most recent call last):
SyntaxError: invalid syntax (7, line 14)

Can someone pls help me to fins whats wrong or just give me some guidance!

Thanks
reta
Posts: 6
Joined: Thu Jan 28, 2010 9:57 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by reta »

Derbyboy wrote:Could you pls post the entirely code that worked for you. I have tried the exakt code below but It wont work. Of course I┬┤ve changed the IP, Port and sendir post.

1. I ran the script in Eventgost as a pyton spript
2. I┬┤ve opened the port, 4998 in my routers firewall

Code: Select all

import socket
HOST = 192.168.0.13
PORT = 4998

try:

    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.settimeout(5.0)
    s.connect((HOST, PORT)) # the Host in " " works too.
s.sendall("sendir,1:1,4,38000,11,342,172,22,22,22,64,22,22,22,22,22,64,22,22,22,64,22,64,22,64,22,22,22,64,22,64,22,22,22,64,22,64,22,22,22,22,22,22,22,64,22,22,22,22,22,22,22,22,22,22,22,64,22,64,22,22,22,64,22,64,22,64,22,64,22,64,22,1484,342,85,22,3677"+"\r\n")     rsp = s.recv(4096)
    print rsp
    s.close()
    except socket.error, e:
    print e

I get this:

Error compiling script.
Traceback (most recent call last):
SyntaxError: invalid syntax (7, line 14)

Can someone pls help me to fins whats wrong or just give me some guidance!

Thanks
Having the exact same problem, any solution?
Kazuya
Posts: 15
Joined: Sat Dec 14, 2013 8:07 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by Kazuya »

krambriw wrote:Try this:
http://globalcache.zendesk.com/entries/ ... ion-issues

Try in your script to add +"\r\n" at the end of the string. Something like

Code: Select all

s.sendall("sendir,1:1,1,38109,1,1,344,171,22,21,22,64,22,64,22,64,22,64,22,64,22,64,22,21,22,64,22,21,22,21,22,21,22,21,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,21,22,64,22,21,22,64,22,21,22,64,22,21,22,64,22,64,22,1518,343,86,22,3810"+"\r\n")
Best regards, Walter

Hi,
I know this is a very old topic, but I can't find any other more appropriate to talk about those Global Cache commands.

This code line above is perfectly working on my GC100-12, thanks for this by the way, but it doesn't work for my iTach WF2IR, the WiFi module of Global Cache.

This is the detailled manual :
http://www.globalcache.com/files/docs/API-iTach.pdf

I tried different ports (4998, 4999, 5000), different module adresses (1:1, 1:2...), nothing seems to go to the iTach.
My web brother connects to the configuration page of the iTach, and eventghost is on the same computer, like the GC100.

I don't understand... :cry:
Help please ! :P
Kazuya
Posts: 15
Joined: Sat Dec 14, 2013 8:07 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by Kazuya »

Some news, the command works well with iTest, the same I use in Eventghost with the same IP adress and the same port...

Why my command doesn't reach my iTack IPtoIR ? :(
Attachments
Screenshot - 08_01_2014 , 20_45_57.png
bruinlax
Posts: 26
Joined: Thu Sep 29, 2011 4:31 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by bruinlax »

I use the attached plugin that works great for me, I got it on this forum i think, "Ebrus" i think wrote it. I modified it to use either Global Cache or Hex and it converts it.

My modifications are hacky, but they worked, so i never cleaned up the code since i never meant for it to go externally.
Attachments
globalcache.rar
(25.56 KiB) Downloaded 404 times
Kazuya
Posts: 15
Joined: Sat Dec 14, 2013 8:07 pm

Re: How to send Command to Global Cache iTech IPToIR

Post by Kazuya »

Ok, thanks a lot, I will try it ! :D
Post Reply