AutoTools Web Screen - programatic update via Tasker actions

Discussion in 'AutoApps' started by JoeForte, Oct 29, 2018.

  1. JoeForte

    JoeForte New Member

    Joined:
    Oct 29, 2018
    Messages:
    2
    Likes Received:
    0
    Trying to create a dynamic user interface using Tasker. Found the AutoTools plugin, specifically its Web Screens. I'm trying to show a webscreen using default values, then update/add html based on subsequent Tasker actions. EG: 1) display a webscreen overlay; 2) use tasker actions to read a local file, parse the contents, perform some manipulation and then 3) update the webscreen with new content based on this processing.

    Can't find any way to access Webscreen variables in Tasker actions (other than the configuration page in the original action). Am I missing something? Is there any way to expose webscreen variables to other tasker actions so they can be manipulated?

    If not, has anyone done something similar with Tasker Scenes, forget AutoTools Webscreens altogether?

    Basically just looking to build a dynamic UI in Tasker, programatically changing it based on various tasker actions.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What you need to do is update the webscreen by "showing" it again :) If it's already showing, it'll update with the new values.
    To get data out of a webscreen and into Tasker you need to send a command from it so Tasker can catch it.
    Check here.
    Hope this helps!
     
  3. JoeForte

    JoeForte New Member

    Joined:
    Oct 29, 2018
    Messages:
    2
    Likes Received:
    0
    Thanks Joao, I'm experimenting with Autoapps.sendcommand in javascript to send info out of the webscreen back to Tasker. It's really the reverse that I want to do however -- send data from tasker back to the webscreen. Not just webscreen variables, but regular tasker variables.

    Are regular tasker variables accessible from javascript embedded in the webscreen (ie: similar to tasker scenes)? Alternatively, is there a way to update a webscreen variable from an external tasker action (eg:

    A1: initialize Autotools web screen, config webscreen variables with initial values
    A2: do some additional processing (read from local text file, parse the text, wait X milliseconds, etc.)
    A3: update webscreen variables and redisplay the original webscreen?
    or A3: update local tasker variables, redisplay the original webscreen and use javascript to access those "external" tasker variables?
    A4: loop back to A2 and repeat

    Basically I want to have a loop in Tasker that reads a line at a time from a local text file, parse out values, then update the webscreen with new divs, updated formatting, scroll the page, etc. Ideally this looks "smooth" and real-time to the user -- not a hard reload of the page and showing the top of the page every time, but rather adding new divs at the bottom and smoothly scrolling them into view.

    Is this do-able?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Oh, sorry, that's not doable right now, no. The most you can do right now is really reload the full screen, sorry! A workaround would be to have a web server where you would update those variables and then on the screen you could request them from the server, but not sure if you're up for that :) Maybe using the Jsonbin API? :)
     

Share This Page