Page 1 of 5

HouseBot Web Server

Posted: Sun Jan 23, 2011 4:52 pm
by Timoh
Hi folks,
Here is the HouseBot Web Server plugin. This is a "stepping stone" plugin to developping a browser based HB client. As such, the *only* thing this plugin does, is act as a web server. I will say it again... The *only* thing this plugin does, is act as web server. There is *no* client functionality embedded yet.

I have tested this web server with the HB external control and CGI interface. It works.

You need to do a few things to get this plugin working...
Download the zip file...
1) Copy the dll to Housebot plugins/devices directory.
2) Copy the help file (.chm) to the Housebot help directory.
3) Create an empty password text file in the Housebot Config directory OR copy the empty one provided.
4) Restart Housebot.
5) Add a device, you should see the HB Web Server.
6) Set the "Server Running" property to yes.
7) Enter a password & username. You *must* do this! And the server must be *running*!

If you now point your browser to the your IP and specified port (5025) you should get a password prompt and then a directory listing.

Most errors are logged in the device log. The exception to this, are errors where the web server won't start. Those are logged in the file only. The Access Log property will show you every web page/resource accessed.

If you are having trouble, double check the IP Access Control list. The default is to deny the internet/every IP, then add in 192.168 networks (typically home network addressing) and the local PC/loopback (127.0.0.1).

All of the properties are described in the help.

As always with software, folks might use it in ways un-imaginable, and "break-ages" could occur. If that is the case, please drop me note. On the flipside, if you want to do nothing with the webserver and wait for the fully functioning client release, that's ok too.

My main goal of releasing this plugin in advance of the fully functioning client, is to try and discover/correct as many issues as possible, as early on as possible.

(Edit: Deleted file as it was not the current release)
Thanks
Tim

Re: HouseBot Web Server

Posted: Mon Jan 24, 2011 3:46 am
by jacco van der Ven
Hi Timoh,

I have tested the webserver and it looks good, for now it is working well.


Jacco.

Housebot working on WindowsHomeServer.

Re: HouseBot Web Server

Posted: Mon Jan 24, 2011 9:50 am
by Timoh
Thanks Jacco! You're the first.
It's good to know what I wrote works on at least one other persons computer. ;)
Tim

Re: HouseBot Web Server

Posted: Tue Jan 25, 2011 2:39 pm
by chrisrey
Hi Timoh,

I did the installation, but I have this error message: Unable to load Device DLL Module [C:\Program Files\HouseBot\Plugins\Devices\hbWebServer.dll]. Error = [Le module spécifié est introuvable. ]

I follow all the steps.

Running XP, any idea?

Re: HouseBot Web Server

Posted: Tue Jan 25, 2011 3:15 pm
by kilowatt
I also tried to install the web server and I get the same error as chrisrey.

Unable to load Device DLL Module [C:\Program Files\HouseBot\Plugins\Devices\hbWebServer.dll]. Error = [The specific module could not be found. ]

I'm also running XP Home SP3. It looks like maybe the dll file is corrupt. If I look at the file properties I don't see the version tab I see when I look at the properies for all the other HB Device dll file properties. Do we need to register the DLL?

Mark

Edit: Maybe not corrupt. The NullDevice.dll has no version tab either.

Re: HouseBot Web Server

Posted: Thu Jan 27, 2011 1:28 am
by peter
Hi Tim,
I had some trouble to get it started either. I could make the webdevice. Trying to set a username and password in the device's property sheet housebot chrashes even with the original database file used.
Afterwards I modified the database manually (Office's Access) setting the username and password. Now it works so far.

Running win7


update:
I'played a little with it and found changing the username with your web server running it crashes under certain circuumstances. Here is the passwordfile it made, the a1-user seems to be corrupted:
a:HouseBot:9271b5b8f50e10d8bb11535ba6fc67e2
a1:°c c@À¨Ð
a2:HouseBot:77788807720dc1b02270c310dbae1533

Nevertheless, great work
I'm looking forward to see the next steps

So long
peter

Re: HouseBot Web Server

Posted: Thu Jan 27, 2011 5:00 pm
by Timoh
Hi Scott,
Any thoughts on where to check when HB can't load the dll? If it was happening consistently, I could probably track it down, but I figured I'd try and get you input first. HB seems to know something (dll?) is there, but can't actually find the handle or hook or module?

Chrisrey & Kilowatt, maybe check to make sure nothing is blocking the dll. It could be some AV or other security software that might think the dll you added is malicious, and won't let HB access it. if you can try turning off you AV, adding in the dll and restarting you AV & Housebot.

Tim

Re: HouseBot Web Server

Posted: Thu Jan 27, 2011 7:21 pm
by ScottBot
It's probably another DLL that your DLL is dependent on that is not on their system. Older OS's don't always have everything you need.

The way I usually find the missing DLLs is to run dependency walker (http://www.dependencywalker.com/). You can just open the DLL in DW and look through the huge list of DLLS that get loaded. Missing DLLs are shown in red (I think).

Re: HouseBot Web Server

Posted: Thu Jan 27, 2011 8:21 pm
by PT
Hi Tim
For your information
I have had the same issues as Chrisrey & Kilowatt.
I have tried the program Scott mentioned and it highlights the followings 3 Dlls
MSJAVA
MSVCP100
MSVCR100

Update

Ok the last 2 Dlls are available in
Microsoft Visual C++ 2010 Redistributable Package (x86)
MSJAVA I took form a local xp machine

Have been able to load sever ok
Put password and username in ok when I click server running to yes it crashes housebot

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 1:03 am
by jacco van der Ven
Well, I have the webserver now running for a few days and it is still running fine, I don't have any problems with dll's or password.
Housebot is running on WindowsHomeServer

To let you kow.

Jacco

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 8:42 am
by Timoh
The VC++ redistributables make sense. I guess since I am using the latest & greatest MS Visual C++ & MS SDK, it wants those dlls. I will check to see if there is a way to tell the compiler to user older/backwards compatible dlls. I don't think I'm using any latest & greatest features of windows, + I don't want to get into a situation where folks have to copy 4 dlls around.

The MSJAVA one makes no sense to me what so ever. There are no java calls in the code. I'll dig around on that one.

I had a feeling setting the pwd was going to be the weakest link. HB Web Server will crash/not start if there is not global passwords file set and/or the file is missing. Also the server must be *running* in order to set the user & password. It will update in realtime, with no re-starting the webserver. If you check in the HB logs folder you should find a hbWebServer_error.txt file. It may indicate why the server is not starting.

I'm working on the webserver returning the theme xml data to the browser. Once that is done, I will cycle back and look at the dll issue. I have another older machine I can install HB on, so I maybe able reproduce the dll issue and correct it.

Thanks for the support!
tim

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 12:05 pm
by kilowatt
I haven't yet attempted to add the dlls to make the web server work on my machine. I'll leave my machine alone so I can verify your next release will work without mods. No rush here just thought I might be able to help with testing. I'll be very happy when I can run the swremote on my droid. Thanks for the effort.

Mark

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 2:04 pm
by Timoh
At a quick glance, it looks like I have two solutions.

Either build the device with an installer that would install the requuired dlls. You would see the device in the add/remove programs.
Or
Include the libraries (dlls) in the device dll. I'm really curious as to what this would give as dll size!

More to come.
Tim

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 5:24 pm
by ScottBot
I build everything with msvc 2008 and have to include several required dlls with the setup (e.g. msvcrt.dll, msvcp90.dll). You are probably building with a newer compiler so it's pulling in the latest DLLs.

Re: HouseBot Web Server

Posted: Fri Jan 28, 2011 7:06 pm
by PT
Tim
Ok I have been playing and now the login page with User name and Password
is available from local and network machine.
However when both name and password are entered returned the page just returns as before after 3 tries it will go to a blank page
Any thoughts