User Tools

Site Tools


screencast

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
screencast [2020/09/15 13:11] – [Lua script] atolstovscreencast [2022/01/14 13:41] (current) – ↷ Links adapted because of a move operation emozolyak
Line 1: Line 1:
 +<WRAP center round box 60%>
 {{:sc:tronikdsign_-_logo_normal-big.png?nolink&200|}} {{:sc:tronikdsign_-_logo_normal-big.png?nolink&200|}}
 {{ :sc:logo-brewrocket_328x64_01.png?nolink&200|}} {{ :sc:logo-brewrocket_328x64_01.png?nolink&200|}}
  
 +Thanks to our partners for the visual materials provided.
 +</WRAP>
 +
 +{{ network:menu-icon-cast.png?nolink&40|}}
 ====== Screencast ====== ====== Screencast ======
 +===== Introduction =====
  
 In WebHMI, [[screens|Screens]] or [[dashboards|Dashboards]] are analogous to screens for HMI operator panels or graphic screens in SCADA systems. In WebHMI, [[screens|Screens]] or [[dashboards|Dashboards]] are analogous to screens for HMI operator panels or graphic screens in SCADA systems.
Line 16: Line 22:
   * Promptly make decisions in emergency, emergencies (fire, flooding, water, gas leaks);   * Promptly make decisions in emergency, emergencies (fire, flooding, water, gas leaks);
  
-The screencast serves to fulfil these requirements. It will provide the dispatcher with only the information it needs without having to manually switch the dispatcher part. You can create a context-sensitive environment to keep the operator focused.+The screencast serves to fulfil these requirements. You can create a context-sensitive environment to keep the operator focused. It will provide the dispatcher with only the information it needs without having to manually switch the dispatcher part.  
 + 
 +{{ network:screen_cast_gif.gif |}} 
 + 
 +==== Best practises ==== 
 +There are several typical solutions, where screencast is essential and which fully unlocks the potential of the screencast. Here it is: 
 +  * TV sets to display information, where there are no proper interfaces to interact with. Setting automatic carousel or context-sensitive system will allow having access to more information. 
 +  * Protect device's screen against dusty and damp environments, by enclosing it to IP68 case. Having no more access to touchscreen, you can use physical buttons to switch between pages or even setting the automatic carousel to reject from control at all. 
 ===== Creating and managing screencast ===== ===== Creating and managing screencast =====
 ==== Introduction ==== ==== Introduction ====
 There a several steps to start using screencast. There a several steps to start using screencast.
-  - Create a role for screencast user with necessary permissions +  - Choose existing role (e.g., Read-Only user) or create a role for screencast user with necessary permissions. 
-  - Check both dashboard's and role'permissions+  - Make sure that in the role settings proper access checked, such as "Access dashboard" and "Access Screens"
 +  - On a "Permissions" tab check both the dashboard's and the role'checkboxes are checked.
   - Create a screencast's user for an operator to login with.   - Create a screencast's user for an operator to login with.
-  - Find a special register with screencast page pointer. This is the only registry for each user who has enabled screencast mode. +  - Find a special register like "screencast_link" inside the newly-created connection named "WebHMI Screencast" with screencast page pointer. This is the only registry for each user who has enabled screencast mode. 
-  - Put some page-link e.g., "/dashboard2.php?id=1"  to screencast's link register to the dashboard via Lua script. At the creation moment, it would be empty. It is should start with ''/'' symbol. +  - Put some page-link e.g., "/dashboard2.php?id=1"  to screencast's link register to the dashboard. The best practice is doing that via Lua script. Be aware that at the time of creation it will be empty and the screencast user will see an errorThat page URL should start with ''/'' symbol. 
-  - Login with the new user credentials.+  - Login with the screencast user credentials.
  
 ==== Role ==== ==== Role ====
 +In this example, it will be a new role creation considered.
 +On the menu "Users" there is "Roles" link. Click the "New Role" button.
 {{ :sc:1_create_role.png?direct&600 |}} {{ :sc:1_create_role.png?direct&600 |}}
 +Let's edit roles permissions to be able to have access to the pages that we intended to.
 {{ :sc:2_go_edit_role.png?direct&600 |}} {{ :sc:2_go_edit_role.png?direct&600 |}}
 +Those permissions are access to dashboards and screens in the example case.
 {{ :sc:3_edit_role.png?direct&600 |}} {{ :sc:3_edit_role.png?direct&600 |}}
-==== Screencast user ==== 
  
 +==== Screencast user ====
 You need to create a new user with "Screencast mode" checkbox enabled or you can edit an existing user. You need to create a new user with "Screencast mode" checkbox enabled or you can edit an existing user.
 {{ :sc:5_add_usr.png?direct&600 |}} {{ :sc:5_add_usr.png?direct&600 |}}
-==== Permissions check ==== + 
 +==== Dashboard's permissions check ====  
 + 
 +Note that, there is also availability checkboxes for the roles in the everyone dashboard settings.
 {{ :sc:6_check_perm_dash.png?direct&600 |}} {{ :sc:6_check_perm_dash.png?direct&600 |}}
-Make sure that e.g., dashboard or screen you want to show available to a newly created role (in dashboard settings).+\\  
 +Make sure that dashboards you want to show available to a newly created role (both in dashboard settings and roles permissions).
 {{ :sc:7_fix_permissions_dash.png?direct&600 |}} {{ :sc:7_fix_permissions_dash.png?direct&600 |}}
  
