Dynamic image not updating on PPC

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Dynamic image not updating on PPC

Post by roussell »

I have a script that generates a png image when executed. I added to HB a script device to execute this script and added a path/file property in the script device to specify the location of the created image. I allowed same value changes on this property. I added an image control in my swremote theme, made it dynamic and pointed it to the image property in the script device above.

The device I'm using is the Cingular/ATT 8525 running Windows Mobile 5. To test; I start the swremote and watch the image as I manually change the state of the script device to running/stopped.

The image never updates on the swremote. However, if I leave the panel displaying the image; it may or may not update (I'm sure to give it enough time to update over ATT's network). It will always update if on the script device, I select the image property path/file, and "reselect" the same file in the file dialog box...

I thought that maybe since my script was simply re-writing over the file each time it's created, maybe HB wasn't picking that up as a change. I changed my script to first delete the file and then recreate it - no change in the above behavior was seen afterwards.

I have confirmed that the script works both internal and external to HB. The new image is created each time the script is executed. It simply does not seem to be changing on the swremote. I don't think the issue is directly tied to the PPC swremote I'm running on the 8525 as I notice identical behavior when running the local swremote on the server. It's almost as if the "allow same value changes" check box isn't working, even though it's checked.

I have had this working before - on 2.32 - but I am just now re-implementing it on HB3

Any Ideas?

TIA,
Terry
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Does it work when your run the theme on your server PC instead of the ppc?

This is just a simple question since I can't help you with the ppc part.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Try enabling tracing on the SWRemote (done in the configuration screen on the remote) and run the script several times. See if there is a message about the dynamic image file being received.
Scott
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

The trace log on both the Local SWRemote and the PPC one show the dynamic image being received after the panel containing the image is loaded.

The log file does not show the image being received after running the script. I can exit and re-enter the panel and get the new image, and that is reflected in the trace log, but it will not update on it's own.

A trace log from the PPC is included in-line (couldn't attach .txt) below. The panel that contains the dynamic image is called "Weather" Not that it's shown, but I ran the script about 10 times and as you can see; received no image.

Also, below are two screen shots that show the script device and the image property

Terry

***************Begin Trace Log *****************
9/7/2007 13:57 - Last Heart Beat At
9/7/2007 13:57 - BATTERY IDLE TIMEOUT = 0
9/7/2007 13:57 - OEM INFO = HERM100
9/7/2007 13:57 - PLATFORM TYPE = PocketPC
9/7/2007 13:57 - WAKEUP IDLE TIMEOUT = 0
9/7/2007 13:57 - Attempting to connect to the server
9/7/2007 13:57 - Battery Percentage = 20, Sleep Timeout = 120
9/7/2007 13:57 - Client is attempting to connect to the server
9/7/2007 13:57 - Battery Percentage = 70, Line Status = 0
9/7/2007 13:57 - Logging in to Server
9/7/2007 13:57 - Connected to the server
9/7/2007 13:57 - Login Successful.
9/7/2007 13:57 - Checking Theme file for updates...
9/7/2007 13:57 - Received new theme file [8125-2.xml]
9/7/2007 13:57 - Checking Theme file dependencies for updates...
9/7/2007 13:57 - Received new theme file [Common\bargraphtest.png]
9/7/2007 13:57 - Loading Theme
9/7/2007 13:57 - Initializing Panel [Main]
9/7/2007 13:57 - Initializing Panel [HVAC]
9/7/2007 13:57 - Initializing Panel [Gazebo]
9/7/2007 13:57 - Initializing Panel [Sprinklers]
9/7/2007 13:57 - Initializing Panel [Weather]
9/7/2007 13:57 - Video Power Management IS supported
9/7/2007 13:57 - Activating Skin [Weather]
9/7/2007 13:57 - Received new dynamic image file [C:\Program Files\HouseBot\Config\Themes\Common\bargraphtest.png]
9/7/2007 13:58 - Activating Skin [Main]
9/7/2007 13:58 - The Client is closing and disconnecting from the server.
9/7/2007 13:58 - IP Client Thread has terminated
9/7/2007 13:58 - Client determined server has disconnected because recv() returned 0
Attachments
graph device2.JPG
graph device2.JPG (33.65 KiB) Viewed 2505 times
graph device.JPG
graph device.JPG (21.66 KiB) Viewed 2505 times
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Does it show the property as changed in the history view for the image property when changed from a script?
Scott
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

Actually no, not when the script runs. It shows a change in the history seemingly only when I open the file dialog box and change the path/file (I don't actually change it, I just re-select the same image file).

I'm running 3.00.01, BTW.

The "Old Value" and "New Value" fields are the same in the SS below...

Terry
Attachments
graphhistory3.JPG
graphhistory3.JPG (31.58 KiB) Viewed 2499 times
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

I just tested it here, and it works for me... so here are a couple of things to check:
  1. Double check to be absolutely sure that the device and property names used in the script are the same ones you are updating in the UI. It's possible that it is changing the property just fine, but it's another property.
  2. Check the server log for any errors.
  3. Enable tracing on the Script device and see if there is any useful info there.
Scott
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

1.Double check to be absolutely sure that the device and property names used in the script are the same ones you are updating in the UI. It's possible that it is changing the property just fine, but it's another property.
Well, color me stupid... The device/propertyname wasn't even in the script. I had used this script externally for a while and had remarked out the setpropertyvalue line... :oops: As you can imagine, removing the tick mark in fron of that little line will do wonders...

Thanks for your help, I still can't believe I did that, I've been looking at this stupid thing all day. It should have been a clue to me that the thing was working OUTSIDE of HB... :!: Oh well, at least its working now.

Thanks again Scott & Richard,
Terry
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Well don't feel bad. The only reason that I knew to mention that as the #1 thing to check is because it's happened to me once or twice. :wink:
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Script SetPropertyValues are case sensitive and even yesterday I lost about half an hour to this one: SetPropertyValue "Email.Spam Word", strWord and it should have been SetPropertyValue "EMail.Spam Word", strWord

So easy to misread this stuff and the Option Explicit doesn't catch it. By now I just know that when something really doesn't make sense anymore it must be something like this. In your case it was even more obvious.

Lately my biggest bug is having a stopped script still running in the background. Still not sure why that happens and I can kill the script only by restarting HB, but it makes for very strange behaviour and debugging doesn't make sense at all.

Funny how all problems always seem to have a solution.
Post Reply