Dashticz, alternative dashboard based on HTML, CSS, jQuery
Moderators: leecollings , htilburgs , robgeerts
Vomera
Posts: 184 Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:
Post
by Vomera » Friday 26 January 2024 15:35
I have it like this, but pretty hard to get it in dashtics. I made a html page in the dashtics folder and refer to it and in the html page i refer to the weatheradar page:
Config.js
Code: Select all
frames.weerplaza = {
frameurl:"custom/weerplaza.html",
height: 350, //height of the block in pixels
width: 12,
scrollbars:false,
refresh:1800
}
weerplaza.html (i didnt change the name but i am using weer en radar now, before weerplaza)
Code: Select all
<iframe id="iframe" height='800px' width='500px' scrolling="no" style="border: 0px none; margin-top: -210px; margin-left: -60px;" src="https://www.weerenradar.nl/weerradar/amsterdam/171698?center=50.82,5.76&zoom=8&layer=wr&period=periodCurrentHighRes" ></iframe>
In the iframe you can use the margin top and left to position to put the map centered on the frame. Play with those numbers. You can also use other website as well, al long it can load on the page.
example of weerplaza
Code: Select all
<!-- <iframe id="iframe" height='750px' width='500x' scrolling="no" style="border: 0px none; margin-top: -410px; margin-left: -50px;" src="https://www.weerplaza.nl/regenradar/amsterdam/5575/regen-en-wolken/" ></iframe>-->
jberinga
Posts: 57 Joined: Tuesday 11 August 2015 14:20
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: The Netherlands
Contact:
Post
by jberinga » Sunday 28 January 2024 15:02
Thanks Vomera!
I have it working now, but because sat24 isn't allowing iframe, I had to work around this and I used PHP for it.
So I have weerradar_load.php:
Spoiler: show <?php
echo file_get_contents("https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on ");
?>
weerradar.php
Spoiler: show <iframe id="iframe" height="1920px" width="1080px" scrolling="no" style="border: 0px none; margin-top: -550px; margin-left: -300px;" src="weerradar_load.php" ></iframe>
config.js
Spoiler: show frames.weerradar = {
frameurl:"custom/weerradar.php",
height: 350, //height of the block in pixels
width: 12,
scrollbars:false,
refresh:1800
}
Vomera
Posts: 184 Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:
Post
by Vomera » Sunday 28 January 2024 21:15
jberinga wrote: ↑ Sunday 28 January 2024 15:02
Thanks Vomera!
I have it working now, but because sat24 isn't allowing iframe, I had to work around this and I used PHP for it.
So I have weerradar_load.php:
Spoiler: show <?php
echo file_get_contents("https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on ");
?>
weerradar.php
Spoiler: show <iframe id="iframe" height="1920px" width="1080px" scrolling="no" style="border: 0px none; margin-top: -550px; margin-left: -300px;" src="weerradar_load.php" ></iframe>
config.js
Spoiler: show frames.weerradar = {
frameurl:"custom/weerradar.php",
height: 350, //height of the block in pixels
width: 12,
scrollbars:false,
refresh:1800
}
Hey! Thank you maybe I can use it as wel
I will test it maybe tomorrow!
Users browsing this forum: No registered users and 0 guests