Page 2 of 2

Re: webRemote/Housebot WebServer - January Release

Posted: Wed Jan 18, 2012 12:18 pm
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

Re: webRemote/Housebot WebServer - January Release

Posted: Wed Jan 18, 2012 12:56 pm
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

Re: webRemote/Housebot WebServer - January Release

Posted: Wed Jan 18, 2012 2:51 pm
by kilowatt
Tim,

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

Mark

Re: webRemote/Housebot WebServer - January Release

Posted: Wed Jan 18, 2012 4:54 pm
by Timoh
Thanks Mark. Found the issue.
Tim

Re: webRemote/Housebot WebServer - January Release

Posted: Wed Jan 18, 2012 8:47 pm
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

Re: webRemote/Housebot WebServer - January Release

Posted: Thu Jan 19, 2012 9:18 am
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

Re: webRemote/Housebot WebServer - January Release

Posted: Thu Jan 19, 2012 9:56 am
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.)

Re: webRemote/Housebot WebServer - January Release

Posted: Thu Jan 19, 2012 1:39 pm
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

Re: webRemote/Housebot WebServer - January Release

Posted: Thu Jan 19, 2012 4:50 pm
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.

Re: webRemote/Housebot WebServer - January Release

Posted: Fri Jan 20, 2012 12:20 pm
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