Use Global Variable in Link Tile or iFrame?

I am trying to open a Google Maps page with directions between two dynamic points from a dashboard. I have ALON & ALAT variables for Point A and BLON & BLAT variables for Point B.

I then have a 5th Global Variable, GoogleMapsURL, that should be the full URL for directions. I can copy the Global Variable result into a browser and it works great so all of the variable manipulation is working.

For the Link Tile, I put %GoogleMapsURL% in the Link URL. If I click on it, the webpage that opens is "http://hubitat.c7/apps/api/2/dashboard/%GoogleMapsURL%" with an error message of " Bad Message 400 reason: Bad Request" on the webpage so it is trying to open a page

Does anyone know if this is possible?

Might try using a Virtual URL device and using type iFrame.

1 Like

Tried that also; no dice.

Ok, even typing a normal site like www.google,com and www.yahoo.com isn't working. I suspect DNS because I use pihole and don't allow external servers. I have seen in Unifi logs that Hubitat hubs have been blocked from trying to use Google.
image
Time for more research....

I conceded defeat going down this road. Since I am already using the WorldMap pallet to show my location and my wife's, I went down that path instead. I have a button under the World Map in Node Red Dashboard that opens Google Maps with directions from my wife's location to mine. SUCCESS!!!

1 Like