<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Redirecting HMI from studio]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Ive developed my project with multiple pages according to the tutorial with multiple .hmi.svg files which is working great.</p>
<p dir="auto">The project includes a key switch that is supposed to open a setting page upon high edge. What would be the easiest way to redirect startx chromium-browser instance to a different page from a rexygen studio block. Im guessing running a bash command is the only way, but am totally lost at doing it this way.</p>
<p dir="auto">TLDR: Chromium page redirection from a function block</p>
]]></description><link>https://forum.rexygen.com/topic/255/redirecting-hmi-from-studio</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 04:58:45 GMT</lastBuildDate><atom:link href="https://forum.rexygen.com/topic/255.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Jul 2021 17:11:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Redirecting HMI from studio on Thu, 26 Aug 2021 11:25:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a> said in <a href="/post/1025">Redirecting HMI from studio</a>:</p>
<blockquote>
<p dir="auto">There is one last flaw that I would like to work out. The chromium instance allows the user to use gestures and go back and forth in the history of pages. In some cases get to a restricted page this way.<br />
I googled vigorously to solve this issue, but so far to no avail. Any advice on this topic?</p>
</blockquote>
<p dir="auto">Hi Ivan,<br />
I wasn't successful in finding any suitable solution as well. Have a look at <em>xinput</em> command which might help you to disable all the gestures at Linux level. I didn't tried it myself however if you find any working solution our team and the community will be happy to hear about it.</p>
<p dir="auto">Cheers,<br />
Tomas</p>
]]></description><link>https://forum.rexygen.com/post/1026</link><guid isPermaLink="true">https://forum.rexygen.com/post/1026</guid><dc:creator><![CDATA[cechurat]]></dc:creator><pubDate>Thu, 26 Aug 2021 11:25:00 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Wed, 25 Aug 2021 16:49:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/3">@ondrej_severa</a></p>
<p dir="auto"><em>I believe there was a misunderstanding, the logic changing screens was already done with the <code>hide_by</code> parameters and worked, it's just that some components happened to be timing out. This didn't happen before in other projects done the same way.</em></p>
<p dir="auto"><em>Neverminding that,</em> I reworked the project to use javascript as you suggested, I like the fact that <code>.hmi.svg</code> files are split, it keeps things organized. After some prolonged tests, there are no more timeouts.</p>
<p dir="auto">There is <strong>one last flaw</strong> that I would like to work out. The chromium instance <strong>allows the user to use gestures and go back and forth in the history of pages</strong>. In some cases get to a restricted page this way.</p>
<p dir="auto">I googled vigorously to solve this issue, but so far to no avail. Any advice on this topic?</p>
<p dir="auto">Thanks for all the help so far!</p>
<p dir="auto"><em>chromium flags I tried:</em></p>
<pre><code>--user-data-dir=/tmp/hmi-chromium
--kiosk
--incognito
--disable-pinch
--overscroll-history-navigation=0 #This should fix it but it doesn't
--disable-overscroll-edge-effect #Tried this one too
--no-sandbox
--start-fullscreen
--window-size=$SIZE
--window-position=0,0
--no-first-run
--disable-translate
--noerrdialogs
--disable-infobars
--disable-component-update
</code></pre>
]]></description><link>https://forum.rexygen.com/post/1025</link><guid isPermaLink="true">https://forum.rexygen.com/post/1025</guid><dc:creator><![CDATA[TCELE]]></dc:creator><pubDate>Wed, 25 Aug 2021 16:49:33 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Sun, 15 Aug 2021 14:41:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a><br />
You are almost done. The last step is to create new file in HMI Designer save it to <code>hmisrc</code> dir and name it <code>servis.hmi.svg</code>. You can design new screen in this file.</p>
]]></description><link>https://forum.rexygen.com/post/1020</link><guid isPermaLink="true">https://forum.rexygen.com/post/1020</guid><dc:creator><![CDATA[ondrej_severa]]></dc:creator><pubDate>Sun, 15 Aug 2021 14:41:41 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Sun, 15 Aug 2021 13:04:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/3">@ondrej_severa</a></p>
<p dir="auto">Thanks for the example, it works as intended, I'm guessing, except that I am still missing the service.html and land on an <strong>Error 404 - Not Found page</strong>.</p>
<p dir="auto">Any dependencies I could be missing? I am running your example on a new Raspbian lite image with fresh rex core and HMI chromium installation.</p>
]]></description><link>https://forum.rexygen.com/post/1019</link><guid isPermaLink="true">https://forum.rexygen.com/post/1019</guid><dc:creator><![CDATA[TCELE]]></dc:creator><pubDate>Sun, 15 Aug 2021 13:04:43 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Fri, 13 Aug 2021 11:12:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a><br />
I have created a minimal working example and find out there is a little typo in my example source code</p>
<pre><code class="language-js">// indexOf
if(itm.getValue() &amp;&amp; window.location.href.indexOf('servis.html') == -1 ){ 
</code></pre>
<p dir="auto">After the fix, code is working fine for me. See the attachment.<br />
BR<br />
Ondrej<br />
<a href="/assets/uploads/files/1628853078850-tcele.zip">tcele.zip</a></p>
]]></description><link>https://forum.rexygen.com/post/1017</link><guid isPermaLink="true">https://forum.rexygen.com/post/1017</guid><dc:creator><![CDATA[ondrej_severa]]></dc:creator><pubDate>Fri, 13 Aug 2021 11:12:03 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Wed, 11 Aug 2021 10:11:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/3">@ondrej_severa</a></p>
<p dir="auto">Hello,</p>
<p dir="auto">The alert is there, custom.js is included. All the screens work now as before, it's just that the components that switch them time out after a short while and are disabled.</p>
<p dir="auto">Ignoring that I also force switched to the servis.html but no page is there, I checked the directory over ssh too.</p>
<p dir="auto">I've also updated rexygen studio to 2.50.10.13072, mentioning it just in case.</p>
<p dir="auto"><a href="/assets/uploads/files/1628676641176-hmisrc.zip">hmisrc.zip</a></p>
]]></description><link>https://forum.rexygen.com/post/1012</link><guid isPermaLink="true">https://forum.rexygen.com/post/1012</guid><dc:creator><![CDATA[TCELE]]></dc:creator><pubDate>Wed, 11 Aug 2021 10:11:09 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Mon, 09 Aug 2021 12:33:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a><br />
Are you sure, that your custom.js is included during the build? Please add <code>alert('I am here')</code> to your code and test if the alert occurs. I was told that you want to open this screen, whenever some operator switches some digital input. That's why my code requests <code>servis</code> data point and wait until the read value is non-zero. There is no need for a Button or Slider.</p>
<p dir="auto">If you want you can send me the source for your HMI and I can check it for you.</p>
<p dir="auto">Best regards<br />
Ondrej</p>
]]></description><link>https://forum.rexygen.com/post/1011</link><guid isPermaLink="true">https://forum.rexygen.com/post/1011</guid><dc:creator><![CDATA[ondrej_severa]]></dc:creator><pubDate>Mon, 09 Aug 2021 12:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Tue, 03 Aug 2021 08:31:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/3">@ondrej_severa</a><br />
I have done as instructed, but I don't get redirected to the service.html page, I tried to use a button component as well as a slider component. Any more advice?</p>
<p dir="auto">The reason behind this behaviour is correct, I think, when I set the refresh rate higher/slower it takes a longer time before the components get a timeout, but it still happens even on 500 ms (default).</p>
]]></description><link>https://forum.rexygen.com/post/1007</link><guid isPermaLink="true">https://forum.rexygen.com/post/1007</guid><dc:creator><![CDATA[TCELE]]></dc:creator><pubDate>Tue, 03 Aug 2021 08:31:11 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Mon, 02 Aug 2021 11:28:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a><br />
This behavior indicates that you are requesting too many datapoints and thus the read request is timeout. I suggest opening the SERVICE page on a different web page. You can do it by adding redirect request to custom javascript.</p>
<ol>
<li>Create <code>CUSTOM</code> and <code>CUSTOM/js</code> folder in your <code>hmisrc</code> folder.</li>
<li>Create <code>custom.js</code> file in the <code>CUSTOM/js</code> folder</li>
<li>Open your page in <em>HMI Designer</em>, open <em>HMI Configuration</em> and in the <em>HTML Export</em> tab check <em>Expert mode</em>.  Add two rows in the <em>Library Path</em> with <em>GENERAL</em> and <em>CUSTOM</em> texts. This will tell the HMI builder to include components from GENERAL library and your CUSTOM foilder. That how you append the <code>custom.js</code> file to your project</li>
<li>Edit the <code>custom.js</code> file with following content:</li>
</ol>
<pre><code class="language-js">REX.HMI.init = function(){

let servis= REX.HMI.get('&lt;name of the alias defined in HMI Designer&gt;');
//or
let servis= // REX.HMI.add({alias:"servis",cstring:"task.block:parameter"}'alias defined in HMI Designer&gt;'); // Add new item

// Subsribe to onChange event
servis.on('change',(itm)=&gt;{
    // If true and not in the page redirect current page to servis page
   // The check for href is not necessary if only on used in index.html page
    if(itm.getValue() &amp;&amp; window.location.href.indexof('servis.html') == -1 ){
        window.location.href = '/hmi/servis.html';
        // or open new tab
        // window.open('/hmi/servis.html','blank_');
    }
    else{
        // do nothing
    }
});
};
</code></pre>
]]></description><link>https://forum.rexygen.com/post/1006</link><guid isPermaLink="true">https://forum.rexygen.com/post/1006</guid><dc:creator><![CDATA[ondrej_severa]]></dc:creator><pubDate>Mon, 02 Aug 2021 11:28:45 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Fri, 30 Jul 2021 17:26:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/5">@cechurat</a></p>
<p dir="auto">So after implementing a solution with the hide_by option we are getting a bug where most input components set their state from ONLINE to ERROR, visually they are disabled (greyed out), after a short period of running. No other functional problems, just buttons/sliders not working.</p>
<p dir="auto">HMI log set on TRACE option:</p>
<pre><code class="language-State">Periodic reading failed! Request 7559 timed out
State changed to ERROR (multiple times, for reach HMI component)
Request 7559 timed out
Remaining commands: 0 message length: 0
State changed to ONLINE (multiple times, for reach HMI component)
Periodic reading failed! Request 5038 timed out
</code></pre>
<p dir="auto">Ive used the hide_by parameter in the same manner before without problems. Any idea to the cause? Thanks in advance!</p>
]]></description><link>https://forum.rexygen.com/post/1003</link><guid isPermaLink="true">https://forum.rexygen.com/post/1003</guid><dc:creator><![CDATA[TCELE]]></dc:creator><pubDate>Fri, 30 Jul 2021 17:26:17 GMT</pubDate></item><item><title><![CDATA[Reply to Redirecting HMI from studio on Wed, 28 Jul 2021 09:07:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.rexygen.com/uid/339">@tcele</a> Hello Ivan,</p>
<p dir="auto">thank you for your post. I would suggest to solve this request by means of REXYGEN HMI Designer. Just introduce another layer which will hide/show (Group Animation -&gt; Opacity) according to the key switch digital signal.</p>
<p dir="auto">Kind Regards,<br />
Tomas</p>
]]></description><link>https://forum.rexygen.com/post/1001</link><guid isPermaLink="true">https://forum.rexygen.com/post/1001</guid><dc:creator><![CDATA[cechurat]]></dc:creator><pubDate>Wed, 28 Jul 2021 09:07:10 GMT</pubDate></item></channel></rss>