Author |
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: January 14 2017 at 15:49 | IP Logged
|
|
|
Hi - I have created a tab in the Control Center which I access remotely around my house using the Silk Browser on the Amazon Fire. (so the Fire is a $33 touch-screen panel :-) ).
My question is this - Every 15 minutes, Powerhome queries the web for the local temperature, and updates a Global Variable. I use this to decide whether to turn certain things (heaters, ceiling fans) on and off, and I also display the value on the Control Center tab as a Static GlobalVar.
However, updating this the global variable in PH does not update the displayed value on the remote browser. To see the current value I have to refresh the page at the browser. Is there any way I can "Push" the update of the global variable to the browser screen so that PH controls when the screen updates?
If not - as a plan B, maybe I can use an "Action GlobalVar", with an null action, and then pressing it will update it's value? [I can try this if it's my only option].
Thanks!
/j
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 17 2017 at 11:47 | IP Logged
|
|
|
Jeff,
There is no way to effectively "push" the changes to your remote web based CC screen. This is something I would like to investigate more but it currently doesnt exist.
You could achieve the effect though by making a simple HTML webpage and placing it in the PowerHome web directory and call it from the Silk browser vs calling the CC
directly.
Code:
<html>
<head>
<script>setInterval(function(){var ifr=document.getElementsByName('main')[0];ifr.src = ifr.src;},300000);</script>
</head>
<body>
<iframe src="http://yourphserverip:8000/ph-cgi/controlcenter?id=YOUR CCID&type=4&flags=4" width="100%" height="100%" frameborder="0" name="main"></iframe>
</body>
</html>
|
|
|
Save the above code to CC.HTM in the PH web directory (make the necessary adjustments to the server IP and CC ID). The "300000" is how often the page will refresh in
milliseconds. In this case it should refresh every 5 minutes.
Hope this helps,
Dave.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: January 18 2017 at 19:36 | IP Logged
|
|
|
Hi Dave - Could you (or anyone) briefly explain how I would construct a URL to access a file in the Powerhome Web directory.
THANKS!
/j
Edited by jeffw_00 - January 18 2017 at 19:37
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 18 2017 at 19:40 | IP Logged
|
|
|
Should just be http://yourphserverip:8000/yourfile.ext
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: January 18 2017 at 19:41 | IP Logged
|
|
|
Thanks Tony - will try it.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: February 19 2017 at 11:04 | IP Logged
|
|
|
if anyone's watching - it works better if you take the :8000 out of the HTML for some reason..
Thanks guys!
|
Back to Top |
|
|