Auto Logon

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #9850
    Rich Ex
    Participant

    Hi Friends ,

    Is it possible to set up a user accoubt that has no Logon password , I am trying to set up a screen that automatically loads in Webstation .

    I have Raspberry Pi units spread around the factory that display a general information screen and its these I want to log on automatically .

    Thanks
    Rich

    #9856
    manjey73
    Participant

    Yes, it is possible

    #9857
    manjey73
    Participant

    https://yadi.sk/d/RZArYfy89mgjkw

    Strange, this plugin is not in the repository. Here is the link to the plugin that the author gave.

    Go to js and edit autologin.js my version is below with a delay of 20 seconds, which allows you to have time to change the user if necessary.

    $(document).ready(function () {
    $(“#txtUsername”).val(“operator”);
    $(“#txtPassword”).val(“1234S”);
    sleep(20000).then(() => { document.getElementById(“btnLogin”).click(); })
    });

    function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
    }

    #9859
    Mikhail
    Moderator

    Hi,
    In Rapid SCADA 6 an auto login feature will be available out of the box.

    #9864
    Rich Ex
    Participant

    Hi Mikhail & Manjey

    Thank you for you help

    Rich

    #9887
    Rich Ex
    Participant

    @manjey73

    Can you give me a little help please .
    The script is just what I need , where and how do I insert it into RS ?
    I’m thinking it need to go into the Webstation folder , Scadaweb/js/ ?? is this correct .

    Thanks
    Rich

    • This reply was modified 4 months, 1 week ago by Mikhail.
    #9924
    Rich Ex
    Participant

    Link

    • This reply was modified 4 months, 1 week ago by Mikhail.
    #9925
    Rich Ex
    Participant

    Hi Manjey

    Tried the auto log on plugin , its not working .
    Double checked al the files are in the correct place but no problem found with that .
    When I log on its just as the old way with no automation , I checked my browser (Chrome) and that is set to allow js .
    I tried changing the log on details in the $(“#txtUsername”).val(“Admin”); but this di not make any difference to the Webstation logon screen .

    Any ideas what could be happening .

    Thanks
    Rich

    #9928
    manjey73
    Participant

    The script is located in the file /scada/ScadaWeb/js/autologin.js where you specify your user and his password. It may be necessary to reboot the web to update the scripts in the browser, for example by Ctrl+F5

    #9929
    Rich Ex
    Participant

    Hi , please to report its all working great now .

    The issue was that for some reasons some errors got into Manjeys code . When I cut and pasted it Visual studio showed the ” ” ” ” characters gave errors , it reports = The character U+201c ““” is not a basic ASCII character = ,maybe we are using different keyboards not sure , anyway it works great now .

    //Working auto login with 20 sec delay …..
    $(document).ready(function () {
    $(“#txtUsername”).val(“guest”);
    $(“#txtPassword”).val(“12345”);
    sleep(20000).then(() => { document.getElementById(‘btnLogin’).click(); })
    });

    function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
    }

    Thanks for the help again
    Rich

    #9930
    manjey73
    Participant

    Exactly, this forum is slightly spoiling some characters when inserting.

    #9933
    Mikhail
    Moderator

    When inserting code, try <pre>your code </pre> tags:

    your code
    
    #9936
    manjey73
    Participant
    $(document).ready(function () {
      $("#txtUsername").val("operator");
      $("#txtPassword").val("1234S");
    sleep(20000).then(() => { document.getElementById("btnLogin").click(); })
    });
    
    function sleep(ms) {
      return new Promise(resolve => setTimeout(resolve, ms));
    }

    Strange, I have double quotes and it works. Maybe the quotation marks code is from the Russian language, but it seems they should be the same.

    If you look in HEX format, the quote code is 0x22 everywhere

    • This reply was modified 4 months, 1 week ago by manjey73.
    #9946
    Rich Ex
    Participant

    Hi , ok thanks to you both .
    Was just and observation and not in any way a criticism of the help which worked great .

    Thanks again.
    Rich

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.