Line 47: Line 70:
 The screencast link for user "**__screencast1__** will be ''wh_screencast1_link''. The screencast link for user "**__screencast1__** will be ''wh_screencast1_link''.
 \\  \\ 
-Its address will be displayed as ''D998'' for __screencast1__ user with //id = 2//, where ''998 = 1000 - userId''.+Its address will be displayed as ''D996'' for __screencast1__ user with //id = 4//, where ''996 = 1000 - userId''.
 \\  \\ 
-In the Lua editor, you can link that register with GUI. If there are multiple screencast-mode users, make sure to select the corresponding link when editing.+\\  
 +The Lua script will be considered below. 
 +In the Lua editor, you can link that register with GUI. If there are multiple screencast-mode users, make sure to select the corresponding link when editing. In the given example there are no any other registers
 {{ :sc:9_gui_picker.png?direct&600 |}} {{ :sc:9_gui_picker.png?direct&600 |}}
-While creating Lua script it would look like this:+When creating Lua scriptit would look like this:
 {{ :sc:10_lua_editor.png?direct&600 |}} {{ :sc:10_lua_editor.png?direct&600 |}}
-This script will be considered further in the text. 
-==== Lua script ==== 
-Lua script is a handler for screencast page, which will be cast to the user.  
  
 +==== Lua script ====
 +The Lua script is the handler for the screencast page that will be cast to the user.
 If you will do some research about how your system works, you will be able to create e.g., a context-sensitive system or work out the time-based rules and so on. If you will do some research about how your system works, you will be able to create e.g., a context-sensitive system or work out the time-based rules and so on.
- +As the simplest example, it is the automatic carousel considered.
-As the simplest example, you will see the automatic carousel.+
  
 <code lua> <code lua>
 +array = {"/dashboard2.php?id=1","/dashboard2.php?id=2","/dashboard2.php?id=3"}; index = 1
 +
 timestamp    = os.time() timestamp    = os.time()
- 
-array = {"/dashboard2.php?id=10","/dashboard2.php?id=13","/dashboard2.php?id=30"}; index = 1  -- array = {"/dashboard2.php?id=20","/dashboard2.php?id=19","/dashboard2.php?id=8","/dashboard2.php?id=29"}; index = 1 
-            -- Braubereich              G2                      Statuses 
 DELAY = 15; change_time = timestamp + DELAY DELAY = 15; change_time = timestamp + DELAY
  
Line 71: Line 93:
 function main (userId) function main (userId)
  
-    if os.time() >= change_time then +    if timestamp >= change_time then -- check if it is time to change page
-         +
-        index = index+1 ; if index > #array then index = 1 end+
                  
 +        index = index+1 ; if index > #array then index = 1 end -- make a loop from index values
 +                                     -- Put the link to register
         WriteReg("wh_sc1_link", array[index]); -- sc1_link (D996@WebHMI ScreenCast)         WriteReg("wh_sc1_link", array[index]); -- sc1_link (D996@WebHMI ScreenCast)
                  
-        timestamp = os.time() + 
-        change_time = timestamp + DELAY +        change_time = timestamp + DELAY -- renew change_time  
-    end+    end  
 +                                     
 +        timestamp = os.time()        --renew timestamp after logical part finished
                                         DEBUG("current link in the register ="..R("wh_sc1_link"))                                         DEBUG("current link in the register ="..R("wh_sc1_link"))
                                         DEBUG("change_time " .. os.date("%b %d %X",change_time) .. " /// " ..                                         DEBUG("change_time " .. os.date("%b %d %X",change_time) .. " /// " ..
-                                        tonumber(change_time-os.time()))+                                        .. "ETA: "tonumber(change_time-os.time()))
 end end
 </code> </code>
Line 92: Line 116:
 It is the screencast user just after signing in. A "Remember me" checkbox will help to avoid signing in for such devices, e.g., which have no input devices. It is the screencast user just after signing in. A "Remember me" checkbox will help to avoid signing in for such devices, e.g., which have no input devices.
 \\  \\ 
-Screencast mode is enabled, hence homepage for the user is ''http://192.168.1.2/screencast.php'', where 192.168.1.static IP address of the WebHMI+Screencast mode is enabled, hence homepage for the user is ''192.168.1.1/screencast.php'', where 192.168.1.static IP address of the WebHMI.
- +
-This page always redirects to the page, which set in the screencast register. As a Lua script changes it, reload will be initiated. As you can see there is the 15 seconds delay between the automatical switching+
  
 +This page always redirects to the page, which set in the screencast register. As a Lua script changes it, reload will be initiated. 
 {{ :sc:screencast-carousel.gif?direct |}} {{ :sc:screencast-carousel.gif?direct |}}
 +As you can see there is the 15 seconds delay between the automatical switching. 
  
 +===== User cases =====
 ==== Power Supply parameters monitoring ==== ==== Power Supply parameters monitoring ====
-{{ :sc:electric:param_monitoring.png?direct&544 |}} +{{ :sc:electric:param_monitoring.png?direct&689 |}} 
-For example, you can show input power energy parameters. Also, you can show them one at a time if your device's screen too small or to make it much more noticeable instead of a lot of distracting attention images.+You can show input power energy parameters using screencastThe advantage of screencasting it thatit is allowed to you to show them one at a time if your device's screen too small to do that all-at-time. 
 +In addition, it will make it much more visible, rather than distracting images. 
 +For example, you can show both digital and analogous representation to show the details and full picture. 
  
  
  
screencast.1600175466.txt.gz · Last modified: 2020/09/15 13:11 by atolstov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki