Embedded webpage in a control page

User avatar
Gangotti
Posts: 92
Joined: Tue Dec 23, 2014 8:11 pm
Location: Las Vegas, NV

Embedded webpage in a control page

Post by Gangotti »

Is there a way to create a window on a control page and display a web page? I know that this is not possible with indigo touch, however, I'm under the impression it may be possible with domopad which is fine since all my tablets are running domopad. If so, can you give me some simple instructions on how to do it?
User avatar
mundmc
Posts: 1068
Joined: Fri Sep 14, 2012 4:34 pm

Re: Embedded webpage in a control page

Post by mundmc »

Not sure how I did it, but yes there is but only for display i think. You place a refreshing image in the CP, but write something in the title or notes that lets DomoPad sub in a specified web page. Sorry i don’t remember off the top of my head
User avatar
RogueProeliator
Posts: 2538
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Embedded webpage in a control page

Post by RogueProeliator »

Is there a way to create a window on a control page and display a web page? I know that this is not possible with indigo touch, however, I'm under the impression it may be possible with domopad which is fine since all my tablets are running domopad. If so, can you give me some simple instructions on how to do it?
Yup, the longer discussion is in this thread, but the gist of it is:

To display the web content on the page, here is what you will do (it is pretty simple):
Create an image in the size of the web content you want to show on screen; in Domotics Pad, this image will be replaced with your web content while the image itself will show for non-DP clients such as the web and Indigo Touch.
Create a variable that will control which webpage is loading in the view... this will control the initial load AND may be updated which will cause a navigation on the view in DP.
Create an element on your control page to display the variable as an image and select the image from Step 1
Set the Caption of this element to "DP:WebView" (no quotes). This is what triggers the app to show the content. I suggest setting the caption in the middle of the image (Centered on Control) for non-DP clients; in DP this caption will of course not be rendered.
This is the least invasive and easiest method I could come up with to configure the content, allow changes from the server, and not too negatively effect other clients if they happened to load the page.


Let me know if you have any questions/issues doing it!

Adam
User avatar
Gangotti
Posts: 92
Joined: Tue Dec 23, 2014 8:11 pm
Location: Las Vegas, NV

Re: Embedded webpage in a control page

Post by Gangotti »

Adam, that worked great, I am trying to display the control page sized for my iPhone in a window in domopad. Currently, when it displays the web image it is very small despite making the variable image size the same size as the control page I'm calling. any thoughts? Is there a way to specify the size of the web page in the variable?
User avatar
Gangotti
Posts: 92
Joined: Tue Dec 23, 2014 8:11 pm
Location: Las Vegas, NV

Re: Embedded webpage in a control page

Post by Gangotti »

Here is a photo for reference.
IMG_1853.jpg
IMG_1853.jpg (468.33 KiB) Viewed 6288 times

Sent from my iPhone using Tapatalk
User avatar
mundmc
Posts: 1068
Joined: Fri Sep 14, 2012 4:34 pm

Re: Embedded webpage in a control page

Post by mundmc »

Gangotti wrote:Here is a photo for reference.
IMG_1853.jpg

Sent from my iPhone using Tapatalk
A very clever idea! I look forward to seeing how this works out
User avatar
RogueProeliator
Posts: 2538
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Embedded webpage in a control page

Post by RogueProeliator »

Adam, that worked great, I am trying to display the control page sized for my iPhone in a window in domopad. Currently, when it displays the web image it is very small despite making the variable image size the same size as the control page I'm calling. any thoughts? Is there a way to specify the size of the web page in the variable?
Domotics Pad simply loads the page into the view -- nothing explicit is being set as to sizing which likely means the server is not setting the viewport or else the Chrome WebView is not obeying it. Let me try to duplicate it here and see if I have any suggestions.

I can guess, but what are the specific sizes you are using?

Adam
User avatar
Gangotti
Posts: 92
Joined: Tue Dec 23, 2014 8:11 pm
Location: Las Vegas, NV

Embedded webpage in a control page

Post by Gangotti »

Adam, the size I’m trying to display is 414 x 672. I have tried changing the number of pixels per inch in photoshop of the image and it yielded no change. The background image is 1920 x 1200


Sent from my iPhone using Tapatalk
User avatar
Gangotti
Posts: 92
Joined: Tue Dec 23, 2014 8:11 pm
Location: Las Vegas, NV

Re: Embedded webpage in a control page

Post by Gangotti »

Also in addition to this, Ever since I lost the weather underground stuff, I have been trying to find a way to show the radar view again. this has provided me a way to view the pack, however, I have noticed that the webpage never updates itself the only way I can update is to either tap the image a couple of times, or reopen the control panel. Any suggestions? Currently, I am trying to display the looping radar data from https://radar.weather.gov/ridge/radar_l ... R&loop=yes
User avatar
RogueProeliator
Posts: 2538
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Embedded webpage in a control page

Post by RogueProeliator »

Adam, the size I’m trying to display is 414 x 672. I have tried changing the number of pixels per inch in photoshop of the image and it yielded no change. The background image is 1920 x 1200
So the image is 414x672 as well as the background size of the control page being shown in the small window? I'll see if I can duplicate.
Ever since I lost the weather underground stuff, I have been trying to find a way to show the radar view again. this has provided me a way to view the pack, however, I have noticed that the webpage never updates itself the only way I can update is to either tap the image a couple of times, or reopen the control panel. Any suggestions?
The page on the control page should exist just as any other browser window (that is literally what is being shown, the application is not attempting to handle the web stuff itself). SO, if the source page doesn't auto-refresh then you will have to handle it yourself.

Try setting a timer to change the URL being shown -- usually you can add your own parameter to the end of the url (like &myCnt=1) and simply increment that counter. Most websites should be okay with extra parameters that they don't use and DP will see that as a changed URL and (hopefully) reload successfully.

Adam
User avatar
DaveL17
Posts: 7321
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Embedded webpage in a control page

Post by DaveL17 »

Gangotti wrote:Also in addition to this, Ever since I lost the weather underground stuff, I have been trying to find a way to show the radar view again. this has provided me a way to view the pack, however, I have noticed that the webpage never updates itself the only way I can update is to either tap the image a couple of times, or reopen the control panel. Any suggestions? Currently, I am trying to display the looping radar data from https://radar.weather.gov/ridge/radar_l ... R&loop=yes
Try entering this url as a refreshing image url with a refresh rate of choice: https://radar.weather.gov/ridge/lite/N0R/ESX_loop.gif

If that doesn't solve the issue, then you could use the Fantastic Weather Image Downloader (with the same url) and then link to the downloaded image. However, if the control page isn't refreshing any images, neither will likely be different than what you're currently seeing.
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
Post Reply

Return to “DomoPad Android Client”