05-22-2023 12:58 PM
I've made a workaround for that the WR panels boots faster then the core.
Download this file. Edit the url and startup delay inside the file, then put this file in the download folder in the hmi using a USB stick.
Then change the url in the panel to the local html file:
content://com.android.externalstorage.documents/document/primary%3ADownload%2Fstartup.html
And now it should show this file for a while before redirecting to the core's hmi
Solved! Go to Solution.
05-26-2023 01:28 PM
If you want to simply call an action after 30 seconds you can simply use setTimeout 😉
setTimeout(function() {
location.href = url;
}, delay * 1000);
05-26-2023 01:34 PM
But with my solution its possible to add an "Starting in 30 seconds.." function, and that could be usefull.
07-12-2023 05:04 PM
Hi @AndreasL
I am trying to implement your solution above but cannot get the WR panel to recognise my USB device. Is there another method like FTP I can try to get the files on there?
Many thanks
07-13-2023 08:28 AM
Not as far as i know, is the usb formatted as FAT32?
07-20-2023 06:53 PM
Works for me, thanks Andreas.
08-15-2023 11:57 AM - edited 08-15-2023 11:59 AM
Hi Andreas,
may I have question regarding your workaround?
1) I have tested the code you provide and I had to modify a code a bit to:
Without the modification I always get syntax error in my web browser (I do test on my PC). What was the meaning of your original code - I haven ´t found any example on internet for it?
2) According help it seems that setInterval calls function continuesly and never stops till you call clearInterval function.
Shouldn´t we call the clearInterval inside IF then? But it´s true that we do not have any variable for ID created for our function.
As soon as I open startup.html in my browser, after 10 s it starts opening new windows with my target url -> therefore I´m asking whether it is ok or not.
Thanks a lot for clarification.
Regards
08-21-2023 08:30 AM
1. The () => is an arrow function, it works in all major browsers unless you run an ancient version (And then you really should update due to security fixes):
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
2. The line window.location.href will clear the timer and then redirect to the WebIQ page, so no need to clear the timer.