Tasker Using 'state'

Discussion in 'Guides / Examples / Ideas Forum' started by dastrix, Feb 21, 2019.

  1. dastrix

    dastrix Member

    Joined:
    Jan 8, 2019
    Messages:
    36
    Likes Received:
    0
    Hi All

    I have some profiles and tasks working just fine, but I want to add a state check into them.

    I can poll a particular device using HTTP Gets but my question is how can I do this under my profile?

    I see i can add 'state' and then variable check.

    What I did was add a state check for 'Variable Value', %myKodi_control eq PLAY. The intention is to only run this profile/task if the state = PLAY. This then will set myKodi to PAUSE and Enable my motion sensor. I know the two HTTP POSTS are working fine, as they are tested. The state is what im having issues with.

    Can someone confirm this is correct?
    Code (Text):

        Profile: Pause Kodi (13)
        Event: Phone Ringing [ Caller:* ]
        State: Wifi Connected [ SSID:Tard MAC:* IP:* Active:Yes ]
        State: Variable Value  [ %myKodi_control eq PLAY ]
        Enter: Pause Kodi & Disable Motion (11)
        A1: HTTP Post [ Server:port:https://user:password@SERVER:443 Path:rest/items/myKodi_control Data / File:pAUSE Cookies: User Agent:application/json Timeout:10 Content Type:text/plain Output File: Trust Any Certificate:Off ]
        A2: HTTP Post [ Server:port:https://user:password@SERVER:443 Path:rest/items/FibaroEye1MotionArmed Data / File:ON Cookies: User Agent:application/json Timeout:10 Content Type:text/plain Output File: Trust Any Certificate:Off ]
     
    Last edited by a moderator: Feb 22, 2019
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Use "Matches" instead of "Eq" in the condition :)
     
  3. dastrix

    dastrix Member

    Joined:
    Jan 8, 2019
    Messages:
    36
    Likes Received:
    0
    Thanks ill give that a go :)
     
: tasker

Share This Page