Author |
|
gg102 Senior Member
Joined: January 29 2013 Location: United States
Online Status: Offline Posts: 245
|
Posted: October 25 2018 at 14:55 | IP Logged
|
|
|
Hi,
I'll offer my experiences.
"navigate_cc" does work, but you must have the .ini file on the client set up properly. You
must list all the cc pages listed in the .ini or they will not show up. (I've done that myself)
As to auto-resizing, it's almost possible - sort of......
I'll describe this is general terms, you can work out your specific details.
First, you have to have separate screens for large mode and small mode (or whatever) but they
have to be a fixed size. You'll need to somehow select which screen you wish to view.
You need to set some global variables for "top", "bottom", "left", and "Right" of the large and
small screens. Then all of you positions have to be calculated something like:
ph_setccobjectxy("__AG_YOUR_CC_SCREEN_NAME", "YOUR_OBJECT_NAME", (ph_getglobal("top" +
your_offset), (ph_getglobal("left" + your_offset) ) What this does is set the positions of the
items relative to the top/bottom/left/right + your desired position offset.
This will allow you to 'relocate" your items on the remote_cc screen.
YOU NEED TO KNOW that global variables won't relocate. It's a current PH bug so you'll have to
use ph_getglobal_s() and put the data into a static variable to get the data to relocate.
Be aware, this is a complex process, but it works, and I use it for pop-ups like this:
The procedure above will allow you to use one screen to handle both (or any) size, but it is
rather complex. It might just be easier for you just to make a fixed large screen and a fixed
small screen.
If you want the screen size to be automatic, you can, but that requires PH to know which system
you're using (That's a different issue), and then it can call the large or small remote_cc
screen by itself.
OR......
you could use the WEB interface, but it won't update by itself you have to refresh it to get
updates.
Just my thoughts.....
|
Back to Top |
|
|
Resolute Newbie
Joined: January 11 2016
Online Status: Offline Posts: 32
|
Posted: October 25 2018 at 18:51 | IP Logged
|
|
|
So let me understand, the .ini file has to list all pages in the database in
order for the CC_Navigate action to work, even if only a few are to be
used by this device?
Wow, you look as though you have spent more time than me on the
control center design. Great job!! For the pop-up pages, you can open
CC pages on top of other pages? or are they just different pages that
include what appears to be a popup?
|
Back to Top |
|
|
gg102 Senior Member
Joined: January 29 2013 Location: United States
Online Status: Offline Posts: 245
|
Posted: October 25 2018 at 19:43 | IP Logged
|
|
|
Hi,
Yes, the .ini file: (c:\powerhome\phutils\phremotecc\phremotecc.ini) has to be modified every time you add a cc page. Eventually, the tab line might get rather
lengthy.
My tablist (one) line is:
tablist=__AG_HOME_STATUS+__AG_HVAC_GRAPH1+__AG_PAST_TTS_MESS AGES+__AG_STATUS+__AG_TEMPERATURE_STATUS+__AG-BACKSPRINKLER+ __AG-DEBUG1+__AG-FFC+__AG-FFC_PIC1+__AG-
FLOORPLAN+__AG-FMLYRM+__AG-FMLYRM_PIC+__AG-FRONTSPRINKLER+__ AG-FYR+__AG-FYR_PIC+__AG-GARAGE_PIC+__AG-GRG+__AG-GSTBDRM+__ AG-GSTBRM_PIC1+__AG-IRRIGATION+__AG-
IRRIGATION_PIC1+__AG-IRRIGATION_PIC2+__AG-IRRIGATION_PIC3+__ AG-IRRIGATION_PIC4+__AG-MSCRM+__AG-MSCRM_PIC1+__AG-MSTRBDRM+ __AG-MSTRBDRM_PIC+__AG-OUTSIDE+__AG-
OUTSIDE_PIC1+__AG-OUTSIDE_PIC2+__AG-OUTSIDE_PIC3+__AG-OUTSID E_PIC4+__AG-SYSTM+__AG-SYSTM_2+__AG-SYSTM_3+__AG-SYSTM_4+__A G-THUMB001+__AG-THUMB002+__AG-THUMB003+__AG-
THUMB004+__AG-THUMB005+__AG-THUMB006+__AG-THUMB007+__AG-THUM B008+__AG-THUMB009+__AG-THUMB010+__AG-THUMB011+__AG-THUMB012 +__AG-THUMB013+__AG-THUMB014+__AG-
THUMB015+__AG-THUMBS-ALL
Yup, that's ONE lengthy line. It contains the name of EVERY tab/page in the cc. Those are the names of every tab in my cc. Yup, I have a sh*t load of them. Without
these, you will have issues navigating in the remote_cc. Things probably work in the CC, but the remote_cc will probably have issues. When you add a page, you'll have
to reload the remote cc.
As to popups, the truth is NO, you can't actually do popups, but you CAN fake them really well!
Here's how:
In PH, you can move items in the CC/remote_cc. I use this feature to move the dots on my graphs (as shown above). When my HVAC system comes on/off, I increment a
counter for the hour it happens in, then I move the dot on the page up a few pixels as you can see above. At the end of day, I set the positions back to the base. I
have a macro that gets triggered at midnight, and it does this, and a lot of other "end-of-day" reset type things.
Extending this "move" feature, you can move an image, data, and any object on the CC. So, you can initially put the "popup" way off (x = -1000) to the left side of
the screen (for example), but when you "call it up" you simple move the item into the visible screen ( x = wherever-you-want). The hard part is that you have to move
EVERYTHING in the popup including the background image RELATIVE to the popup coordinates. ("TOP"+x, "LEFT"+x) ( you don't actually HAVE TO move them relatively, but
it's better in case you decide to move the popup later.) I set a global variable for the top/left coordinates of the popup, and move everything relative to those.
So, to move the popup, I only have to change the global top/left globals, and the entire popup and data moves appropriately. Then when you "close" the popup, you
move everything back off the screen (x = -1000). You'll use a lot of macros and variables to achieve this.
You need to be aware!!!!!!
If you have any button or link underneath your popup, it WILL STILL WORK even though it's not visible. You can still click on it even if it's not visible. So, you'll
have to be careful about where you move your popup onto the visible screen so there aren't any button underneath your popup.
Yes, it's a LOT of programming work, but it's fun to have an overly very functioning system.
If you understand all this, you have a chance!
good luck
|
Back to Top |
|
|
Resolute Newbie
Joined: January 11 2016
Online Status: Offline Posts: 32
|
Posted: November 07 2018 at 22:33 | IP Logged
|
|
|
Adding all of the CC tabs to the ini files worked perfectly. Thanks!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: June 28 2019 at 08:12 | IP Logged
|
|
|
This is an FYI addition to this old thread, but it covers a situation that has bugged me and clearly many others for years. After fighting the fact that my private PH web server displays differently on a PC versus a smart phone, with the phone display only covering about 25% of the screen as I designed my pages with fixed pixel (eg, "320")absolute dimensioning rather than relative (eg, "90%"
Thus, unless I manually zoomed the screen, my PH web pages looked like this...
instead of this desired full screen...
Turns out there is a quick and easy fix provided by modern updates to Browsers that automatically adjust a screen to fit a mobile device.
Simply insert this line of HTML Code into your web pages in the HEAD block and before the BODY block.
<meta name="viewport" content="width=device-width, initial-scale=1">
For example...
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: June 28 2019 at 19:12 | IP Logged
|
|
|
I found this out a while ago and use...
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5"/>
I deleted minimum-scale and nothing changed. I also tried different values for initial-scale without change. :(
|
Back to Top |
|
|
DENOTTO Newbie
Joined: July 23 2019 Location: United States
Online Status: Offline Posts: 1
|
Posted: July 27 2019 at 02:53 | IP Logged
|
|
|
Decent, need to accomplish something like this with
mine.
|
Back to Top |
|
|
|
|