Is it possible to have HB Server open up at startup in the background?
I'd like HB Software Remote to be only application that user sees (but I'm assuming that HB Server needs to run for remote to work?)
Housebot Server startup
-
- Member
- Posts: 53
- Joined: Wed Feb 01, 2006 11:48 pm
- Location: Philly burbs
Maybe you could run HB from a batch file using the START command with the minimize switch. Assuming I understand what you are asking. Maybe somebody else will chime in.
But ultimately I'd like to see HB run as a service with a separate GUI interface. That way, if you have an error that crashes the GUI the service would still be running. I love HB, but I never liked the idea of doing configuration in the interface that is also the server itself. Granted, this isn't mission critical stuff, it's just home automation. But, it would be so much better to seperate the configuration GUI from the actual core server.
But ultimately I'd like to see HB run as a service with a separate GUI interface. That way, if you have an error that crashes the GUI the service would still be running. I love HB, but I never liked the idea of doing configuration in the interface that is also the server itself. Granted, this isn't mission critical stuff, it's just home automation. But, it would be so much better to seperate the configuration GUI from the actual core server.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Put the script below in a batch file called something.bat and put that or a shortcut to it in your startup folder. This will start the server at PC bootup and restart the server if it crashes. Also make sure to disable all windows error reportings. Do that from the "My Computer" properties and go to advanced. You will find it there.
You could also put a shortcut to your SWRemote in the startup folder. It will try to connect to the server and when the server is up, the SWRemote will start. That is how I set it up and it works fine!
Echo off
:Start
Echo Server has Started At: %Date% %Time%
"C:\Program Files\Meedio\Meedio HouseBot\HouseBotServer.exe"
Echo Server has Terminated At: %Date% %Time%
goto Start
You could also put a shortcut to your SWRemote in the startup folder. It will try to connect to the server and when the server is up, the SWRemote will start. That is how I set it up and it works fine!
Echo off
:Start
Echo Server has Started At: %Date% %Time%
"C:\Program Files\Meedio\Meedio HouseBot\HouseBotServer.exe"
Echo Server has Terminated At: %Date% %Time%
goto Start
-
- Member
- Posts: 53
- Joined: Wed Feb 01, 2006 11:48 pm
- Location: Philly burbs
I assume this was in response to my post (although, I didn't intend to hijack this message thread... sorry to the original poster). I'm actually using a batch file to launch HB (per a post from a while back by ScottBot). I also have the batch file making a backup of the HB config file. So, if HB crashes or if you manually close it, the config file gets backed up with the current date and time appended to the file name and then HB starts back up again. It's just a way to have several backup copies to fall back on in case I really screw something up. :)
It's actually a combination of two batch files that I'm using to accomplish this. The first batch file is the main batch file that reloads HB every time it closes (or crashes). This batch calls the other batch file which does the backup of the config file (I found this batch file by doing a google search and made some small modifications). Here's the main batch file (the c:\hbscript directory is a directory where I keep batch files, vbscripts, etc)...
starthb.bat
--------------------
@Echo off
:Start
c:
cd\hbscript
call datename.bat "C:\Program Files\Meedio\Meedio HouseBot\Config\HBData.mdb"
Echo Server has Started At: %Date% %Time%
start /ABOVENORMAL /WAIT C:\Progra~1\Meedio\Meedio~1\HouseBotServer.exe
Echo Server has Terminated At: %Date% %Time%
goto Start
Here's the batch file that copies the HB config file with the date and time appended...
dataname.bat
--------------------
@Echo OFF
TITLE DateName
REM DateName.CMD
REM takes a filename as %1 and copies it to %1_YYMMDDHHMM
REM
REM -------------------------------------------------------------
IF %1.==. GoTo USAGE
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j
Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k
Echo COPY %1 %1_%YYYYMMDD%%HHMM%
COPY %1 %1_%YYYYMMDD%%HHMM%
GoTo END
:USAGE
Echo Usage: DateName filename
Echo Copies filename to filename_YYYYMMDDHHMM
GoTo END
:END
REM
TITLE Command Prompt
It's actually a combination of two batch files that I'm using to accomplish this. The first batch file is the main batch file that reloads HB every time it closes (or crashes). This batch calls the other batch file which does the backup of the config file (I found this batch file by doing a google search and made some small modifications). Here's the main batch file (the c:\hbscript directory is a directory where I keep batch files, vbscripts, etc)...
starthb.bat
--------------------
@Echo off
:Start
c:
cd\hbscript
call datename.bat "C:\Program Files\Meedio\Meedio HouseBot\Config\HBData.mdb"
Echo Server has Started At: %Date% %Time%
start /ABOVENORMAL /WAIT C:\Progra~1\Meedio\Meedio~1\HouseBotServer.exe
Echo Server has Terminated At: %Date% %Time%
goto Start
Here's the batch file that copies the HB config file with the date and time appended...
dataname.bat
--------------------
@Echo OFF
TITLE DateName
REM DateName.CMD
REM takes a filename as %1 and copies it to %1_YYMMDDHHMM
REM
REM -------------------------------------------------------------
IF %1.==. GoTo USAGE
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET YYYYMMDD=%%l%%k%%j
Set PARSEARG="eol=; tokens=1,2,3* delims=:, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k
Echo COPY %1 %1_%YYYYMMDD%%HHMM%
COPY %1 %1_%YYYYMMDD%%HHMM%
GoTo END
:USAGE
Echo Usage: DateName filename
Echo Copies filename to filename_YYYYMMDDHHMM
GoTo END
:END
REM
TITLE Command Prompt
-
- Member
- Posts: 53
- Joined: Wed Feb 01, 2006 11:48 pm
- Location: Philly burbs