Flip a Vswitch if connected to a particular BT

Ok, so I had this weird idea, when I am on my motorcycle, when I get close to home I want my west garage door to open, but when I am in my car I want my east garage door to open.

How to determine what one I am driving would be kinda simple. Bluetooth. if I am connected to my car, then East, connected to my helmet Bluetooth, West.

IFTTT kinda of has this functionality, but its only if you connect to anything or nothing.. so that wont work. my next Idea was Tasker, as I know that can determine what BT im connected to, but tasker does not connect to HE.

Anything else? would be cool if I could get Tasker to connect to IFTTT for example, but that does not seem to be an option.

Anyone have any ideas?

Tasker can talk to HE directly using the MakerAPI :wink:


ohh.. can you point me to more detail on the makerAPI?

I concur w/ @bptworld. I have lots of Tasker Profiles that send HTTP Requests to Maker API addresses to control individual devices or to Cloud/Local endpoints to trigger rules. It will be MUCH faster than relying on IFTTT.

1 Like

when you say HTTP requests, will that work if I Am not on my local network though? is that something that runs inside of HE?

In maker API, there is a local option for each HTTP Request and a cloud one. In Tasker, do an If-then based on connected to your home Wifi. If not connected, send cloud request; if connected, send local. Same goes for the endpoints to trigger rules in RM.

Click the hub documentation link at the top of this page, then find the maker API section.

It can send an http request through the cloud.

I HIGHLY recommend Tasker for this. I have an old Android that all it does is take Notifications from Wyze, Eufy Doorbell, and Amcrest Cameras (which do not integrate with HE) and send HTTP Requests to HE to control virtual motion sensors or trigger rules. Since it is always at home, I use local for this case. And it's fast & reliable so far.

You can also use Tasker as another presence sensor while your at it.

1 Like

wow.. seems as I have some exploring to do. ugg.

You can see a couple of example Tasker to HE setups on my soon to be release app Location Tracker.

Local won't work cause I am using my phone to determine what vehicle I am driving by BT connection.

@stephen_nutt said he uses the local Maker API endpoint beause that’s what works for him in that specific use case.

As I mentioned (and he did as well in a previous post), Maker API has cloud endpoints too.

Take a look at the documentation if you’re unfamiliar with it.

Yeah, won't work in your specific example but it is an option when you know or might be connected to home network. Most of my endpoint triggered rules have a cloud and local option.

so after some poking around.

I am sure that some of what you sugested could have been more simple, I don't know

I used Tasker, I have it running on my phone, when it sees the BT connection, it uses a supplemental application called "Join" that flips an IFTTT switch.

from there, I have a rule, when I get close if the switch is on, open the East Garage, if the switch is OFF then the West garage opens.

funny, the JOIN is called "Maker" also, this was not what you were talking about I assume

edit: (addition)

I read up on Maker API and that did work also, just have Tasker send a POST to that URL.. not a bad idea. obvioulsy there is a bit more open security attached to doing this as I have to expose the switch, but the fact that I can select only this switch, the worse case is that someone forces me to open the other garage when I get close.. lol

thanks for all the pointers!

you could have a sensor fitted to each vehical
on my bike i have a smarthings sessor and when it departes the garage door opens.

could have a pre condition (virtual switch) of your mobile presance then wich vehical to triger the action. Probaly do it with on rule in rule machine, using waite for event

I did get it to work. I have Tasker sending a MakerAPI and flipping a switch. IF BT from my helmet is connected, then the switch is on, if it's not on my helmet it goes off (or turns off if my car is attached just in case) .

then I have a geo rule, when I am close, it reads the switch and opens the appropriate garage

1 Like

The OAuth2 security is actually very good. The http post to the Maker API will be via https, so everything is encrypted when using a Hubutat cloud endpoint, including the URL. Nothing is transmitted or received in clear text. The is exactly the same way your phone communicates with most all cloud providers that do not require you to log in every time your device connects.

Keeping IFTTT out of the equation will definitely speed things up and make it more reliable.

1 Like

isn't the URL clear text , that has all the little key things in them.. it does not matter, I am not worried about it.