AutoNotification AN Intercepting 2 Similar Notices > Combine Into 1

Discussion in 'AutoApps' started by TomTcom, Mar 23, 2015.

  1. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    Hi Joao and everyone,

    I posted this on Google+ but now that I have greater understanding I'd like to repost here only for an easier read.

    I have the Chamberlain MyQ home automation garage door opener and app. The app has a rule that does push notifications on the status as the events happen such as the door opening and closing.

    Here is how each open and closed alert looks:
    Alert Occurred
    Garage D... just closed 08:16PM Mar 22 (Yes, the alert never shows "Door" only D...)

    Alert Occurred
    Garage D... just opened 08:16PM Mar 22

    I want 1 AutoNotification alert to give me both open and close status as they occur and to clear the alerts from the app replaced with AN's.

    My primary issue is that I'm unsure how to get 2 notification's worth of variables into 1. %antext is overwritten by the last notification. Any time I attempt a variable set for %antext to %Garage as an example it doesn't work.

    Looking to discuss with anyone on this topic.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you export the profile where you set %antitle in %Garage please? (description, not xml)
     
  3. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    I did it in the task, not the profile. The profile intercepts all the notification information then using the task to change the variable. Is that wrong?

    I'll get the export for you but might be a little while.
     
  4. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    Profile: AN Garage Closed (24)
    Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
    Notification Type: Only Created Notifications
    Persistency Type: Non-Perstistent Only
    Notification Apps: Chamberlain
    Notification Title: Alert Occurred
    Get All Fields : true ]
    Enter: Garage Closed (25)
    A1: Variable Split [ Name:%antext Splitter: Delete Base:Off ]
    A2: Variable Set [ Name:%antext To:%Garage() Do Maths:Off Append:Off ]
    A3: AutoNotification [ Configuration:Title: Garage Status
    Text: %Garage
    Icon: android.resource://net.dinglisch.android.ipack.crystalhd/kfm_home
    Status Bar Icon: ic_action_car
    SubText: %Garage1 %Garage2 Package:com.joaomgcd.autonotification Name:AutoNotification Timeout (Seconds):0 ]
    A4: AutoNotification Cancel [ Configuration:Other Id: %anid
    Package: %anpackage
    Tag: %antag Package:com.joaomgcd.autonotification Name:AutoNotification Cancel Timeout (Seconds):0 ]

    Profile: AN Garage Open (23)
    Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
    Notification Type: Only Created Notifications
    Persistency Type: Non-Perstistent Only
    Notification Apps: Chamberlain
    Notification Title: Alert Occurred
    Get All Fields : true ]
    Enter: Garage Open (12)
    A1: AutoNotification Cancel [ Configuration:Other Id: %anid
    Package: %anpackage
    Tag: %antag Package:com.joaomgcd.autonotification Name:AutoNotification Cancel Timeout (Seconds):0 ]
    A2: Variable Split [ Name:%antext Splitter: Delete Base:Off ]
    A3: AutoNotification [ Configuration:Title: Garage Status
    Text: %antext4
    Icon: android.resource://net.dinglisch.android.ipack.crystalhd/kfm_home
    Status Bar Icon: ic_action_car
    Id: Garage
    SubText: %antext5%antext6 %antext7%antext8 Package:com.joaomgcd.autonotification Name:AutoNotification Timeout (Seconds):0 ]
     
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    In your AN Garage Closed profile in A2 you need to set %Garage to %antext, not the other way around. :) The way you're doing it, you're overwriting %antext with the value in %Garage() (which I'm not sure even exists)

    Hope this helps
     
    TomTcom likes this.
  6. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    This helped. I ended up creating a much more simple profile. With this information, can you tell me why I get 2 notifications? Each alert produced is actually correct, however 2 are produced and I don't know why. I am attaching the picture shortly.

    Profile: Garage Status (6)
    Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
    Notification Type: Only Created Notifications
    Persistency Type: Non-Perstistent Only
    Notification Apps: Chamberlain
    Notification Title: Alert Occurred
    Get All Fields : true ]
    Enter: Status (13)
    A1: AutoNotification Cancel [ Configuration:package: %anpackage Package:com.joaomgcd.autonotification Name:AutoNotification Cancel Timeout (Seconds):0 ]
    A2: Variable Set [ Name:%Statusone To:%antext Do Maths:Off Append:Off ] If [ %antext ~ *opened* ]
    A3: Variable Set [ Name:%Statustwo To:%antext Do Maths:Off Append:Off ] If [ %antext ~ *closed* ]
    A4: AutoNotification [ Configuration:Title: Garage Status
    Text: %Statusone
    SubText: %Statustwo Package:com.joaomgcd.autonotification Name:AutoNotification Timeout (Seconds):0 ]
     
  7. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    [​IMG]
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Give the notification an id. That way it will never create more than one ☺
     
    TomTcom likes this.
  9. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    Like a champ!!! I just made the id "status" and that was it. Now this is officially closed. I'll play around with the variables to only show what I want as I have time. Thank you very much, I really mean it!
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Great that you got it! :) Payed off in the end.
     
    TomTcom likes this.
  11. TomTcom

    TomTcom Member

    Joined:
    Mar 18, 2015
    Messages:
    124
    Likes Received:
    5
    I'm posting the final product in case anyone else needs to know how to do this. I have a question about LED but I'm opening a new thread for that.

    Profile: Garage Status (6)
    Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
    Notification Type: Only Created Notifications
    Persistency Type: Non-Perstistent Only
    Notification Apps: Chamberlain
    Notification Title: Alert Occurred
    Get All Fields : true ]
    Enter: Status (13)
    A1: Variable Set [ Name:%Statusone To:%antext Do Maths:Off Append:Off ] If [ %antext ~ *opened* ]
    A2: Variable Set [ Name:%Statustwo To:%antext Do Maths:Off Append:Off ] If [ %antext ~ *closed* ]
    A3: Variable Split [ Name:%Statusone Splitter: Delete Base:Off ]
    A4: Variable Split [ Name:%Statustwo Splitter: Delete Base:Off ]
    A5: AutoNotification [ Configuration:Title: Garage Status
    Text: %Statusone4 》 %Statusone5%Statusone6 %Statusone7 %Statusone8
    Icon: android.resource://net.dinglisch.android.ipack.crystalhd/folder_home
    Status Bar Icon: ic_action_car
    Id: status
    SubText: %Statustwo4 》 %Statustwo5%Statustwo6 %Statustwo7 %Statustwo8
    Sound: content://media/external/audio/media/1956
    LED Color: blue
    LED On: 500
    LED Off: 500
    Vibration: 0,100,0,100,0,100,0,100 Package:com.joaomgcd.autonotification Name:AutoNotification Timeout (Seconds):0 ]
    A6: AutoNotification Cancel [ Configuration:Other Id: %anid
    Package: %anpackage
    Tag: %antag Package:com.joaomgcd.autonotification Name:AutoNotification Cancel Timeout (Seconds):0 ]
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks for sharing. :)
     
    TomTcom likes this.

Share This Page