Button Behavior

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

Button Behavior

Post by incoronado »

Buttons seem to completely ignore additional presses for a certain amount of time after initially selected. Is there any way around this? I would like my application to be more responsive to subsequent presses.
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Button Behavior

Post by Steve Horn »

incoronado wrote:... for a certain amount of time...
How long? I have buttons that I use for volume control for example, that seem to respond quite adequately, even when you factor in the HB/USBUIRT/?IR repeater "overhead" lag time.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Button Behavior

Post by Richard Naninck »

Mine are instant.. all of them but become more sluggish after time. A SWRemote restart or reload always fixes that so I automatically do that every morning at 5 AM
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: Button Behavior

Post by Steve Horn »

Richard Naninck wrote:A SWRemote restart or reload always fixes that so I automatically do that every morning at 5 AM
And why is that.. and of course how are you restarting the SWremote? VBscript would be my first... and only guess. Good idea; I need to implement that on one or two of my slower (older) tablets.
Steve
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Button Behavior

Post by Richard Naninck »

This has been discussed on the forum a few times: SWRemote getting slow in time...
Never figured out why since I seemed to be the only one affected OR with a large enough theme that pronounces the effect. I blame it on loads of status display. Since the SWRemote is running 24/7 while being maximized (so visible) I had to take some other measures as well to survive the day. Now I created a Start Panel with only the clock and an enter button as some kind of SWRemote screen saver. I track my mouse coords in HouseBot script and if they remain the same for a set amount of time (5 minutes in my case) the Start Screen is displayed. This way any other screen displaying loads of status is stopped.

The restart is initiated by Task @ 6:15 AM triggering a script command:

Code: Select all

Case "Restart SWRemote":
			Call Execute_Program("Server PC", "Get-Process SWRemote* | Stop-Process", "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe", "Yes")
			Call Execute_Program("Server PC", "/ip localhost /name XGA Remote", "C:\Program Files\Meedio\Meedio HouseBot\Clients\Winx86\SWRemote.exe", "No")
			Call Execute_Program("Server PC", "$SWRemote = Get-Process SWRemote*; $SWRemote.ProcessorAffinity=0x3", "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe", "No")

Code: Select all

'-------------------------------------------------------
'- Execute Program for the PC in Control ---------------
'-------------------------------------------------------
Sub Execute_Program(PCName, Arguments, ProgName, Wait)

	SetPropertyValue "Execute Program " & PCName & ".Arguments", Arguments
	SetPropertyValue "Execute Program " & PCName & ".Path and Name of Program", ProgName
	SetPropertyValue "Execute Program " & PCName & ".Wait for program to complete", Wait
	SetPropertyValue "Execute Program " & PCName & ".Execute Program", "Yes"
End Sub
I recently found out that all programs started by HouseBot get the same single core affinity as HouseBot uses. HB only uses a single core to prevent crashes on tasks that get their timing messed up in a multi core (thread) environment. All is fine that HB runs only on core 1, but the SWRemote must use both cores. In the above code you see how I fixed that problem. I start many other programs through my SWRemote using HB like Outlook, Meedio, webbrowsers etc so this was very important to fix. If Meedio were to run on a single core, also would the codecs it uses and the cpu would spike the single (same core as HB) while watching a movie and thus killing system performance. A bit technical, but hopefully it makes (lots of) sense.

So create an external program device and address it though script. I also had to install Windows PowerShell for this, but that comes in handy in many occasions.
incoronado
Senior Member
Posts: 153
Joined: Fri Mar 19, 2004 12:30 am
Location: San Diego, CA

Re: Button Behavior

Post by incoronado »

I probably should have been more specific. I have a property change button control and I would expect to press the button repeatedly to quickly toggle a panel on and off. I have to wait it about 1.5 seconds before I can press the button again before it will toggle the panel. It does this whether or not the software remote is restarted.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Button Behavior

Post by Richard Naninck »

So a Property Change button controls a script command that toggles between OpenRemotePanel() and CloseRemotePanel()?
If so, maybe panel animation takes up some time or you have something in the Enter List of the pop panel.
The Property Change buttons and also Panel Change buttons I use to open panels, work instantly. I don't have toggles setup but jumping between to of the same contexted pop panels also appears to be instant.
Maybe there is some property on you pop panel that doesn't exist anymore. Try to set the Enable Trace option in the Configuration menu of the SWRemote and have a look at the trace when you toggle the panel. Maybe something will show up. The trace log file is stored in the same directory as the SWRemote.
Post Reply