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.
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
Re: How to send Command to Global Cache iTech IPToIR
What was the problem by the way ?
The iTach IP2IR needs a delay to get the command ?
The iTach IP2IR needs a delay to get the command ?
-
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
No, no
I added the error control only to debug, this script without that error control could work
I added the error control only to debug, this script without that error control could work
Code: Select all
import socket
from time import sleep
import sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.1.20'
PORT = 4998
sock.connect((HOST, PORT))
sock.settimeout(2)
sock.sendall("get_NET,0:1"+"\r")
msg = sock.recv(4096)
print msg
sock.close()
del sock
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: How to send Command to Global Cache iTech IPToIR
I understood the error control was to debug, but not where was the correction !
Now I see !
I get this answer :
get this log :
Perfect job, thanks !
Now I see !
I get this answer :
And the script with the IR command to power On my preamp :Python Script
NET,0:1,UNLOCKED,STATIC,192.168.1.20,255.255.255.0,192.168.1.1
Code: Select all
import socket
from time import sleep
import sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
HOST = '192.168.1.20'
PORT = 4998
sock.connect((HOST, PORT))
sock.settimeout(2)
sock.sendall("sendir,1:1,1,38000,2,1,338,169,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,20,20,20,20,20,20,20,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,63,20,63,20,63,20,63,20,63,20,63,20,63,20,20,20,20,20,1686,338,84,20,3622"+"\r")
msg = sock.recv(4096)
print msg
sock.close()
del sockJust to try it with my preamp and it works !!!Python Script
completeir,1:1,1
Perfect job, thanks !
Re: How to send Command to Global Cache iTech IPToIR
EventGhost is a wonderful application ! So many possibilities 
-
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
Excellent!
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
m19brandon
- Experienced User
- Posts: 177
- Joined: Mon Feb 03, 2014 10:36 pm
Re: How to send Command to Global Cache iTech IPToIR
These posts are great, I will be getting my Global Cache iTech IPToIR tomorrow and plan to have a busy weekend. Thanks for all the sample code.
-
m19brandon
- Experienced User
- Posts: 177
- Joined: Mon Feb 03, 2014 10:36 pm
Re: How to send Command to Global Cache iTech IPToIR
Just got my Global Cache iTech Ip2ir over the weekend and I am in love. Music starts automatically playing when I get home after two hours of beening a away.
I am having some issues on the EventGhost side of things with Marcos and was hoping to get insights. How are you executing larger sets of commands? I have created Macros for event command with a python scripts and then trigger events to call each one from other Macros (such as Watch DVD, Power On, Power Off, Listen to Music). Somethings with triggered event the order may not execute correctly, so I have changed to using to Jumps with return enabled. However, Jumps seem to add a half a second to each command. I was thinking of adding my commands to a list and then at the end I would execute all of them at the end. Any thoughts? My goal is speed.
I have some long commands like setting the volume to a music listening level (50 Volume Downs then 25 Volume Ups through the repeat option is the sendall function).
I am having some issues on the EventGhost side of things with Marcos and was hoping to get insights. How are you executing larger sets of commands? I have created Macros for event command with a python scripts and then trigger events to call each one from other Macros (such as Watch DVD, Power On, Power Off, Listen to Music). Somethings with triggered event the order may not execute correctly, so I have changed to using to Jumps with return enabled. However, Jumps seem to add a half a second to each command. I was thinking of adding my commands to a list and then at the end I would execute all of them at the end. Any thoughts? My goal is speed.
I have some long commands like setting the volume to a music listening level (50 Volume Downs then 25 Volume Ups through the repeat option is the sendall function).
-
barnabas1969
- Experienced User
- Posts: 133
- Joined: Sat Feb 04, 2012 1:42 am
Re: How to send Command to Global Cache iTech IPToIR
Wow, I didn't know that a device exists like the IP2IR device. I wish it had more than 3 ports, and I wish that all of the ports could handle a blaster (only port 3 can, according to their documentation).
But, this may be what I want! For years, I've had my Media Center PC setup so that the extender users have allowed logon hours. I also have a scheduled task that kills the extender sessions. However, my extenders stay turned on... and therefore the TV's in the kids' bedrooms also stay on. I've wanted a way to turn the extender off, and this is just the thing.
The kids bedrooms (3 bedrooms for the kids) all have TV's that will turn off if the video input is inactive for a certain period of time. To make this work, the extender needs to turn off. The extenders all have discreet on and off commands, so I could use this device. Of course, I would need to run wires to each bedroom.
I would prefer to turn the TV's off too, but they don't have discreet on and off commands. If I bought two of these devices, I could connect the three ports on one device to the USB power outlets on the TV's, and use that to detect if the TV is already turned on.
But, this may be what I want! For years, I've had my Media Center PC setup so that the extender users have allowed logon hours. I also have a scheduled task that kills the extender sessions. However, my extenders stay turned on... and therefore the TV's in the kids' bedrooms also stay on. I've wanted a way to turn the extender off, and this is just the thing.
The kids bedrooms (3 bedrooms for the kids) all have TV's that will turn off if the video input is inactive for a certain period of time. To make this work, the extender needs to turn off. The extenders all have discreet on and off commands, so I could use this device. Of course, I would need to run wires to each bedroom.
I would prefer to turn the TV's off too, but they don't have discreet on and off commands. If I bought two of these devices, I could connect the three ports on one device to the USB power outlets on the TV's, and use that to detect if the TV is already turned on.
-
hanspettersson
- Posts: 42
- Joined: Sat Feb 20, 2010 2:42 pm
Re: How to send Command to Global Cache iTech IPToIR
A plugin for this should be awesomeKazuya wrote:I understood the error control was to debug, but not where was the correction !![]()
Now I see !![]()
I get this answer :
And the script with the IR command to power On my preamp :Python Script
NET,0:1,UNLOCKED,STATIC,192.168.1.20,255.255.255.0,192.168.1.1
get this log :Code: Select all
import socket from time import sleep import sys sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) HOST = '192.168.1.20' PORT = 4998 sock.connect((HOST, PORT)) sock.settimeout(2) sock.sendall("sendir,1:1,1,38000,2,1,338,169,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,20,20,20,20,20,20,20,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,63,20,63,20,63,20,63,20,63,20,63,20,63,20,20,20,20,20,1686,338,84,20,3622"+"\r") msg = sock.recv(4096) print msg sock.close() del sock
Just to try it with my preamp and it works !!!Python Script
completeir,1:1,1
Perfect job, thanks !
-
barnabas1969
- Experienced User
- Posts: 133
- Joined: Sat Feb 04, 2012 1:42 am
Re: How to send Command to Global Cache iTech IPToIR
I agree, and it shouldn't be difficult to write it either. I just bought an iTach IP2IR device on e-bay for $64 plus shipping. I should have it later this week.hanspettersson wrote:A plugin for this should be awesome
I'll be looking to buy another one (or possibly two, depending on how well the emitters work on non-blaster ports, or if the emitter ports can be modified to send enough current for a blaster), because I want 6 ports, and the iTach devices are field upgradable, and the GC-100-12 devices are not.
Here's what I want to do with them:
I have three kids' bedrooms, and I want to have one sensor input, and one IR emitter/blaster for each kids' room. Each kid has a TV in their bedroom. Each TV is connected to an XBox360, which serves as an extender for Windows Media Center. The Media Center eXtenders (MCX) log on to Windows as a user (MCX1, MCX2, MCX3). I have configured those user accounts so that the allowed logon hours match the kids' bedtimes. However, if the extender is already logged in before the end the hours they are allowed to logon, Windows does not disconnect it. I have a scheduled task in Windows that will force the user to logoff, and this works to prevent TV watching after bedtime. However, the extender keeps trying to reconnect for an hour after the session is disconnected. Then, once the extender finally turns off, it takes another hour for the TV to turn off due to no video input. None of these TV's have network or RS-232 control.
So, to avoid the two-hour period where the TV is using power while the kid should be sleeping....
At bedtime, I want to use a sensor input to detect if the TV is on (each TV has a USB port which is only powered when the TV is on, so this can be used as input by the IP2IR). If the TV is on, I want to send an IR command to the extender and to the TV to turn them off. The extenders have a discrete power-off IR command, so I could send power-off to the extender without checking the status of the TV. However, the TV's only have a power toggle IR command... so I need to check the state of the TV before sending the power toggle command.
Two of my kids leave their TV's turned on when they are not in their rooms, and this results in TV's which are running all day long on the weekends when nobody is in the room. So, it would be ideal if I could also detect room occupancy, and use that information as another sensor input to the IP2IR (or a single sensor input, using a simple circuit to combine the TV-ON state with the occupancy sensor). However, it appears that occupancy sensors require some movement... so if the kid is laying in bed watching TV, the occupancy sensor may not detect it. What I may do, is setup something that sends a message to the Media Center extender session which asks, "Are you still watching?" every 30 minutes. If the kid doesn't respond, or responds "No", then I could then turn off the extender and TV.
When I receive my IP2IR device, I will experiment and report back.
-
m19brandon
- Experienced User
- Posts: 177
- Joined: Mon Feb 03, 2014 10:36 pm
Re: How to send Command to Global Cache iTech IPToIR
Chasing down the IR codes has been fun but I have almost all commands mapped. Just need to work out the long press volume and channels. A plugin would be nice but I find that I have two or three different ways I need commands with Python (one command, a set of commands or repeats).
Re: How to send Command to Global Cache iTech IPToIR
The code works when I plug it into eventghost, but the actual sendir code I need to broadcast has a repeat of 50 and a separation of 20. When I put the repeat count as 50 in my sendir command, python/eventghost returns an error (Err003, 7). When I replace 50 with 1, the command gets sent through. How do I implement repeats on this? Appreciate any help. Thanks!