Plugin for sending event to Tasker via the network

3,497 views
Skip to first unread message

Plugin Tasker

unread,
May 6, 2015, 1:44:25 PM5/6/15
to tas...@googlegroups.com
Hello,
wer are developping a plugin for enabling Tasker to receive events from the network :

Basically, it is possible to send events via two ways :
  1) the plugin starts an HTTP server that is listening for POST events (see the documentation), which is suitable if both Tasker and the program doing the POST are on the same network.
  2) the plugin open a socketIO connection to a brocker website ( https://thacthab.herokuapp.com/ ) where you can freely add an account and use it to send events to Tasker (either via the website UI or by sending a HTTP POST to https://thacthab.herokuapp.com/broadcast , see the documentation.)

If some people are interested, we would be happy to get some feedbacks ! :)

os

unread,
Sep 27, 2015, 7:08:28 PM9/27/15
to Tasker
First of all, I wonder why nobody has left feedback here. Just found your plugin and it looks like the ONLY free plugin for tasker which provides services that I need. It could be a perfect companion to establish a link between my Linux OpenHAB-based smarthome center and Android-based voice recognizer and TTS engine (and a control panel for OpenHAB). Popular AutoRemote plugin requres (I may be wrong, I don't own that) to send data via external server, while your solution provides both internet and intranet connections.

However, I faced some issues with it and hope you may help.

First, I found that a JSON-formatted message is only decoded into tasker variables if var names are in LOWER case. That is, var=lower&VAR=capital&Var=Mixed will result in only single variable: %tte_var = lower. The others are not decoded (but still present in the %tpe_message). Since people may assume that they need a global variable (and you site shows %tpe_VARNAME as an example), it won't work and should be documented.

The other (real) issue is that I am able to send POST from cURL command line via your server, but the same command line does not work for local connection which is ignored. cURL tells about sending all data and then "Connection reset". And no any reaction from Tasker. Probably I am doing something wrong. Please advise how to debug this. I use http protocol to local address and default port 8765 which is open. No var filters used in config.

Finally, I should say thank you for such simple but great plugin. Again, I am not sure why no one has left a feedback. It really is a solution for inbound tasker control, after all. I only need to resolve the issue above.

Scott Almond

unread,
Sep 28, 2015, 8:15:53 AM9/28/15
to Tasker
I may be incorrect in identifying what exactly this plugin allows, but I suspect that there has been little interest in this since "Autoremote" allows for communication between PC and android devices and features a whole host of features. Direct network messages & gcm messages (so it doesnt matter if you are on the same network or not.). device grouping, built in notification features, chrome integration, event ghost integration (event ghost can run http server for listening and posting to, as well as allow full PC automation) payload s/variables that are fully customisable. IFTT integration, the list goes on. Maybe some more examples of what this plugin can do that can't be found elsewhere would help in gaining a little attention.

Regards

os

unread,
Sep 28, 2015, 8:50:15 AM9/28/15
to Tasker
If AutoRemote allows direct LAN communication without external server then it obviously covers what this plugin does. At the same time in many cases you do not need any of those features and all you need it to listen on a socket (instead of polling) and pass variables to tasker. So being free, I think this plugin may for some applications be a good alternative to more powerful but commercial AutoRemote.

PS. Anybody heard about MQTT publisher/subscriber plugin for Tasker?

Plugin Tasker

unread,
Jan 2, 2016, 7:37:51 AM1/2/16
to Tasker
Hello,
thanks for your interest in this plugin and sorry for the late answer, hope you will get it anyway ^_^
About your main problem, I hope you managed to find a solution. It should be no problem to send a GET or POST HTTP request to the local HTTP server of the plugin. In this case you do not need authentification so just a title and variables should be enough (e.g. ...?title=say&text=hello).
About the lower case limitation I definitly should document about it, if I remember well this choice was done to ensure that only local variables were manipulated, in any case you can set a global variable with the value of a local one in the THEN part of the rule.

Best regards,
     Alex

Plugin Tasker

unread,
Jan 2, 2016, 7:43:55 AM1/2/16
to Tasker
Hello,
well you are right, this plugin does not offer more than autoremote I think (never tried it but from the description maybe the only point is the local HTTP server). The only advantage is that TNES is free I suppose. I use it for an home automation project, and now it is easy to integrate with platforms such as IFTTT (via the maker channel).
So TNES plugin is quite simple it's true but it just provide a functionnality that I think should be standard to Tasker itself.

Best regards,
    Alex.

Le lundi 28 septembre 2015 14:15:53 UTC+2, Scott Almond a écrit :

duane1

unread,
Feb 9, 2016, 5:07:51 PM2/9/16
to Tasker
Alex,   I really like this app.  I use it for home automation to send messages over my local network from my raspberry pi to my old cell phone to speak different phrases using Tasker.   A feature which would help me a lot would be if TNES server could respond back with one or more variables.   So, if I set up several buttons on the phone display (via Tasker) and the user presses button1, then when my Pi polls the phone with a GET to TNES with the proper trigger, the response back should be button1.   I hope what I am asking makes sense.  Currently, the response from the TNES server is Hello World.   What I am asking, can you give me the capability to change that response or add another parameter that I can change.   I have searched for this capability in other apps and there doesn't appear to be any easy to use app that I could find.

Plugin Tasker

unread,
Feb 13, 2016, 3:06:34 AM2/13/16
to Tasker
Hello Duane1,
for your purpose, I would suggest that when you press the button, then Tasker send a HTTP request to your raspberry saying that button 1 has been pressed. That would be more efficient than polling techniques.
What are you using on raspberry side ?
About TNES sending back something, well it is not that easy to design based on simple HTTP request. When it receives a HTTP request, it processes it and it may trigger a rule in Tasker. I suppose that you would expect the action part of the rule to be able to specify the HTTP answer. Actually it could be possible to implement it but most of time it is not the "right" way to do things.
Tasker is really event based and asynchronous is still possible but in asynchronous way. You send  HTTP request and then wait for an answer that will be triggered. If you want to be sure that the answer is related to that specific request, you can add an identifier (by yourself) to the request and add the very same to the answer.

Hope it helps, don't hesitate to ask more !

     Alex.

Jean Dowe

unread,
Feb 13, 2016, 10:15:42 PM2/13/16
to Tasker
Had this old bit of code saved, could be useful for you.


<TaskerData sr="" dvi="1" tv="4.8u1m">
    <Task sr="task80">
        <cdate>1446361881351</cdate>
        <edate>1455419623594</edate>
        <id>80</id>
        <nme>Net Listener</nme>
        <pri>100</pri>
        <Action sr="act0" ve="7">
            <code>123</code>
            <Str sr="arg0" ve="3">busybox nc -l -p 1234</Str>
            <Int sr="arg1" val="0"/>
            <Int sr="arg2" val="1"/>
            <Str sr="arg3" ve="3">%netcat</Str>
            <Str sr="arg4" ve="3">%netcat_err</Str>
            <Str sr="arg5" ve="3"/>
        </Action>
        <Action sr="act1" ve="7">
            <code>548</code>
            <label>Just add a profile listening for the event of %Netcat variable being set if you want to do something more elaborate...</label>
            <Str sr="arg0" ve="3">%netcat</Str>
            <Int sr="arg1" val="0"/>
        </Action>
    </Task>
</TaskerData>

Message has been deleted

duane1

unread,
Feb 14, 2016, 7:20:00 PM2/14/16
to Tasker
Thanks for both replies.
Jean,  My devices are not rooted.   I guess I have a lot of constraints.

Alex,  I agree with you on the correct solution.  However, I thought it might be possible to get some capability without modifying the Pi software.  Consider the CT50 thermostat by Radio Thermostat Co.  The Pi can change the temperature by sending POST commands and the Pi can get thermostat status by sending GET messages.   I thought maybe the TNES could react the same way.  In my application, similar to the thermostat, the async timing is not critical.   Thanks for a great product though.  I still like it a lot because it is easy to use.

Plugin Tasker

unread,
Feb 15, 2016, 3:52:10 AM2/15/16
to Tasker
Indeed I see what you mean. What software are you using on Raspberry side ?

duane1

unread,
Feb 15, 2016, 4:32:13 PM2/15/16
to Tasker

Alex,

OK, I was trying to spare you from a lot of details, but maybe you will find it interesting.   I use this software:  https://github.com/LowPowerLab/RaspberryPi-Gateway


RaspberryPi Gateway Web Interface for the Moteino IoT Framework by Felix Rusu , lowpowerlab.com

Features:

•             SSL Encrypted with self signed certificate

•             auth_basic authenticated

•             realtime websocket driven using node.js and socket.io

•             neDB storage of node data and logs

•             flot front end graphs

•             nconf for easy global variable configuration maintenance

•             nodemailer for sending email (and SMS relayed via email)

•             Font-awesome icons for jQuery-Mobile


Here is my post in their forum ( I mentioned TNES).   https://lowpowerlab.com/forum/index.php/topic,1583.0.html


Since that post I have added several features to my setup, including adding a visual indication (colored Tasker rectangles) on my dedicated cell phone ( in addition to the voice announcements) for my garage door opening or getting mail.  I am getting closer adding photos  and cleaning it up for a blog post there.  It would be great to be able to press the mail rectangle on my phone screen and have the colored rectangles turn off (black) on all my phones and also on hand built devices which simply have LED indicators.  It is not good enough to do phone to phone communication.  I need to go back to the Pi so my hand built LED indicators will also go off.   However, at this point, I don’t know enough about adding a small HTTP server to the Pi and how to pass parameters to/from the existing Node.js software.

 ---- Duane

Plugin Tasker

unread,
Feb 16, 2016, 3:38:30 AM2/16/16
to Tasker
Well actully I am pretty much interested by home automation stuff so thanks for that information :)
I know pretty much well NodeJS programming. I had a look at the Monteino framework and the links you sent.
I just had a quick overlook, here is my advices for you :
1) Try to find out if there is an HTTP server somewhere and get a reference to it. Usually on NodeJS it is based on http module or express module.
2) If there is not, or if you do not want to modify it, you can install your own, I can provide you with some code for that.
3) on the server, implement 2 ressources: /register and /broadcast
    /register will be used to register Tasker platforms
    /boradcast will be used to broadcast messages to all Tasker platforms
----
Another option of you do want to only use TNES and are OK to use also internet is to register on http://thacthab.herokuapp.com
It is a small application server that can broadcast message in the very same way than previously explained. It is nice BUT you then need an internet connection.
To use it, after creating the account, you will have to fill related text inputs in each instance of TNES rules.
There is a kind of tutorial :

My advice would be to use THactHab server for prototyping what you want before implementing a "local" solution.
Let me know if it helps

Dale Montoya

unread,
Jan 22, 2019, 4:54:16 PM1/22/19
to Tasker
I would like to use this method instead of Pushbullet send a http post to Tasker from Netcam Studio to start my NetIO UI on my tablet when my front door cam detects motion. I installed the plug-in and in the configuration I set my Netcam Studio address as the remote broker address and my event name as "motion" and my filter as "motion". I created a rule in Netcam Studio to send an http request /json.htm?title=motion?text=motion to the TNES server. I am missing the step to add the variable %tpe=motion to tasker profilen or task. Could you explain how to do that in morning detail instead of the screen shot in the tutorial?

Dale Montoya

unread,
Jan 22, 2019, 4:57:23 PM1/22/19
to Tasker
More not morning.

João Dias

unread,
Jan 23, 2019, 10:06:00 AM1/23/19
to tas...@googlegroups.com
You should try out Join :) It has a very easy to use API.

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


On Tue, Jan 22, 2019 at 9:57 PM Dale Montoya <dmonto...@gmail.com> wrote:
More not morning.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Dale Montoya

unread,
Jan 23, 2019, 2:46:39 PM1/23/19
to Tasker
I want the json post to stay in my network so I would rather use TNES. I use puahbullet now and there is a lag anywhere from 5s to 30s to 2hrs. I dont want another account just to do this one action, plus it's free. Thanks for the suggestion.

Duck Redbeard

unread,
Jan 23, 2019, 7:28:30 PM1/23/19
to Tasker
It won't really be another account.  You can log in on your Gmail account.  Plus, you get the added benefits that come with having Join on other devices like PCs.  Super easy push websites, clipboard contents, messages in both directions.  Also, baked in ability to check, send, receive text messages using your other devices if your daily carry phone is on and connected to the network.  Join is super fast.

Dale Montoya

unread,
Jan 23, 2019, 8:49:16 PM1/23/19
to Tasker
I'll make you a deal, help me get TNES working and if it doesn't fit my needs, I will switch to Join.

Dale Montoya

unread,
Jan 26, 2019, 10:57:01 PM1/26/19
to Tasker
Never-mind, I figured out how to get this working and it does meet my need.  No need for my motion detects to leave my network through pushbullet or Join.  Joao's servers do not not need to see every time motion is sensed at my front door (although he is probably recording every event in tasker already).  I'll probably get another message to try Join, just because I put Pushbullet in this message.  Joao is probably the guy that is going to create Skynet.

Duckredbeard

unread,
Jan 27, 2019, 1:57:52 AM1/27/19
to Tasker
Skynet...I wonder if that is a compliment.  I'm sure he's flattered.  If you don't trust Tasker and Joao, why are you asking the Tasker community and Joao for help?

Dale Montoya

unread,
Jan 27, 2019, 11:09:05 AM1/27/19
to Tasker
I asked for help because I thought that's what this group was for when you need help. I didnt ask Joao directly, I asked a specific question with a specific explanation of where I needed help and I felt like I drove on a car sales lot with two salesmen running after me trying to sell me a Cadillac instead the Kia. The Skynet comment is because its obvious he is an extremely smart guy, but I got the same canned answer on a similar thread I asked for examples (TNES only shoes up in two therads), then I got the feeling that no matter where I ask for help with TNES, a search robot looking for words like TNES and Puahbullet, would come and destroy.

Scott Miller

unread,
Jan 27, 2019, 11:26:04 AM1/27/19
to tas...@googlegroups.com
Have you reached out to the developer of TNES? I never heard of it until you mentioned it, and looking around I see it is a plugin for Tasker, but has not been updated in nearly 3 years. With only 1000+ downloads, not many people even know what it is. That is likely the reason you are not getting much response. The responses you are getting are from people that have experience with alternative solutions. I don't use Tasker in this way, so I'm not going to be much help to you. And your request, at least in my opinion, is not clear. But if you provide more detail with your request and what you are trying to achieve, there are many helpful people watching that might be able to provide what you need. 

Scott M.

On Sun, Jan 27, 2019, 11:09 AM Dale Montoya <dmonto...@gmail.com wrote:
I asked for help because I thought that's what this group was for when you need help.  I didnt ask Joao directly, I asked a specific question with a specific explanation of where I needed help and I felt like I drove on a car sales lot with two salesmen running after me trying to sell me a Cadillac instead the Kia.  The Skynet comment is because its obvious he is an extremely smart guy, but I got the same canned answer on a similar thread I asked for examples (TNES only shoes up in two therads), then I got the feeling that no matter where I ask for help with TNES, a search robot looking for words like TNES and Puahbullet, would come and destroy.

Scott Miller

unread,
Jan 27, 2019, 11:33:01 AM1/27/19
to tas...@googlegroups.com
From the description in the play store, I would expect that the TNES plugin creates the Tasker variable %tpe_text automatically and sets its value to motion. You can then use that variable in a Tasker context or task.

Scott M.

Dale Montoya

unread,
Jan 27, 2019, 1:03:26 PM1/27/19
to Tasker
I believe the developer started the post. I knew it was a few years old, but figured I'd try. I was able to get it to work by leaving everything blank from a suggestion from another forum, but I thought of another way I can use it from another device. My understanding is that the variable is so if you have more that one device sending a command to tasker, you can name them different so tasker knows which profile to execute for the device that sent it. Still working on the URL to do that since the description on the play store or the website doesn't have an example of what the URL is supposed to contain. Thanks for your help.

Mohsen Dehghani

unread,
Mar 11, 2019, 11:14:24 AM3/11/19
to Tasker
Hello,

Sorry for this primitive request. Could you provide a complete example. I'm trying to send a URL like bellow


But I don't know how to set filters at Android Tasker plugin. 
It's ok When I don't set any filters and I get the trigger.

Any help is really appreciated.

Dale Montoya

unread,
Mar 20, 2019, 7:12:51 PM3/20/19
to tas...@googlegroups.com
Sorry for the late reply, I wanted to keep the command in my network  so I didn't use their server, the only way I got it to work was to leave everything blank.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/xqkXKKmeCvM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages