Advertisement
Guest User

MainTask

a guest
Oct 12th, 2020
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.57 KB | None | 0 0
  1. SG Get And Set Heating Status (38)
  2. A1: AutoInput Unlock Screen [ Configuration:Unlocking Screen.
  3. A2: Flash [ Text:Getting and setting states Long:Off ]
  4. A3: Variable Set [ Name:%smarthingsNexusApp To:running Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  5. A4: Variable Set [ Name:%SG_downHeating To:polling Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  6. A5: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  7. A6: Delete File [ File:Pictures/Screenshots/DHW_Now.png Shred Level:0 Use Root:Off Continue Task After Error:On ]
  8. A7: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
  9. A8: Launch App [ Package/App Name:SmartThings Data: Exclude From Recent Apps:Off Always Start New Copy:On ]
  10. A9: AutoInput UI Query [ Configuration:App Package: com.samsung.android.oneconnect
  11. Variables: systemairconditioner
  12. Only Visible: true Timeout (Seconds):20 ]
  13. A10: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
  14. A11: AutoInput Action [ Configuration:Type: Text
  15. Value: System air conditioner
  16. Action : Click Timeout (Seconds):23 ]
  17. A12: AutoInput UI Query [ Configuration:App Package: com.samsung.android.oneconnect
  18. Variables: 320001 Timeout (Seconds):20 ]
  19. A13: AutoInput Action [ Configuration:Type: Text
  20. Value: 32:00:01
  21. Action : Click Timeout (Seconds):23 ]
  22. A14: AutoInput UI Query [ Configuration:App Package: com.samsung.android.oneconnect
  23. Variables: indoor Timeout (Seconds):20 ]
  24. A15: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
  25. A16: AutoInput Screen Capture [ Configuration:Stopping video capture Timeout (Seconds):200 ]
  26. A17: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
  27. A18: AutoInput Screen Capture [ Configuration:Screenshot Path: /storage/emulated/0/Pictures/Screenshots/DHW_Now.png
  28. Crop : 60,554,199,248
  29. Palette: true
  30. Compare : /storage/emulated/0/Pictures/Screenshots/DHW_Off.png Timeout (Seconds):22 ]
  31. A19: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_Now.png Store Result In:%DHW_Now_MD5 Use Root:Off Continue Task After Error:On ]
  32. A20: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_Off.png Store Result In:%DHW_OFF_MD5 Use Root:Off Continue Task After Error:On ]
  33. A21: Perform Task [ Name:Get Target Heating States Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  34. A22: If [ %aiscreenshotsequal neq true ]
  35. A23: If [ %SG_downstairsHeatingTarget eq False ]
  36. A24: Flash [ Text:Downstairs heating is on, so turning it off Long:Off ]
  37. A25: AutoInput Action [ Configuration:Type: Point
  38. Value: 170,633
  39. Action : Click Timeout (Seconds):23 ]
  40. A26: Variable Set [ Name:%SG_downHeating To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  41. A27: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  42. A28: Else If [ %SG_downstairsHeatingTarget eq True ]
  43. A29: Flash [ Text:Downstairs heating is on, so doing nothing Long:Off ]
  44. A30: Variable Set [ Name:%SG_downHeating To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  45. A31: End If
  46. A32: Else If [ %DHW_Now_MD5 eq %DHW_OFF_MD5 ]
  47. A33: If [ %SG_downstairsHeatingTarget eq False ]
  48. A34: Flash [ Text:Downstairs heating is off, so doing nothing Long:Off ]
  49. A35: Variable Set [ Name:%SG_downHeating To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  50. A36: Else If [ %SG_downstairsHeatingTarget eq True ]
  51. A37: Flash [ Text:Downstairs heating is off, so turning it on Long:Off ]
  52. A38: AutoInput Action [ Configuration:Type: Point
  53. Value: 170,633
  54. Action : Click Timeout (Seconds):23 ]
  55. A39: Variable Set [ Name:%SG_downHeating To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  56. A40: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  57. A41: End If
  58. A42: Else
  59. A43: Flash [ Text:Downstairs Heating Status Unknown! Long:Off ]
  60. A44: Variable Set [ Name:%SG_downHeating To:error Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  61. A45: End If
  62. A46: Variable Set [ Name:%aiscreenshotsequal To:false Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  63. A47: Variable Set [ Name:%SG_hwTemp To:polling Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  64. A48: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  65. A49: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
  66. A50: AutoInput Action [ Configuration:Stored Action: SmartThings - 'DHW' - Click Timeout (Seconds):23 ]
  67. A51: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
  68. A52: AutoInput Screen Capture [ Configuration:Screenshot Path: /storage/emulated/0/Pictures/Screenshots/DHW_Whole_Screen.png
  69. Palette: true Timeout (Seconds):200 ]
  70. A53: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
  71. A54: AutoInput Screen Capture [ Configuration:Screenshot Path: /storage/emulated/0/Pictures/Screenshots/DHW_Now.png
  72. Crop : 60,554,199,248
  73. Palette: true
  74. Compare : /storage/emulated/0/Pictures/Screenshots/DHW_Off.png Timeout (Seconds):200 ]
  75. A55: AutoTools OCR [ Configuration:Image: /storage/emulated/0/Pictures/Screenshots/DHW_Whole_Screen.png
  76. Area: 554,1992,775,2115 Timeout (Seconds):60 ]
  77. A56: Variable Set [ Name:%SG_hwTemp To:%atocrvalue() Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  78. A57: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  79. A58: Write File [ File:AutoTools/ocr.txt Text:%atocrvalue() Append:On Add Newline:On ]
  80. A59: Variable Set [ Name:%SG_hwState To:polling Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  81. A60: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  82. A61: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_Now.png Store Result In:%DHW_Now_MD5 Use Root:Off ]
  83. A62: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_On.png Store Result In:%DHW_ON_MD5 Use Root:Off ]
  84. A63: Perform Task [ Name:Get Target Heating States Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  85. A64: If [ %aiscreenshotsequal eq true ]
  86. A65: If [ %SG_HotWaterTarget eq False ]
  87. A66: Flash [ Text:Hot Water is off, so doing nothing Long:Off ]
  88. A67: Variable Set [ Name:%SG_hwState To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  89. A68: Else If [ %SG_HotWaterTarget eq True ]
  90. A69: Flash [ Text:HOT WATER is off, so turning it on Long:Off ]
  91. A70: AutoInput Action [ Configuration:Type: Point
  92. Value: 170,633
  93. Action : Click Timeout (Seconds):23 ]
  94. A71: Variable Set [ Name:%SG_hwState To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  95. A72: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  96. A73: End If
  97. A74: Else If [ %DHW_Now_MD5 eq %DHW_ON_MD5 ]
  98. A75: If [ %SG_HotWaterTarget eq True ]
  99. A76: Flash [ Text:Hot Water is on, so doing nothing Long:Off ]
  100. A77: Variable Set [ Name:%SG_hwState To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  101. A78: Else If [ %SG_HotWaterTarget eq False ]
  102. A79: Flash [ Text:HOT WATER is on, so turning it off Long:Off ]
  103. A80: AutoInput Action [ Configuration:Type: Point
  104. Value: 170,633
  105. Action : Click Timeout (Seconds):23 ]
  106. A81: Variable Set [ Name:%SG_hwState To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  107. A82: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  108. A83: End If
  109. A84: Else
  110. A85: Flash [ Text:DHW is unknown! Long:Off ]
  111. A86: Variable Set [ Name:%SG_hwState To:error Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  112. A87: End If
  113. A88: Variable Set [ Name:%aiscreenshotsequal To:false Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  114. A89: Variable Set [ Name:%SG_upHeating To:polling Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  115. A90: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  116. A91: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
  117. A92: AutoInput Action [ Configuration:Type: Text
  118. Value: Navigate up
  119. Action : Click Timeout (Seconds):23 ]
  120. A93: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
  121. A94: AutoInput Action [ Configuration:Type: Text
  122. Value: 32:00:00
  123. Action : Click Timeout (Seconds):23 ]
  124. A95: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
  125. A96: AutoInput Action [ Configuration:Type: Text
  126. Value: INDOOR
  127. Action : Click Timeout (Seconds):23 ]
  128. A97: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
  129. A98: AutoInput Screen Capture [ Configuration:Screenshot Path: /storage/emulated/0/Pictures/Screenshots/DHW_Now.png
  130. Crop : 60,554,199,248
  131. Palette: true
  132. Compare : /storage/emulated/0/Pictures/Screenshots/DHW_Off.png Timeout (Seconds):200 ]
  133. A99: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_Now.png Store Result In:%DHW_Now_MD5 Use Root:Off Continue Task After Error:On ]
  134. A100: Test File [ Type:MD5 Data:Pictures/Screenshots/DHW_On.png Store Result In:%DHW_ON_MD5 Use Root:Off Continue Task After Error:On ]
  135. A101: Perform Task [ Name:Get Target Heating States Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
  136. A102: If [ %aiscreenshotsequal eq true ]
  137. A103: If [ %SG_UpstairsHeatingTarget eq False ]
  138. A104: Flash [ Text:Upstairs heating is off so doing nothing Long:Off ]
  139. A105: Variable Set [ Name:%SG_upHeating To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  140. A106: Else If [ %SG_UpstairsHeatingTarget eq True ]
  141. A107: Flash [ Text:Upstairs heating is off so turning it on Long:Off ]
  142. A108: AutoInput Action [ Configuration:Type: Point
  143. Value: 170,633
  144. Action : Click Timeout (Seconds):23 ]
  145. A109: Variable Set [ Name:%SG_upHeating To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  146. A110: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  147. A111: End If
  148. A112: Else If [ %DHW_Now_MD5 eq %DHW_ON_MD5 ]
  149. A113: If [ %SG_UpstairsHeatingTarget eq True ]
  150. A114: Flash [ Text:Upstairs heating is on so doing nothing Long:Off ]
  151. A115: Variable Set [ Name:%SG_upHeating To:True Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  152. A116: Else If [ %SG_UpstairsHeatingTarget eq False ]
  153. A117: Flash [ Text:Upstairs heating is on so turning it off Long:Off ]
  154. A118: AutoInput Action [ Configuration:Type: Point
  155. Value: 170,633
  156. Action : Click Timeout (Seconds):23 ]
  157. A119: Variable Set [ Name:%SG_upHeating To:False Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  158. A120: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
  159. A121: End If
  160. A122: Else
  161. A123: Flash [ Text:Upstairs heating is unknown! Long:On ]
  162. A124: Variable Set [ Name:%SG_upHeating To:error Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  163. A125: End If
  164. A126: Variable Set [ Name:%smarthingsNexusApp To:idle Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ]
  165. A127: Perform Task [ Name:SG Update Heating Status Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off Local Variable Passthrough:Off Limit Passthrough To: Reset Return Variable:Off Allow Overwrite Variables:Off ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement