webRemote/Housebot WebServer - January Release

HouseBot Plugin Development Discussions.
kilowatt
Senior Member
Posts: 152
Joined: Thu Jan 08, 2004 5:45 pm
Location: Westford, MA

Re: webRemote/Housebot WebServer - January Release

Post by kilowatt »

Mark, !No_Default! can appear as a result of two possibilities...
1- when there is no default state specified on the multi-state button and the webremote has not yet received an update from the server.
or
2 - when there is no default state specified on the multi-state button and the webremote has received a value that does not correspond to state value in the webremote.

Had a refresh happened? Do the indicators make sense? It's also possible that the panel was drawn and then the client crashed and never pulled a value.
Tim,

My buttons don't have a "Default" state only valid states for the property the button is displaying/controlling. The indicators seem correct. They update as the property changes so they are getting updates. The only text displayed is the !No_Default! so this text must be set when the theme loads but is not being reset to the proper button text once the updates start coming in. This seems to be true for all multi_state buttons in all of my themes.

Mark
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: webRemote/Housebot WebServer - January Release

Post by Timoh »

Hi Mark,
Can you send me the xml snippet for multi-state button or a screenshot of the theme editor property for the multi-state button.
AND
A sample value from the property itself.

I need to understand what your states are defined as, and what the actual properties are.

Thanks
Tim
kilowatt
Senior Member
Posts: 152
Joined: Thu Jan 08, 2004 5:45 pm
Location: Westford, MA

Re: webRemote/Housebot WebServer - January Release

Post by kilowatt »

Tim,

The attached Zip has the info you requested. Hope it helps.

Mark
Attachments
HB_Test.zip
A simple test theme displaying the !No_Default! multi_state button issue
(259.11 KiB) Downloaded 1145 times
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: webRemote/Housebot WebServer - January Release

Post by Timoh »

Thanks Mark. Found the issue.
Tim
Steve Horn
HouseBot Guru
Posts: 757
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: webRemote/Housebot WebServer - January Release

Post by Steve Horn »

Timoh wrote:Ahhh... The webserver will not recognize c:\program files\........ etc

I believe the HB recommened way is to use %%HB_Themes%%, which I strip out on the server so the browser gets the right path to the image. Since I suspect many folks are using the entire path, I will add in to some processing that make the path property value web server/browser friendly.

Tim
I changed the file path of the weather device radar property to use the %%HB_Themes%% syntax but no change: still a gray box. The path is now
%%HB_Themes%%\Common\weather\us_bhm_closeradar_large_usen.jpg
Steve
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: webRemote/Housebot WebServer - January Release

Post by Timoh »

The grey box is actually the default image when you select a dynamic image. What it means when it stays a grey box is that it is never receiving an update (PV for the image path) or the update is wrong.

What happens if you just feed "\Common\weather\us_bhm_closeradar_large_usen.jpg" into the browser after your address? i.e. http://127.0.0.1:5025\Common\weather\us_bhm_closeradar_large_usen.jpg". And if you enable directory listing for the webserver and go to 127.0.0.1:5025, you should be able to click through to your image. What is the url?

Tim
Steve Horn
HouseBot Guru
Posts: 757
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: webRemote/Housebot WebServer - January Release

Post by Steve Horn »

Well, this time it worked as it was supposed to. But it takes awhile to fully populate the theme panel. Maybe 15 seconds from clicking refresh to display of the complete panel w/image. This PC - not the HB server - is ancient and lacking memory, so that may be the issue. I need to try it on another PC. What are others experiencing?
(The test you suggested worked as you expected.)
Steve
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: webRemote/Housebot WebServer - January Release

Post by Timoh »

Hi Steve,
A couple of things on slowness & refresh...
There isn't much in the way of optimization for pulling data and updating the page. In other words, I suspect it could be a lot better. I will need to do a bit of research on how best to do it. And also run some javascript performance tools that analyze bottlenecks.
I also found a bug in the javascript that if you did not specify a Refresh= parameter, the page would try and update itself as fast as it could. This could affect the loading of the data as the js remote is always starting at the top of list and trying to work it's way down, while making data requests, while trying to process the incoming data.
And finally, pressing refresh doesn't actually refresh the data on the remote. It will refresh the code for the js webremote, and the webremote in turn will have to make another data refresh call to HB.

If you were running without the Refresh parameter, that could explain why it took so long. The webremote client was simply overloaded.

I wouldn't worry too much about performance. In fact, it could get worst before it gets better. Processing images for transparency could be heavy. Basically you have to load evreything twice... Once as an image, convert it to a HTML5 canvas, and manipulate at the pixel level.

Tim
Steve Horn
HouseBot Guru
Posts: 757
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Re: webRemote/Housebot WebServer - January Release

Post by Steve Horn »

Tim, thanks for the explanation on web page/theme panel speed. I wasn't sure if anyone else had experienced that, though I suspect, and you confirmed, that the web server code had not yet been "tightened up".
(I had specified a refresh parm of 5000.)
In general, while I've done my little bit of "testing" using Firefox, has anyone used another browser (IE, Chrome, Safari,...)? There needs to be input and feedback from other browser communities.
Steve
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: webRemote/Housebot WebServer - January Release

Post by Timoh »

We'll get around to other browser communities.... I'll hunt them down for their feedback.

My focus was to learn how to write a webremote in javascript, without having to worry right away about doing browser checks and writing different code for different browsers. It'll come once we get to something more useable.

Tim
Post Reply