Thanks @dansku - response much appreciated. I’m still seeking more help, please: I’m not sure either approach solves the problem for me. Maybe I’m not understanding correctly. Here goes…
Your first suggestion - I could just implement a server that issues a 301 redirect, right? But once I have redirected the on-screen browser to e.g. www.bbc.co.uk/news, I lose control and can’t switch away from it, until everything is restarted by a reboot or something. If I’m understanding things correctly, the process inside the
wpe container doesn’t restart itself on a schedule, or check the
WPE_URL periodically. Or does it?
Your second suggestion about changing the variable using the API. I can do that - nice API and docs! - but this exhibits the exact problem I’m trying to solve. After I hit the API I get “OK”, but there’s no on-screen indication until tens of seconds later, when the containers begin to cycle, and after that it’s about 2 minutes wait while the containers restart. The new page displays as expected.
So what I have discovered is if I manually go to the balena UI and use the web-based terminal to execute e.g.
WPELauncher https://www.bbc.co.uk/ inside the
wpe container, a new browser fills the screen and renders quickly. After I hit Ctrl+C, I’m back to where I was - the original page shows back.
Can I get my device or containers to listen for some network-originated instruction and do the same thing? I’d like colleagues to be able to send a URL to the screen and see it load in front of their eyes. That would be so awesome - and I would certainly share the code.
wpe process, or run commands inside it? Or can I write a script that runs inside the
wpe container and listens on a port (js or python preferable, but open to suggestions)?
Or is there another way I could listen on a port and control the screen on the wall without the two-minute delay?
All help much appreciated.
(EDIT - clarification)