Author |
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 07 2008 at 17:35 | IP Logged
|
|
|
I know there is at least one other person on the board using a Treo with PH. I haven't tried it in about a year when I had a Treo 650. Internet access did work but it was was too slow to be useful. The 755p seems faster however I am having a little bit of difficulty with my Control Center screens.
I can log in. I can access the device status screen and control devices. I can go from one control center screen to another using the tabs. However, when I press a control center button PH receives the press but the button NAME doesn't appear to be transmitted so no action takes place.
This would be an example of what is received by PH when I access the CC using Internet Explorer on a laptop. It all works:
tabid=INSTEON&id=W3&x=103&y=101&nexturl=
(Note:Insteon is the tab name and W3 is the button name)
This is an example of what is received by PH when I access the CC using Blazer (the TReo's browser):
tabid=INSTEON&id=&x=214&y=148&nexturl=
Basically the button ID isn't transmitted or isn't received. I tried making the button the size of the entire treo screen but still no luck.
This is way over my head. Anyone have any ideas?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2008 at 10:16 | IP Logged
|
|
|
Noel,
Thats definately no good. Does the Treo browser have a "View Source" option? If so, the first thing I would do is have a look at the source to determine if PH is sending the source wrong to the Treo. If the actual HTML source looks OK, then something must be wierd with the Treo browser that is causing it to not send the ID.
Does it not work only on certain buttons or are all of the CC buttons missing the ID? Im wondering if there is a character in the ID field that the Treo doesnt like (view source might help here) or if the Treo doesnt like the name of the field (ID). Since you are getting something sent back to PH, the Treo is at least receiving click event, but it appears that something with the ID field is not to it's liking.
One other thing to try is messing with the "flags" option on the CC. The default method of triggering a CC button press uses javascript which may or may not be fully supported by the Treo. If you normally use a URL of something like:
http://XX.XX.XX.XX/ph-cgi/controlcenter?id=INSTEON
then try:
http://XX.XX.XX.XX/ph-cgi/controlcenter?id=INSTEON&flags=16
Flags ANDED with 16 will cause PowerHome to fire the buttons using an HREF tag rather than a JS OnClick. Another last resort method is to use the CCMAP method of drawing the Control Center. This method is useful for browser clients that don't understand JavaScript OR CSS (the default method of rendering the CC). This will look like:
http://XX.XX.XX.XX/ph-cgi/ccmap?id=INSTEON
Let me know,
Dave.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 09 2008 at 10:35 | IP Logged
|
|
|
Dave,
Once again, you have provided the answer.
Altho there is no view source in the Treo browser (Blazer), I recalled seeing something about javascript not working with Blazer.
flags=16 did the trick.
Thanks.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 09 2008 at 17:38 | IP Logged
|
|
|
Is there PH formula that can be placed in a macro which Refreshs a web browser's page automatically?
From the control center in a web browser I'm sending commands to a macro which toggles lights on and off. The button pressed turns green or yellow depending on the light's status. While the command works, the button does not change color until the next command is sent from the browser or until the browser window is refreshed. If the browser window is refreshed from the browser (i.e. pressing the circular arrows on the tool bar) not only is the screen refreshed but the command to turn the light on and off is again sent, turning the lights on if off or visa versa.
So in order not to execute the macro again and trip the toggle I need to be able to refresh the screen from PH.
I came across POST in the Event Log and the formula ph_itcexecutehttp ( n, s, s, s, s, n ) in help, but couldn't figure out how to get it to do what I want.
Is what I would like to do possible?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2008 at 18:35 | IP Logged
|
|
|
Noel,
Unfortunately, you cant remotely control a remote browser. You would have to have a Java applet or activeX control or similar in order for a webserver to remotely control a browser. You can make a page automatically refresh itself with javascript, but that would require you making your own default CC PSP pages (something that will be easier in the future as I will have a ph_ function that will return the "core" CC HTML).
However, there may be another solution using our old friend, the FLAGS parameter again. The default behaviour of the CC is to create an HTML frame and redirect the CC button presses to this "hidden" frame. There is a flag option that says to direct the result of the CC action button to the main frame causing it to refresh after a button press. To make use of this, add 1 to the flags parameter. So if you were previously using flags=16, use flags=17.
The problem with this is that the CC page will refresh with each button press (obviously what you want in this case), but the refresh may actually come before the light status has actually been updated. Give it a try and see if it works for you .
Dave.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 09 2008 at 19:14 | IP Logged
|
|
|
FLAGS=17 has done the trick.
Any other numbers up your sleeve?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 09 2008 at 19:50 | IP Logged
|
|
|
Don't mention 42!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2008 at 19:50 | IP Logged
|
|
|
Welll, since you ask...
These are all the valid values for the FLAGS parameter. Just add them all together for the desired set of features:
1 = Reload
2 = Dont include a link back to PH Main
4 = Dont show CC tabs
8 = Use phcc.css for style sheet
16 = Use href vs JS onclick
32 = ???
64 = No scrollbars
128 = Dont include X and Y parameters
There is also an additional parameter named TYPE. Just append &type=X to your URL to make use of this. The TYPE parameter can have a value from 0 to 3 (they don't get added together).
type=0 - Default. Opens the main 2 Frame CC window. The main frame displays the CC page (type=1) and the 2nd frame (hidden) is where the CC button output goes.
type=1 - Display the main CC page in the 2 frame CC page (type=0).
type=2 - Instead of using frames, create a pop-under window to direct CC button output to.
type=3 - Don't create frames or pop-unders. Use just a standard single page. This means that all button presses will also cause a refresh of the CC page.
HTH,
Dave.
|
Back to Top |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 09 2008 at 21:37 | IP Logged
|
|
|
Dave,
I actually did laugh out loud when I read your response.
The funny thing is, I was going to ask if there was a way not to show the tabs, but I thought I used up my questions for the day and was going to wait.
And Tony, watch out. If you add a 32, an 8 and a 2 you'll be surprised at what you get.
|
Back to Top |
|
|