[PROJECT] [ANDROID] Mobile Controller - Get Your Mobile Device Status and Control Them

I have done bits and pieces with Tasker over my time here. Adding to RM rules to sync my modes with each mobile device seemed a little repetitive, even though it was only 3 devices. My developer brain kicked in and thought this could be handled more easily through an app. Not sure how or what the app may include, but something that makes notifications and commands (both via AutoRemote) easier to instigate and manage would be nice.

This project will probably need a little investigation on how sharing of profile works best, not something I have looked at in detail myself, but I do know you can restore profiles, so hoping there will be something there to allow easy sharing of updates.

Vague I know, but still happy to put it out there as something I am interested in pursuing.... Maybe I'll even install Macrodroid again and try to offer the same options there as well... :slight_smile:

2 Likes

Im a big fan of Tasker. What are you planning?

So most recently I posted about syncing my modes from HE to a variable in Tasker, with the variable then able to be used in profiles to adjust, well whatever you want. So in adjusting my RM rules on various mode changes I thought it seemed a little redundant to have to add actions for each device I was sending an AutoRemote command to. I'm thinking if I could setup a quasi-Tasker device for each mobile device chosen, I could then start to setup proxy devices to receive the same commands, i.e. one device in the RM rule to represent the group. The same could be true for sending notifications to a group of devices.

So this would all require a driver to facilitate sending commands to devices in the format expected by AutoRemote (just realised my reference to AutoNotifications when sending notifications was not accurate, will update that in a second). I may then setup an app to manage the devices and provide the ability to setup proxy (group) devices that can be referenced in rules.

And like I mentioned, making profiles that can be downloaded and easily installed by people would also be a nifty thing to have as well.

I do need to sort out my issues with commands not getting through to some of my devices, not sure if it's the config on the tablet, rules not firing, or something else.... And just as I say that my problematic tablet command works.... :slight_smile:

Thinking about it a little more, an "out-of-the-box" option to sync modes from the HE hub to the mobile device would be nice, rather than needing to setup a rule.....

Taking that a step further, syncing a device attribute with a variable in Tasker may also be something people find useful.... Maybe a temperature reading, or a contact sensor, etc. This would be a way down the road I expect. I tend to take a while with these projects.... if I get around to them :slight_smile:

2 Likes

So continuing to think out loud.... To start with I may have two core functions, a command and setting a variable.

Commands could include (based on my usage):

  • Dismissing an alarm with a certain label (like a label of "Work", which I disable when transitioning to Day Mode)
  • Turn Screen Off
  • Turn Screen On

Variable updates pushed to devices may include:

  • Mode changes
  • HE Device Attributes, configured in the new HE App and in Tasker

In addition to these, I have also, over time, setup reporting of battery status of my mobile devices back to HE using Tasker and Maker API, along with a battery sensor driver I developed. It would be nice to bring those into the fold of a common app as well, so receiving information about a mobile device and recording it. Probably need to think through this one a little more.... Well, probably need to think through it all a little more :slight_smile:

1 Like

To add to a potential feature list if you are brainstorming, using Tasker to change a virtual presence device on HE has worked great for me.

EDIT: To clarify, I was specifically referring to Profile on Tasker that sends command to a virtual Presence Device based on entering/leaving a Geofence around home. I have found that is the most reliable home presence that I have found on my Android. I tried to do similar with a iPhone Automation using Location but that requires that user approves EVERYTIME before the phone would send an HTTP Request. STUPID!!!

2 Likes

Good idea, matching a call from a device to a presence sensor in some way does sound like a nice setup.

So thinking out aloud again... a "Tasker" device could include the following capabilities:

  • Battery Sensor - capturing the Battery percentage of the device
  • Audio Volume - allowing for volume change and muting
  • LocationMode - catering for recording and adjusting mode
  • MotionSensor - Can only think that devices with an accelerometer could pass this on as motion detection, if that is desirable
  • PresenceSensor - May be able to use Wi-Fi connection as a basic for presence and pass that on to HE

Other possibilities may include the MediaController capability.... Plus others I expect.... Still a little giddy with the possibilities.... Or it could be the ~Friday nightly drinks....

How dare you speak of such things on a topic about Tasker..... :wink: Just kidding.... :smile:

BTW, commands can also originate from Chrome on a PC.... So you can initiate a command while browsing the Community....

I have something like this going right now. Tasker sends my battery percentage and charging/not charging state to Hubitat. Right now, all I use that for is to notify me at 4:00 in the morning if my phone isn't charging so I don't start the day with 25% battery. The notification is just a notification on my Inovelli Red beside my bed. It works well because it's bright enough that I wake up to plug in my phone, but not so bright that it is hard to go to sleep again after, and my headboard blocks it from my wife's vision.

1 Like

Nice.

I've taken this a step further with my tablet sitting on my Kitchen Bech plugged into a Kasa smart plug, setting up a rule to keep it between 20% and 80%, plus charging it above 60% at key times when I use it around breakfast, lunch and dinner.

This has some good potential to bring a mobile device more fully into the HE sphere :+1:

I'd be interested in

  1. Using HE modes to drive activity on the mobile device. Maybe putting the device into DND when Mode=Night, for example

  2. Some presence function. I already do this but I'm sure it could be slicker, with location tracking maybe

  3. Stopping music playing on my Sonos when my phone rings (or similar action)

  4. Definitely some opportunities for passing variable(s) from HE for Tasker to act on in some way. And in the opposite direction

1 Like

From the broader list of what has been suggested, the presence based on Wi-Fi is only one part of what I was thinking of including. There are certainly other options, including those developed by the Community to leverage Wi-Fi. I expect it won't be much of a difference to include it or not....

My main purpose for the proposal of the project was to be able to sync information between HE and the mobile device for use in Tasker profiles and sending commands to the mobile device through Tasker.

You might want to look at using EventGhost, though not sure it works on a Mac, if that's what you have.

As @sburke781 suggested I do this with event ghost. Not sure if there is a Mac equivalent.

1 Like

There's also the boot me up Scotty app for waking the PC / laptop up.

There is a thread around here with eg st code ported for hubitat. I also believe someone made a newer project for eg as well.

1 Like

Yep, I use it. Let me take a look...

This is the one I use to send commands for my mousemat lighting and to poll my ups

1 Like

Yes, I already do some of these myself. But I'm interested to see if my mobile can be more integrated into HE. Almost like a Hub Mesh for mobile devices

2 Likes

Things are starting to progress for this project. I have setup a new Git repository with the beginnings of a Mobile Device driver, effectively a copy of my Virtual Battery Sensor with the name changed. I've also added it to my HPM existing repository setup. So nothing functionally new from what is already available at this stage... but I've made a start.

I've also started to explore options for being able to share projects in Tasker, looking at how best to setup variables and what get's exported, etc. Looks like the global Vars I previously setup need to be Project Vars to make this work more seamlessly. Still some more to explore in this space.
I'll also flesh out a list of "issues" in the Git Repository to map out some sort of roadmap.

1 Like