Tutorial - Receive featured notifications from your home automatisation system

Let your home send you notifications with buttons to react to them

  1. AgP42

    this project is more a tutorial than a project that you can directly download and use because it depend so much of your home automation system and what you want to do !

    I personnaly uses Jeedom with the Jeedom-plugin that I code myself and can be found here : https://github.com/AgP42/Jeedom-TaskerAutoremote
    But I will write this tutorial on a generic way to allow anyone to use it !

    You will need : Tasker + AutoRemote (no need of AutoNotification), and an home automation system able to send http requests (so : any ! You can also use IFTTT)

    Let's start with a small overview of what you can get :

    Let's take as an example the first notification here and redo it together.
    It is a notification with a "Status bar icon", a "title", a "text" and 2 buttons associated with Tasker actions. We can also consider here that a clic on the notification itself will open the URL of your home automation system.

    Let's start from the very beginning and open AutoRemote on your android and clic on the URL to open it (or share it to open it on a computer). On the top of the page, go to "Send Notification". Here you will find all the parameters to be use for your notification and test them !

    Here let's fulfill the fields :
    • Title : "Moulin - scenario"
    • Text : the date and your message (has to be dynamically generated by your home automation system, take care to encode it correctly to be send through an url, you can use this tool to do it if not managed by your system https://meyerweb.com/eric/tools/dencoder/)
    • URL : "http://example.com" --> this is the url to be open when you will tap the notification
    • Action Button 1 : this is a Command that will be listened by Tasker, it can be just a text "btn1" or use the Tasker Command syntax "btn=:=1". We will details that after.
    • Action Button Label 1 : The label you want for this action
    • Action Button 2 : idem
    • Action Button Label 2 : idem
    • Status Bar Icon : ic_action_home
    Then clic on "Send Notification now!" to see the magic occurs !
    Great, now that your notification is ready, copy it to be used by your home automation system after the event you want. It should be something like "send GET HTTP request".
    If you are using Jeedom and the TaskerAutoRemote plugin, then fulfill all the fields you want to use directly on the plugin interface.
    If you want to use it on IFTTT, you have to look for "Webhooks" and then select "GET".

    The opening of the URL when you click on the notification will be working without further configuration, but not the button actions, let's see how to do that now :

    On Tasker, tab "Profil", create a new profil with the name you want.
    Choose "Event", then "Plugin", then "AutoRemote" and again "AutoRemote" and clic on the logo "pen" to do the configuration.
    On "Message Filter", write the text you set for "Action Button x" on the configuration of the notification. Here for example "btn1" or just "btn" if you decided previously to use the notation "btn=:=1".
    Now you can return up to the choice of the Tasker Task associated to this event. Create one that fit your need for this button.
    In the case you uses the notation "btn=:=1", you will have the possibility on the Task associated to this event to use the variable "%arcomm" that will represent the "1" (the right part after the =:=)
    You can also uses several other variables that are detailed on the AutoRemote event.

    As an example, let's create a task that will just display in a pop-up the full message received : "add"/"Alert"/"Flash" and on the field "Texte" : "Hello this is the request : %armessage".

    Let's test it :


    Great, now you know how to send very customizable AutoRemote notification and how to react to them !

    Personally I use the buttons to call tasks that triggers some scenario on my house, for example :
    - When a receive a "message", I have a button to destroy it on the home system
    - When a receive an alarm of electricity extra cost, this notification is linked to the URL of the electricity details
    - When the camera trigger an alarm, I receive a notification with the image and I can click on it to display it fullscreen
    - I also have a full system of "messages" to update some widgets state to be always up to date, without beeing spammed by notification ! But this will be the topic of another post here !

    I hope it was clear enough, if some parts need some more details, do not hesitate to ask, and if you have other methode to do it, please share I will be pleased to improve my Tasker knowledge !