New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Built-in Tasker integration #257
Comments
Agree! Along similar lines, I would like to be able to choose item names in the app which will be updated by the app based on location, motion, battery level, signal level, etc. |
openHAB Tasker integration
I'm not a Java dev, but I started studying the docs and HABdroid's source code to get things going. |
Actually, I think it would be better to create a seperated Tasker plugin which is not too tightly integrated with the Android App. That way, the plugin could be used for:
There are examples that show how a plugin for both services at once can be written. |
Thanks @hakan42 for the input! What would be the benefit of having them maintained separately? So is there anything to be done on HABdroid's side in order to communicate with the separate plugin? I found some examples already and I'm looking at the toast example from the Tasker docs, but to be fair, it's my first date with Android (I'm a JS dev) and it can take a while before I even start coding anything 🙂 |
The main reason is, I don't believe in one application that does everything. And extending the Android App into Tasker area sounds like one thing that tries to do everything. My personal philosophy is to create small tools that do one thing really well and leave it to the user to combine them into unexpected little gems. Therefore the plugin idea. You might also notice that OH2 and Tasker itself are basically a large number of plugins / addons that speak the same API. |
I get your point, but in this case we would just extend HABdroid with additional feature (like NFC or Beacon integration, the only difference being wired to third party app and not the hardware). |
I don't see a problem adding Tasker integration, as long as it does not create any new mandatory dependencies or new/higher minimum requirements that non-Tasker users would have to contend with, and does not have any impact on licensing issues. For users who are uninterested in Tasker, they see no new UIs or other changes and the app continues to work as if nothing changed for them. |
As a heavy Tasker user I'll +1 for the idea. I do not think adding support for Tasker into Habdroid itself would necessarily be apparent to users who do not use Tasker. Looking at the examples @kubawolanin mention, there is no evidence of Tasker in the main application. It is only when you go into Tasker that you find it in Plugins (I'm not sure what the distinction between Plugins and 3rd Party is within Tasker but suspect Plugin is where this would fall). At a minimum, exposing an intent that Tasker can call with the Item name update type (command or update) and state would be awesome for most commanding and sensor updates from the phone use cases. Personally that is all I would need for my use cases. This is how I control Waze and PocketCasts from Tasker and it works great. However, with a proper plugin I can see the future possibility of commanding Tasker from OH which now can be achieved somewhat awkwardly through something like Pushbullet or SMS messages. |
There was no progress on this feature for a long time, but I found an interesting repository yesterday. Besides the finding above, I started tinkering with the HABDroid code some time ago on this branch. Cheers, |
Is someone working on this? I think it would be a great idea. |
@nbmaltais I think no one is working on this yet. |
Can tasker send and receive android broadcasts? |
@mueller-ma sorry for late response. On the Tasker docs page there are some references to Here's some introduction on Tasker plugin development. Would you give it a try? Would be awesome! Cheers |
Tasker supports three different types of plugins: action, condition and event:
Event and condition plugins requires us to receive FCM messages when items update, which isn't possible right now and the same reason why #6 is blocked. Action seems doable as well, since we have #1137 merged now.
IMO we should start with action first. I'm not sure about the UI: Should the EditActivity just display a list of all items or should we display the sitemaps and let a user pick an item from there? Also following actions might be useful: |
From a user's perspective, I might not have any sitemap at all if I'm a HABPanel user. Also, I might not have the Item I want to interact with from Tasker on my sitemap. As for displaying the list of items, I would hope the list is searchable? Some users have 1000+ Items. |
I would also go for a list and not for a sitemap based Activty. |
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
Feel free to test: #1338 (comment)
I disagree with creating a new app for this. The code used for the Tasker plugin is basically just the list to pick the items from and this list can be re-used in the future for other features. |
@mueller-ma i read that it could be easily maintained within the current app source. If my readings are correct i would fully agree with you to keep it in one source. :) |
Does it make sense to send state updates to groups? |
Yes ... think e.g. roller shutters. |
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See openhab#257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This plugin works with https://play.google.com/store/apps/details?id=com.twofortyfouram.locale and https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. See #257 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
@mueller-ma As #1338 is merged, can this one be closed now? |
@mueller-ma big thanks for implementing this! :-) OH just became more powerful. |
The app now supports Tasker variables. |
Currently openHAB Android client is a standalone app, with no connections with smartphone's sensors or environment.
I think that combining the power of the app with Tasker plugin would revolutionize a way we interact with our home automation system. Or, at least, make it easier to integrate multiple Android apps with HABdroid (is it still accurate name?:))
Here's one tutorial on how to create your own Tasker plugin and a thread on that matter as well.
Best regards,
Kuba
The text was updated successfully, but these errors were encountered: