Author Topic: Bluetooth Auto Connect For Triggering Events Is It Possible?  (Read 6274 times)

0 Members and 1 Guest are viewing this topic.

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Bluetooth Auto Connect For Triggering Events Is It Possible?
« on: August 30, 2015, 05:30:59 PM »
Hi Everyone,,

Just a quick question, is it possible and if so how for vox to show when a Bluetooth device has connected to the computer? I want to set up a few things like my door lock to the house to unlock when I get within the 10 meter Bluetooth rang after pulling into the drive.

So the Bluetooth on my smart watch or mobile would connect to the computer an event would be shown in vox and it triggers my door unlock remote code sending.

It would also serve as a great way to power save by turning off my TV when I go outside or out of the 10 meter range of the Bluetooth, then when I return back to the front room reactivate the TV.

So any help you guys can give so I can get vox listing connected and disconnected Bluetooth devices is greatly appreciated.

Cheers.
Sim  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #1 on: August 30, 2015, 05:52:33 PM »
I don't know if it is possible with Bluetooth, but if you search the forum for "ping" or "ping phones" you should find a Python script which generates events when your phone connects or disconnects to your WiFi.

Edit: Here is the thread: http://voxcommando.com/forum/index.php?topic=1301.0
« Last Edit: August 30, 2015, 05:55:24 PM by Dave »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #2 on: August 30, 2015, 06:03:49 PM »
Doesn't EventGhost generate events automatically whenever a device attaches or disconnects? You could use this.  I think it works with bluetooth devices too.

Otherwise you can try ping as suggested by Dave or maybe tasker.

There is no native support for this within VC.

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #3 on: August 30, 2015, 07:03:13 PM »
Hi Dave and James, thanks for the quick response guys, appreciated, Dave I will take a look at the ping info, James I just checked and eventghost does it so just linked it that way for now (well its showing my watch connecting but not mobile), was just wondering if vox did it natively because would prefer to remove my use of eventghost at some point.

I have got it done with tasker so when my smart watch / Bluetooth watch connects to my android left in the room to unlock it makes my broadlink send the signal to unlock the door, just wanted to replicate the same thing with my vox setup.

I think the Bluetooth eventghost option is probably better than pinging though since it's more a proximity trigger for things, where as triggering based on ping / wifi connection wouldn't disconnect over the short range I need since wifi stretches pretty far.

Great work with vox new SKIN though James, looks awesome.  8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Vangelis

  • $upporter
  • Jr. Member
  • *****
  • Posts: 34
  • Karma: 0
    • View Profile
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #4 on: September 01, 2015, 05:23:19 AM »
WiFi ping I suspect is not what you are after as most phones/tablets shutdown WiFi when sleeping to save on battery.

I have a BT setup working with my HA system to detect my (and my wife's) occupancy and it works well, however there are a couple of consideration points...

Most BT apps won't allow triggering based on multiple BT sources (i.e Watch AND Phone)

Most BT apps just detect the Connection attempt (but do not allow the full handshake) as you may not want to actually paid with a PC (and suddenly have all your calls routed though it)

Add some logic to the detection as BT has limited range and can drop out and reconnect when moving round the house (you don't want doors unlocking)

BT is not ultra secure and can be sniffed so care must be taken as to what it will be used to trigger

Vangelis

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #5 on: October 09, 2015, 06:43:26 PM »
Hi Vangelis,

Thanks for the suggestions, appreciated, every signal can be sniffed with HA appliances but we are decades away from a future where local house thieves are hacker savvy with equipment set up on streets to monitor entire streets smart appliances sending their Bluetooth, zigbee, zwave signals through the air. :biglaugh

The August smart door lock has the Bluetooth unlock feature and sells for around £228 / $350, so it is pretty cool to be able to make a Bluetooth doorlock for under £50/$76. Below is a quick demo of my smart watch unlocking the door, the smart watch only cost £10/$15.

So now as I walk up to the door it unlocks and turns on the TV, DVD, sound bar. When I leave the room to go make a tea or something it locks the door and turns the TV off into standby until I come back.

The only annoying thing is my Samsung TV has the same IR code for off as on, so if the connection drops and reconnects it turns the TV off.

Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #6 on: October 10, 2015, 03:57:45 AM »
Hi Simeon, can you tell me your Samsung TV model and also the IR code format which you send to the TV (hex or pronto)?
I'm sure there is a discret code for ON and OFF available  ;)


If you are able to convert IR codes in the format which you need by yourself, take a look here: http://files.remotecentral.com/library/3-1/samsung/index.html


Kalle
« Last Edit: October 27, 2015, 08:17:17 AM by Kalle »
***********  get excited and make things  **********

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #7 on: October 27, 2015, 02:54:05 AM »
Hi Kalle,

I am using my broadlink rm pro to send the signals to the TV and so it just learns the on and off code from the remote which is the same button. It is the same for most Samsung TVs I have noticed, I guess the thinking behind it being people either want the TV on or off so use the same code to toggle modes. :-(

That is a big problem for me since the TV will respond anytime the remote power signal is sent, so if the house auto shuts down and turns everything off and the TV is already off, then the TV turns on, not great in the middle of the night if the sound bar and TV have been left turned up lol.

My work around for this is to use a remote plug socket to turn the TV on and off.

When the remote plug goes on as long as the TV has been powered up previously it will turn the TV on and when the plug gets turned off it turns the TV off, also saves on wasted vampire energy being sucked by standby mode.

Sim
 8)
Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #8 on: October 27, 2015, 07:45:20 AM »
So the broadlink can only send codes that it has learned from an actual physical remote that you have to point at your own physical broadlink? You can't send anything else if you know the correct code? That's a real shame.

BTW standby power on a modern TV should be less than 1 watt.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #9 on: October 27, 2015, 08:23:30 AM »
If it is as James say, it is really a shame! There are a lot of discret codes for the most devices available like direct input change, On/Off, aspect-ratio, ... .
***********  get excited and make things  **********

Simeon Tuitt

  • Contributor
  • ***
  • Posts: 79
  • Karma: 0
    • View Profile
    • Simeon Tuitt Home Automation
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #10 on: October 27, 2015, 09:41:15 AM »
Hi James and Kalle, the broadlink is like an IR and RF recorder, it will learn any code direct from a remote or it has a database within the app of thousands of codes, you only usually need point a remote at it and hit power on and it fills in buttons for most devices, fans, dvds, tvs.

Once the codes are learned by it you can use the app on a mobile or smart watch to turn any RF or IR device within range on and off. I have two broadlinks one in the office upstairs and one in the front room, I have two meremly for the IR to control the TVs.

The RF signal from the broadlink reaches the whole house so it controls the lights, remote plug sockets and shuts the whole house down when I go out by turning off all devices.

So before I used the remote plug method of turning off the TV it would turn the TV on if it was already off.

Sim
 8)

Simeon Tuitt Is An Information Product Creator From The UK Who Took His Skills From Online Business Automation And Applied It To Automating A Smart Home.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #11 on: October 27, 2015, 10:28:20 AM »
Yes but the database within the app should contain codes for "POWER ON" and "POWER OFF" as well as for "POWER TOGGLE".  These on and off codes are known as discrete codes.  Pretty much any LED/LCD TV manufactured in the last 10+ years should respond to these codes even though they are not on your remote.  My Samsung TV understands a great number of codes that are not on the remote which came with it.

If those codes don't appear in the app database provided by Broadlink, then the question is why?  If it is just because Broadlink is ignorant of the other codes then the next question is: can you edit this database to add your own codes that you have obtained from other sources like the ones that Kalle mentioned and linked to on October 10th.

I don't actually know one way or the other but I suspect it might not be the healthiest thing for your TV to be frequently removing power from it when it is on.
« Last Edit: October 27, 2015, 10:40:11 AM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Bluetooth Auto Connect For Triggering Events Is It Possible?
« Reply #12 on: October 27, 2015, 11:36:17 AM »
We are almost ready to present our own IR/RF Blaster - which has no problem to send discrete codes  ;)

By the way, it is not the one which we presented here: http://voxcommando.com/forum/index.php?topic=1921.msg19518#msg19518  it is a complete different device which has a powerful API  8)

« Last Edit: October 27, 2015, 04:58:10 PM by jitterjames »
***********  get excited and make things  **********