Cloud Dashboard Local Recorces

On my dashboard I have an tile that is referencing a web page on my raspberry pi and it works when using the local dashboard, but when I use the cloud dashboard url it dose not display the web page.

I am using a custom driver that is using an iframe to display a url.

Any help would be appreciated.

Is the iframe only accessible on your local network?

I am using a 192.168.1.x address, yes it is only my local network. And you cannot get access the the web page outside of my network.

Then it can't be displayed on a cloud dashboard then. The iframe doesn't go through Hubitat, the link in hubitat simply instructs your browser where to get the iframe from.

1 Like

Gotcha. I figured it would still go through hubitat. Thank you!

1 Like

Leaving aside the local/cloud aspects of this, can I ask how you get a web page to display within a tile? I can see how to use a "link" tile and an "image" tile, but neither of these is what I want.

Sorry for the late response. I made my own driver. After the driver is in hubitat I created a device with the driver.

Just to let you know, and anyone else that may come across this post, I am not maintining this at all.

When you put in the URLs you want you have to turn on the device. I built it to have two iframs, but can only use one or add more code the the driver.

After device is created and your settings set, go to your dashboard create a tile using that device, under template use Attribute, under options select iframe1 or iframe2.

preferences {
input (
name = "iframe1",
type = "text",
title: "iFrame URL 1",
description: "",
required: "True",
displayDuringSetup: "True"
)
input (
name: "iframe1width",
type: "Text",
title: "iFrame 1 Width",
requried: "True",
DisplayDuringSetup: "True",
defaultValue: "480"
)
input (
name: "iframe1height",
title: "iFrame 1 Height",
type: "Text",
requried: "True",
DisplayDuringSetup: "True",
defaultValue: "480"
)
input (
name = "iframe2",
type = "text",
title: "iFrame URL 2",
description: "",
required: "True",
displayDuringSetup: "True"
)
input (
name: "iframe2width",
title: "iFrame 2 Width",
type: "Text",
requried: "True",
DisplayDuringSetup: "True",
defaultValue: "480"
)
input (
name: "iframe2height",
title: "iFrame 2 Height",
type: "Text",
requried: "True",
DisplayDuringSetup: "True",
defaultValue: "480"
)
}

metadata {
definition (name: "iFrame Driver", namespace: "ml", author: "mitch3po") {

capability "Switch"

attribute "iframe1", "text"
attribute "iframe2", "text"
}
}

def on() {
sendEvent(name: "motion", value: "active")
sendEvent(name: "switch", value: "on")
sendEvent(name: "iframe1", value: "<embed src="${iframe1}" width="${iframe1width}" height="${iframe1height}">")
sendEvent(name: "iframe2", value: "<iframe type="text/html" frameborder="0" width="${iframe2width}" autoplay="true" height="${iframe2height}" src= "${iframe2}" allowfullscreen allowautoplay>")

}

def off() {

SendEvent(name: "switch", value: "off")
}

def installed() {
on()
}

Thanks - I think this might do it!

Yes, after a bit of experimentation, I've managed to do what I want. HE complained about some syntax errors in your driver code, but I have replaced all the optional stuff with a hard-coded call to the web page I'm interested in, and it works just fine. Thanks for sharing this.

Your welcome. I actually don't use it anymore, I when t a different route. Glad you for it to work!