USBUIRT

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

USBUIRT

Post by incoronado »

I have set up HB to receive IR commands using USBUIRT. I have sucessfully learned IR commands, but here's my problem. When HB received the commands it gets 3 or 4 consecutive commands. This executes tasks I have tied to the IR command multiple times. Does anyone have any idea on how to do this?
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

Post by PT »

incoronado

Hi
Can you confirm that you actually learnt the code 3 or times or is it that it is sending it three or four times . If it is sending it try changing the repeat count in the following.
hardware interface/usb uirt/more config/
Regards

PT

If it isn't broke,fix it till it is!
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

I'm not tring to send a command at all. I'm a little confused. Would the repeat count apply to learned commands? I'm trying to excute a task once HB has received an IR command. I thought the repeat count only refers to sending. When it learns will it learn multiple commands, or just one. How do I know how many repeated commands are in the single learned command? I guess I don't quite understand the distinction between the two options.

I have tried different numbers in the repeat command, but it doesn't seem to have any effect on the repeating problem.

It's seems to be more related to the task detecting consecutive commands.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

I accept defeat, but I still think it's broke. I still have no resolution on this problem. The IR device gets 3 to 4 consecutive commands no matter how I learn the command or what the repeat command is set for. In fact, it doesn't appear to affect the receive side of things. The plugin on the receive side does not take repeat commands into consideration. Apparently, my remote is repeating the command.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Never accept defeat. I have had this same issue and fixed it using a timer and an additional task.
I don't have the time now, but will write you a solution this evening.
Some remotes just send repeated IR commands (they are the same). This triggers your receiver as many times. You could stop it by just touching the remote button very shrtly, but that should not be the way to go.
I have set up a timer that starts upon receiving the first code. You can see where I am going with this, but I need to study my own stuff a bit to get it right in this posting.

EDIT:

OK, HB Version 2 contained a bug in the "IR Receiver" -> "IR Code Number Received" -> Allow Same Value. Disabling the checkbutton didn't do anything. When HB was regained by Scott, I believe this "Allow Same Value" would work. Disable it and the IR Receivers "IR Code Number Received" will only receive one of the same values. This fixes your problem partly because now you can only receive one of the same codes at a time and cannot repeat the same code. Therefore a task and a timer must be set up.
Add a line to your executed task which starts a timer (7 seconds in my case) when your problematic code is received. The timer starts the count down and after 7 seconds the Running value becomes "No" again. This triggers an extra task that sets the IR Receivers "IR Code Number Received" to 0. This 0 is another code then the problem code and now you are set up to receive the problem code again because the "Allow Same Value" Flag is reset.
Hope you get all this. Obviously you can set the timer to less than 7 seconds. I have 4 problem codes and I use those codes to start certain scripts. Because I use these codes to start scripts, I don't have a need for this code to repeat within 7 seconds.

Before the "Allow Same Value" bug was fixed, I used a NULL device to mirror my Receive IR Codes and triggered tasks on this NULL device because this NULL device's "Allow Same Value" Flag would work.

I came to that solution while discussing this problem with ScottBot in july 2005. Having the bug fixed, made my setup somewhat simpler.

Good luck..... If you still have questions or suggestions, please let me know.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

Clever and elegant solution. I can really use any remote code that I'm not using. I just picked one. I have a URC remote and I can program it to do about anythingbut so far, I have not found a code that it doesn't send multiple times.

On another note, I noticed a ver minor bug/diffrence with 3.0 where if I load up the timer with 0 the timer gets and error. It never did that with 2.X. I just load the timer with whatever is in a slider control and that value can be Zero. It is easy for me to get around by checking for zero in my script before loading the timer. I'm just pointing it out.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Funny. I reported that as somekind of buggy. I got a timer that went crooket while loading HB. It went from 10 seconds to 0 while the repeat was set to Yes. While trying to run a repeated timer set to zero, you would get a continuous on and off situation. Therefore timers cannot be set to 0 anymore and Run at the same time.

Why would you set it to zero anyways?
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

incoronado wrote:I just load the timer with whatever is in a slider control and that value can be Zero.
How do you load a slider value into a timer?
I need that functionality as well, but didn't know howto address it since a timer needs something like Seconds=1 and a slider only produces a number. Therefore I hooked up my slider to a NULL Device property "Pictures.Seconds" and when the slider changes, a task triggers a script command and the script reads the NULL Device property "Seconds" and puts the value into the timer like this:

SetPropertyValue "Pictures Timer.Sleep Time", "Seconds=" & GetPropertyValue("Pictures.Seconds")

If you know of another way to do this, please let me know.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Post by incoronado »

This is the method I use. It looks like I handle this the same way you do.

SetpropertyValue "Sprinkler Zone Timer.Sleep Time", "Days=0, Hours=00, Minutes=" & GetPropertyValue("Sprinklers.Sprinklers Zone 1 Time") & ", Seconds=00, MilliSeconds=0"

Sprinklers.Sprinklers Zone 1 Time is numeric value (0 - 15)

This is pretty easy for me to get around.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Looks exactly the same.
Just got an idea and created a time property and hooked it up to the theme slider, but that didn't work also since a time property shows 00:00 and a slider only produces a single number.

In your case I can understand the problem. Zero minutes seems logical. You just need at least one second or so. So if you hardcode Seconds to 01, you can leave the rest as is. Probably did that already.
Post Reply