diff --git a/atom.xml b/atom.xml index 0078415c18..bd1fbed15f 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ @@ -13,6 +13,160 @@ Octopress + + <![CDATA[iBeacons: How to track things that can’t track themselves (part II)]]> + + 2016-05-26T11:06:12+00:00 + https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii + This post is by Home Assistant contributor Greg Dowling.

+ +

In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

+ +

Tracking things using iBeacons

+

In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

+ +

But beacons don’t have to be fixed.

+ +

Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

+ +

If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

+ +

So if you put an iBeacon on your keys or in your car - then you can track them.

+ +

+ + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

+ + + +

It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.

+ +

You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.

+ +

+ +

+ +

Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.

+ +

Because you turned Share on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.

+ +

+ +

+ +

If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the device_tracker.beacon_car move together.

+ +

If you park your car and go shopping - device_tracker.beacon_car will stop moving.

+ +

With the basic tracking working - you can use automation to do things like open your gates if your car comes home

+ +
+
automation:
+    - alias: 'Open gate'
+      trigger:
+        - platform: state
+          entity_id: device_tracker.beacon_car
+          from: 'not_home'
+          to: 'home'
+      condition:
+        - condition: state
+          entity_id: switch.gate
+          state: 'off'
+      action:
+          service: switch.turn_on
+          entity_id: switch.gate
+
+
+
+ +

Or warn you if you leave your keys behind

+ +
+
automation:
+  - alias: 'Forgotten keys'
+    trigger:
+      platform: template
+      value_template: '{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
+    condition:
+      condition: template
+      value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
+    action:
+      service: script.turn_on
+      entity_id: script.send_key_alert
+
+  - alias: 'Forgotten keys - cancel'
+    trigger:
+      platform: template
+      value_template: '{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'
+    condition:
+      - condition: state
+        entity_id: script.send_key_alert
+        state: 'on'
+    action:
+      service: script.turn_off
+      entity_id: script.send_key_alert
+
+
+
+ +
+
script:
+  send_key_alert:
+    sequence:
+      - delay:
+          minutes: 2
+      - service: notify.notify
+        data:
+            message: 'You forgot your keys'
+            target: 'device/gregs_iphone'
+
+
+
+ +

(The delay is needed for two reasons: -
+1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
+2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)

+ +

Using both types of iBeacons at the same time

+

Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.

+ +

+ +

+

Long range / High power beacon

+ +

+ +

+

Waterproof beacon

+ +

Buying Beacons

+

This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.

+ +

I’ve bought quite a few iBeacons from a company called Blue Sense Networks. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.

+ +

All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.

+ +

I bought some other beacons from a US/Polish startup called Estimote, who I think are better known. I bought a developer pack of 10 of their nearables which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!

+ +

I’ve mainly used these as devices to track rather that location beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was you can’t yet).

+ +

The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!

+ +

Conclusion

+

As I said in part 1, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.

+ +

I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.

+ +

Notes

+ +

Please see the notes at the end of Part 1 for documentation information.

+ +]]>
+
+ <![CDATA[Raspberry Pi all-in-one installer]]> @@ -1009,191 +1163,6 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc
  • Bug fixes and improvements by @persandstrom, @fabaff, @balloob, @pavoni, @philipbl, @MartinHjelmare, @rmkraus, @molobrakos, @lukas-hetzenecker, @TangoAlpha, @deisi, @Danielhiversen, @roqeer, @jaharkes
  • -]]> -
    - - - <![CDATA[Classifying the Internet of Things]]> - - 2016-02-12T06:31:00+00:00 - https://home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things - The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light.

    - -

    Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both.

    - -

    State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness.

    - -

    Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval.

    - -

    The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked.

    - -

    We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations:

    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ClassifierDescription
    Assumed State - We are unable to get the state of the device. Best we can do is to assume the state based on our last command. -
    Cloud Polling - Integration of this device happens via the cloud and requires an active internet connection. Polling the state means that an update might be noticed later. -
    Cloud Push - Integration of this device happens via the cloud and requires an active internet connection. Home Assistant will be notified as soon as a new state is available. -
    Local Polling - Offers direct communication with device. Polling the state means that an update might be noticed later. -
    Local Push - Offers direct communication with device. Home Assistant will be notified as soon as a new state is available. -
    - -

    The background to how we got to these classifiers can be read after the break.
    -

    - -

    State

    - -

    How state is communicated can be broken down into 5 categories. They are not mutually exclusive - a device state can be available both via the cloud and local connectivity.

    - -

    No state available

    -

    These are devices that do not have the capabilities to make their state available. They only allow to be controlled. For example, devices with infrared remote controls like TVs and ACs. You can press the turn on button on the remote but can only assume that your command was received and executed successfully. The device might not be powered or something is blocking the infrared receiver.

    - -

    Home automation will have to approach such devices based on the assumption that it’s commands are received correctly: using optimistic updates. This means that after sending a command it will update the state of the device as if the command was received successfully.

    - -

    Advantages:

    - -
      -
    • None
    • -
    - -

    Disadvantages:

    - -
      -
    • Home automation will assume the wrong state if the the command is not received correctly or if the device is controlled in any other way outside of the home automation system.
    • -
    - -

    Polling the cloud

    -

    These are devices that will only report their state to their own cloud backend. The cloud backend will allow reading the state but will not notify when a new state has arrived. This requires the home automation to check frequently if the state has been updated.

    - -

    Advantages:

    - -
      -
    • Able to control devices while at home or away.
    • -
    • Cloud has access to more computing power to mine the device data to suggest optimizations to the user.
    • -
    - -

    Disadvantages:

    - -
      -
    • It doesn’t work if the internet is down or the company stops support.
    • -
    • You are no longer in control about who has access to your data.
    • -
    - -

    Cloud pushing new state

    -

    All off the previous section applies to this one. On top of that the cloud will now notify the home automation when a new state has arrived. This means that as soon as the cloud knows, the home automation knows.

    - -

    Advantages:

    - -
      -
    • New state known as soon as available in the cloud.
    • -
    - -

    Polling the local device

    -

    These devices will offer an API that is locally accessible. The home automation will have to frequently check if the state has been updated.

    - -

    Advantages:

    - -
      -
    • Does not depend on the internet
    • -
    - -

    Disadvantages:

    - -
      -
    • To be pollable, a device needs to be always online which requires the device to be connected to a power source.
    • -
    - -

    Local device pushing new state

    -

    The best of the best. These devices will send out a notice when they get to a new state. These devices usually use a home automation protocol to pass it’s message to a hub that will do the heavy lifting of managing and notifying subscribers

    - -

    Advantages:

    - -
      -
    • Near instant delivery of new states.
    • -
    • Able to get a long battery life by going into deep sleep between state updates.
    • -
    - -

    Disadvantages:

    - -
      -
    • If it does not also support polling, home automation will not be made aware of the state after booting up until it changes.
    • -
    • If using deep sleep and wifi, will suffer a delay when waking up because connecting to WiFi and receiving an IP takes time.
    • -
    - -

    Control

    - -

    Controlling a device can, just like state, be done through cloud and/or local connectivity. But the more important part of control is knowing if your command was a success and the new state of the device.

    - -

    No control available

    -

    These devices are not able to be controlled. They will only offer state.

    - -

    Poll State after sending command

    -

    These devices will require the state to be polled after sending a command to see if a command was successfull.

    - -

    Advantages:

    - -
      -
    • The state will be known right after the command was issued.
    • -
    - -

    Disadvantages:

    - -
      -
    • It can take time before the state gets updated. How often do we poll and how long do we wait till we consider the command failed? Also, a state may change because of other factors. Difficult to determine if the updated state is because of our command.
    • -
    - -

    Device pushes state update

    -

    These devices will not return a new state as a result of the command but instead will push a new state right away. The downside of this approach is that we have to assume that a state update coming in within a certain period of time after a command is related to the command.

    - -

    Command returns new state

    -

    The very best. These devices will answer the command with the new state after executing the command.

    - -

    Classifying Home Assistant

    -

    Home Assistant tries to offer the best experience possible via its APIs. There are different ways of interacting with Home Assistant but all are local.

    - -
      -
    • State polling is available via the REST API
    • -
    • There is a stream API that will push new states as soon as they arrive to subscribers. This is how the frontend is able to always stay in sync.
    • -
    • Calling a service on Home Assistant will return all states that changed while the service was executing. This sadly does not always include the new state of devices that push their new state, as they might arrive after the service has finished.
    • -
    ]]>
    diff --git a/blog/2014/12/18/website-launched/index.html b/blog/2014/12/18/website-launched/index.html index 6e1b93839a..f97d0cf5fe 100644 --- a/blog/2014/12/18/website-launched/index.html +++ b/blog/2014/12/18/website-launched/index.html @@ -179,6 +179,12 @@ diff --git a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html index a161bf2955..4115356ac0 100644 --- a/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html +++ b/blog/2014/12/26/home-control-home-automation-and-the-smart-home/index.html @@ -234,6 +234,12 @@ This article will try to explain how they all relate.

    diff --git a/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html b/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html index 2233774c6c..e7bf57c816 100644 --- a/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html +++ b/blog/2015/01/04/hey-pushbullet-nice-talking-to-you/index.html @@ -218,6 +218,12 @@ api_key=ABCDEFGHJKLMNOPQRSTUVXYZ diff --git a/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html b/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html index 0a7b197dce..3fe3b3000e 100644 --- a/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html +++ b/blog/2015/01/11/bootstrapping-your-setup-with-discovery/index.html @@ -193,6 +193,12 @@ diff --git a/blog/2015/01/13/nest-in-da-house/index.html b/blog/2015/01/13/nest-in-da-house/index.html index 4186f6e070..1627101b11 100644 --- a/blog/2015/01/13/nest-in-da-house/index.html +++ b/blog/2015/01/13/nest-in-da-house/index.html @@ -196,6 +196,12 @@ password=YOUR_PASSWORD diff --git a/blog/2015/01/24/release-notes/index.html b/blog/2015/01/24/release-notes/index.html index a1a281b337..3694ac673a 100644 --- a/blog/2015/01/24/release-notes/index.html +++ b/blog/2015/01/24/release-notes/index.html @@ -202,6 +202,12 @@ Home Assistant now supports --open-ui and --demo-mode diff --git a/blog/2015/02/08/looking-at-the-past/index.html b/blog/2015/02/08/looking-at-the-past/index.html index c8a7a65132..8e58ecf9f8 100644 --- a/blog/2015/02/08/looking-at-the-past/index.html +++ b/blog/2015/02/08/looking-at-the-past/index.html @@ -210,6 +210,12 @@ Events are saved in a local database. Google Graphs is used to draw the graph. D diff --git a/blog/2015/02/24/streaming-updates/index.html b/blog/2015/02/24/streaming-updates/index.html index 7342fde8b3..26efd5d292 100644 --- a/blog/2015/02/24/streaming-updates/index.html +++ b/blog/2015/02/24/streaming-updates/index.html @@ -195,6 +195,12 @@ diff --git a/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html b/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html index 28bccbfbb5..51a6920547 100644 --- a/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html +++ b/blog/2015/03/01/home-assistant-migrating-to-yaml/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2015/03/08/new-logo/index.html b/blog/2015/03/08/new-logo/index.html index de5719160f..5784dc7c98 100644 --- a/blog/2015/03/08/new-logo/index.html +++ b/blog/2015/03/08/new-logo/index.html @@ -186,6 +186,12 @@ The old logo, the new detailed logo and the new simple logo. diff --git a/blog/2015/03/11/release-notes/index.html b/blog/2015/03/11/release-notes/index.html index 250df7685c..bac3d070e9 100644 --- a/blog/2015/03/11/release-notes/index.html +++ b/blog/2015/03/11/release-notes/index.html @@ -225,6 +225,12 @@ An initial version of voice control for Home Assistant has landed. The current i diff --git a/blog/2015/03/22/release-notes/index.html b/blog/2015/03/22/release-notes/index.html index 389f257342..e56674ab1f 100644 --- a/blog/2015/03/22/release-notes/index.html +++ b/blog/2015/03/22/release-notes/index.html @@ -262,6 +262,12 @@ I (Paulus) have contributed a scene component. A user can create scenes that cap diff --git a/blog/2015/04/25/release-notes/index.html b/blog/2015/04/25/release-notes/index.html index e4045ba63e..787ade85e8 100644 --- a/blog/2015/04/25/release-notes/index.html +++ b/blog/2015/04/25/release-notes/index.html @@ -273,6 +273,12 @@ diff --git a/blog/2015/05/09/utc-time-zone-awareness/index.html b/blog/2015/05/09/utc-time-zone-awareness/index.html index ffc89a25bd..d6bdba133e 100644 --- a/blog/2015/05/09/utc-time-zone-awareness/index.html +++ b/blog/2015/05/09/utc-time-zone-awareness/index.html @@ -208,6 +208,12 @@ diff --git a/blog/2015/05/14/release-notes/index.html b/blog/2015/05/14/release-notes/index.html index f5de3d76ae..db7ee529c5 100644 --- a/blog/2015/05/14/release-notes/index.html +++ b/blog/2015/05/14/release-notes/index.html @@ -300,6 +300,12 @@ Before diving into the newly supported devices and services, I want to highlight diff --git a/blog/2015/06/10/release-notes/index.html b/blog/2015/06/10/release-notes/index.html index f40d1fd33e..9e626acec6 100644 --- a/blog/2015/06/10/release-notes/index.html +++ b/blog/2015/06/10/release-notes/index.html @@ -353,6 +353,12 @@ This switch platform allows you to control your motion detection setting on your diff --git a/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html b/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html index a9657d2832..1e8acad9b1 100644 --- a/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html +++ b/blog/2015/07/11/ip-cameras-arduino-kodi-efergy-support/index.html @@ -305,6 +305,12 @@ Fabian has added support for Forecast.io to g diff --git a/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html b/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html index 2eadfa35c2..28851f2e93 100644 --- a/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html +++ b/blog/2015/08/09/mqtt-raspberry-pi-squeezebox-asuswrt-support/index.html @@ -294,6 +294,12 @@ Support for Temper temperature sensors has been contributed by +
  • + iBeacons: How to track things that can’t track themselves (part II) +
  • + + +
  • Raspberry Pi all-in-one installer
  • @@ -317,12 +323,6 @@ Support for Temper temperature sensors has been contributed by - 0.19: Empowering scripts and Alexa - - - diff --git a/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html b/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html index ba4dd244a2..f507619d9b 100644 --- a/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html +++ b/blog/2015/08/17/verisure-and-modern-tp-link-router-support/index.html @@ -204,6 +204,12 @@ diff --git a/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html b/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html index 6b736182f1..5543d0623b 100644 --- a/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html +++ b/blog/2015/08/26/laundry-automation-with-moteino-mqtt-and-home-assistant/index.html @@ -317,6 +317,12 @@ The automation and script syntax here is using a deprecated and no longer suppor diff --git a/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html b/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html index 884eebf9e0..7f69353613 100644 --- a/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html +++ b/blog/2015/08/31/version-7-revamped-ui-and-improved-distribution/index.html @@ -291,6 +291,12 @@ diff --git a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html index d4d5ba1425..ba15fd1d73 100644 --- a/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html +++ b/blog/2015/09/11/different-ways-to-use-mqtt-with-home-assistant/index.html @@ -494,6 +494,12 @@ PubSubClient client(ethClient); diff --git a/blog/2015/09/13/home-assistant-meets-ifttt/index.html b/blog/2015/09/13/home-assistant-meets-ifttt/index.html index a22d2dbced..3d04fa2222 100644 --- a/blog/2015/09/13/home-assistant-meets-ifttt/index.html +++ b/blog/2015/09/13/home-assistant-meets-ifttt/index.html @@ -353,6 +353,12 @@ diff --git a/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html b/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html index 9519dbb298..d588e9a90f 100644 --- a/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html +++ b/blog/2015/09/18/monitoring-with-glances-and-home-assistant/index.html @@ -254,6 +254,12 @@ Glances web server started on http://0.0.0.0:61208/ diff --git a/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html b/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html index b7c8449955..dc3583830f 100644 --- a/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html +++ b/blog/2015/09/19/alarm-sonos-and-itunes-support/index.html @@ -233,6 +233,12 @@ Automation has gotten a lot of love. It now supports conditions, multiple trigge diff --git a/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html b/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html index 63d215d066..016d502895 100644 --- a/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html +++ b/blog/2015/10/05/home-assistant-goes-geo-with-owntracks/index.html @@ -209,6 +209,12 @@ Map in Home Assistant showing two people and three zones (home, school, work) diff --git a/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html b/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html index f90c3c0729..9154d4e4f6 100644 --- a/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html +++ b/blog/2015/10/11/measure-temperature-with-esp8266-and-report-to-mqtt/index.html @@ -540,6 +540,12 @@ Adafruit_HDC1000 hdc = Adafruit_HDC1000(); diff --git a/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html b/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html index e24672e450..b1602aa51d 100644 --- a/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html +++ b/blog/2015/10/11/rfxtrx-blinkstick-and-snmp-support/index.html @@ -198,6 +198,12 @@ diff --git a/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html b/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html index 8bdd475694..3bfc0091cc 100644 --- a/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html +++ b/blog/2015/10/26/firetv-and-radiotherm-now-supported/index.html @@ -220,6 +220,12 @@ This makes more sense as most people run Home Assistant as a daemon

    diff --git a/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html b/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html index 0448855a28..46e8583dac 100644 --- a/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html +++ b/blog/2015/11/16/zwave-switches-lights-and-honeywell-thermostats-now-supported/index.html @@ -216,6 +216,12 @@ diff --git a/blog/2015/11/22/survey-november-2015/index.html b/blog/2015/11/22/survey-november-2015/index.html index 0eaf0574e9..68d2383b7f 100644 --- a/blog/2015/11/22/survey-november-2015/index.html +++ b/blog/2015/11/22/survey-november-2015/index.html @@ -256,6 +256,12 @@ diff --git a/blog/2015/12/05/community-highlights/index.html b/blog/2015/12/05/community-highlights/index.html index cb2b69c18f..0f073c1dcf 100644 --- a/blog/2015/12/05/community-highlights/index.html +++ b/blog/2015/12/05/community-highlights/index.html @@ -189,6 +189,12 @@ diff --git a/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html b/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html index 354f6a3b7e..146544e8f2 100644 --- a/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html +++ b/blog/2015/12/06/locks-rollershutters-binary-sensors-and-influxdb-support/index.html @@ -198,6 +198,12 @@ diff --git a/blog/2015/12/07/influxdb-and-grafana/index.html b/blog/2015/12/07/influxdb-and-grafana/index.html index e805c17b67..e7eddcc192 100644 --- a/blog/2015/12/07/influxdb-and-grafana/index.html +++ b/blog/2015/12/07/influxdb-and-grafana/index.html @@ -289,6 +289,12 @@ $ sudo systemctl status grafana-server diff --git a/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html b/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html index 132ad5e1d1..e2d19db30e 100644 --- a/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html +++ b/blog/2015/12/10/activating-tasker-tasks-from-home-assistant-using-command-line-switches/index.html @@ -239,6 +239,12 @@ requests.get(' +
  • + iBeacons: How to track things that can’t track themselves (part II) +
  • + + +
  • Raspberry Pi all-in-one installer
  • @@ -262,12 +268,6 @@ requests.get(' - 0.19: Empowering scripts and Alexa - - - diff --git a/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html b/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html index a49c91a33d..b4468f6e89 100644 --- a/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html +++ b/blog/2015/12/12/philips-hue-blocks-3rd-party-bulbs/index.html @@ -211,6 +211,12 @@ Philips Hue FAQ entries regarding 3rd party light bulbs. diff --git a/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html b/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html index 6a22796eab..f38f011465 100644 --- a/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html +++ b/blog/2015/12/13/setup-encryption-using-lets-encrypt/index.html @@ -276,6 +276,12 @@ sudo docker run -it --rm -p 443:443 -p 80:80 --name letsencrypt \ diff --git a/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html b/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html index 7f840ad0d0..a2dc503ddd 100644 --- a/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html +++ b/blog/2015/12/22/amazon-echo-icloud-and-templates/index.html @@ -232,6 +232,12 @@ diff --git a/blog/2016/01/17/extended-support-for-diy-solutions/index.html b/blog/2016/01/17/extended-support-for-diy-solutions/index.html index 03434e58b8..7916751325 100644 --- a/blog/2016/01/17/extended-support-for-diy-solutions/index.html +++ b/blog/2016/01/17/extended-support-for-diy-solutions/index.html @@ -212,6 +212,12 @@ diff --git a/blog/2016/01/19/perfect-home-automation/index.html b/blog/2016/01/19/perfect-home-automation/index.html index f995092a3b..66bd67b670 100644 --- a/blog/2016/01/19/perfect-home-automation/index.html +++ b/blog/2016/01/19/perfect-home-automation/index.html @@ -216,6 +216,12 @@ diff --git a/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html b/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html index 1cd2fb9edd..cbb4352254 100644 --- a/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html +++ b/blog/2016/01/30/insteon-lifx-twitter-and-zigbee/index.html @@ -218,6 +218,12 @@ Example of the new views in the frontend. Learn mor diff --git a/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html b/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html index a4346e22c6..439afb8885 100644 --- a/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html +++ b/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/index.html @@ -405,6 +405,12 @@ Z-Wave light bulb | diff --git a/blog/2016/02/12/classifying-the-internet-of-things/index.html b/blog/2016/02/12/classifying-the-internet-of-things/index.html index 026bde667c..ff21ed67b0 100644 --- a/blog/2016/02/12/classifying-the-internet-of-things/index.html +++ b/blog/2016/02/12/classifying-the-internet-of-things/index.html @@ -355,6 +355,12 @@ diff --git a/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html b/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html index 307ee137c3..4138e8f7ae 100644 --- a/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html +++ b/blog/2016/02/13/speedtest-bloomsky-splunk-and-garage-doors/index.html @@ -221,6 +221,12 @@ diff --git a/blog/2016/02/18/multi-room-audio-with-snapcast/index.html b/blog/2016/02/18/multi-room-audio-with-snapcast/index.html index edcf1cc061..564db95c9a 100644 --- a/blog/2016/02/18/multi-room-audio-with-snapcast/index.html +++ b/blog/2016/02/18/multi-room-audio-with-snapcast/index.html @@ -323,6 +323,12 @@ output = audioresample ! audio/x-raw,rate=48000,channels=2,format=S16LE ! audioc diff --git a/blog/2016/02/20/community-highlights/index.html b/blog/2016/02/20/community-highlights/index.html index 86698beddd..5cc5bc7feb 100644 --- a/blog/2016/02/20/community-highlights/index.html +++ b/blog/2016/02/20/community-highlights/index.html @@ -229,6 +229,12 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm. diff --git a/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html b/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html index b5074001b4..5b818688bd 100644 --- a/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html +++ b/blog/2016/02/27/steam-d-link-smart-plugs-and-neurio-energy-sensors/index.html @@ -220,6 +220,12 @@ diff --git a/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html b/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html index 661da2aafe..2928a5c72f 100644 --- a/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html +++ b/blog/2016/03/12/z-wave-pep257-templated-service-calls/index.html @@ -226,6 +226,12 @@ player state attributes. This change affects automations, scripts and scenes. +
  • + iBeacons: How to track things that can’t track themselves (part II) +
  • + + +
  • Raspberry Pi all-in-one installer
  • @@ -249,12 +255,6 @@ player state attributes. This change affects automations, scripts and scenes. - -
  • - 0.19: Empowering scripts and Alexa -
  • - - diff --git a/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html b/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html index ebe360af10..e22076b68a 100644 --- a/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html +++ b/blog/2016/03/26/embedded-mqtt-broker-uber-yamaha-growl/index.html @@ -237,6 +237,12 @@ diff --git a/blog/2016/04/05/your-hub-should-be-local-and-open/index.html b/blog/2016/04/05/your-hub-should-be-local-and-open/index.html index 2c9b460b10..b1f5e02e8b 100644 --- a/blog/2016/04/05/your-hub-should-be-local-and-open/index.html +++ b/blog/2016/04/05/your-hub-should-be-local-and-open/index.html @@ -189,6 +189,12 @@ diff --git a/blog/2016/04/07/static-website/index.html b/blog/2016/04/07/static-website/index.html index 3447a876c1..3ff33adbf5 100644 --- a/blog/2016/04/07/static-website/index.html +++ b/blog/2016/04/07/static-website/index.html @@ -195,6 +195,12 @@ diff --git a/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html b/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html index e47c1136ee..1dbaa3c5e0 100644 --- a/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html +++ b/blog/2016/04/09/onkyo-panasonic-gtfs-and-config-validation/index.html @@ -203,6 +203,12 @@ diff --git a/blog/2016/04/17/updated-documentation/index.html b/blog/2016/04/17/updated-documentation/index.html index ab0b798ec6..18ec32346e 100644 --- a/blog/2016/04/17/updated-documentation/index.html +++ b/blog/2016/04/17/updated-documentation/index.html @@ -187,6 +187,12 @@ diff --git a/blog/2016/04/19/to-infinity-and-beyond/index.html b/blog/2016/04/19/to-infinity-and-beyond/index.html index e9ae6f6b16..1a143bffe1 100644 --- a/blog/2016/04/19/to-infinity-and-beyond/index.html +++ b/blog/2016/04/19/to-infinity-and-beyond/index.html @@ -204,6 +204,12 @@ diff --git a/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html b/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html index dfe615ed3c..89fe65b9e3 100644 --- a/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html +++ b/blog/2016/04/20/bluetooth-lg-webos-tvs-and-roombas/index.html @@ -222,6 +222,12 @@ diff --git a/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html b/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html index 6f1eafbf63..6ea231b787 100644 --- a/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html +++ b/blog/2016/04/30/ibeacons-part-1-making-presence-detection-work-better/index.html @@ -313,6 +313,12 @@ For example, my wife works next door - and I couldn’t detect whether she’s a diff --git a/blog/2016/05/06/open-iot-summit-talk/index.html b/blog/2016/05/06/open-iot-summit-talk/index.html index 052a0d3be6..b3564de99c 100644 --- a/blog/2016/05/06/open-iot-summit-talk/index.html +++ b/blog/2016/05/06/open-iot-summit-talk/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2016/05/07/empowering-scripts-and-alexa/index.html b/blog/2016/05/07/empowering-scripts-and-alexa/index.html index 74a2f30825..025a83356e 100644 --- a/blog/2016/05/07/empowering-scripts-and-alexa/index.html +++ b/blog/2016/05/07/empowering-scripts-and-alexa/index.html @@ -275,6 +275,12 @@ diff --git a/blog/2016/05/12/video-configuring-home-assistant/index.html b/blog/2016/05/12/video-configuring-home-assistant/index.html index 019f058988..3e48dc2188 100644 --- a/blog/2016/05/12/video-configuring-home-assistant/index.html +++ b/blog/2016/05/12/video-configuring-home-assistant/index.html @@ -185,6 +185,12 @@ diff --git a/blog/2016/05/18/why-we-use-polymer/index.html b/blog/2016/05/18/why-we-use-polymer/index.html index ecb8731491..c8a04899d2 100644 --- a/blog/2016/05/18/why-we-use-polymer/index.html +++ b/blog/2016/05/18/why-we-use-polymer/index.html @@ -199,6 +199,12 @@ diff --git a/blog/2016/05/21/release-020/index.html b/blog/2016/05/21/release-020/index.html index 2bb9799bd6..d4a358677b 100644 --- a/blog/2016/05/21/release-020/index.html +++ b/blog/2016/05/21/release-020/index.html @@ -220,6 +220,12 @@ diff --git a/blog/2016/05/22/get-started-with-all-in-one-installer/index.html b/blog/2016/05/22/get-started-with-all-in-one-installer/index.html index 6f0165b92c..9006224f65 100644 --- a/blog/2016/05/22/get-started-with-all-in-one-installer/index.html +++ b/blog/2016/05/22/get-started-with-all-in-one-installer/index.html @@ -191,6 +191,12 @@ diff --git a/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html b/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html new file mode 100644 index 0000000000..dc71e36af4 --- /dev/null +++ b/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii/index.html @@ -0,0 +1,405 @@ + + + + + + + + + + iBeacons: How to track things that can’t track themselves (part II) - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + +
    + +
    + +

    iBeacons: How to track things that can’t track themselves (part II)

    + + + +
    + + + eight minutes reading time + + + + + + Comments + +
    + +
    + + +

    This post is by Home Assistant contributor Greg Dowling.

    + +

    In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

    + +

    Tracking things using iBeacons

    +

    In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

    + +

    But beacons don’t have to be fixed.

    + +

    Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

    + +

    If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

    + +

    So if you put an iBeacon on your keys or in your car - then you can track them.

    + +

    + + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

    + + + +

    It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.

    + +

    You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.

    + +

    + +

    + +

    Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.

    + +

    Because you turned Share on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.

    + +

    + +

    + +

    If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the device_tracker.beacon_car move together.

    + +

    If you park your car and go shopping - device_tracker.beacon_car will stop moving.

    + +

    With the basic tracking working - you can use automation to do things like open your gates if your car comes home

    + +
    +
    automation:
    +    - alias: 'Open gate'
    +      trigger:
    +        - platform: state
    +          entity_id: device_tracker.beacon_car
    +          from: 'not_home'
    +          to: 'home'
    +      condition:
    +        - condition: state
    +          entity_id: switch.gate
    +          state: 'off'
    +      action:
    +          service: switch.turn_on
    +          entity_id: switch.gate
    +
    +
    +
    + +

    Or warn you if you leave your keys behind

    + +
    +
    automation:
    +  - alias: 'Forgotten keys'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      condition: template
    +      value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
    +    action:
    +      service: script.turn_on
    +      entity_id: script.send_key_alert
    +
    +  - alias: 'Forgotten keys - cancel'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      - condition: state
    +        entity_id: script.send_key_alert
    +        state: 'on'
    +    action:
    +      service: script.turn_off
    +      entity_id: script.send_key_alert
    +
    +
    +
    + +
    +
    script:
    +  send_key_alert:
    +    sequence:
    +      - delay:
    +          minutes: 2
    +      - service: notify.notify
    +        data:
    +            message: 'You forgot your keys'
    +            target: 'device/gregs_iphone'
    +
    +
    +
    + +

    (The delay is needed for two reasons: -
    +1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
    +2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)

    + +

    Using both types of iBeacons at the same time

    +

    Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.

    + +

    + +

    +

    Long range / High power beacon

    + +

    + +

    +

    Waterproof beacon

    + +

    Buying Beacons

    +

    This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.

    + +

    I’ve bought quite a few iBeacons from a company called Blue Sense Networks. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.

    + +

    All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.

    + +

    I bought some other beacons from a US/Polish startup called Estimote, who I think are better known. I bought a developer pack of 10 of their nearables which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!

    + +

    I’ve mainly used these as devices to track rather that location beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was you can’t yet).

    + +

    The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!

    + +

    Conclusion

    +

    As I said in part 1, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.

    + +

    I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.

    + +

    Notes

    + +

    Please see the notes at the end of Part 1 for documentation information.

    +
    + + +
    +

    Comments

    +
    +
    + + +
    + + + + +
    +
    + + + + + + + \ No newline at end of file diff --git a/blog/archives/index.html b/blog/archives/index.html index e86025bbca..c335300ef3 100644 --- a/blog/archives/index.html +++ b/blog/archives/index.html @@ -98,6 +98,42 @@

    2016

    + + + +
    @@ -2169,6 +2205,12 @@ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index d5b05d6352..7fc1e20e46 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/index.html b/blog/categories/community/index.html index c7de3ad378..2e8b5e041a 100644 --- a/blog/categories/community/index.html +++ b/blog/categories/community/index.html @@ -230,6 +230,12 @@ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml new file mode 100644 index 0000000000..83285f63f6 --- /dev/null +++ b/blog/categories/device-tracking/atom.xml @@ -0,0 +1,170 @@ + + + + <![CDATA[Category: Device-Tracking | Home Assistant]]> + + + 2016-05-26T13:42:32+00:00 + https://home-assistant.io/ + + + + + Octopress + + + + <![CDATA[iBeacons: How to track things that can’t track themselves (part II)]]> + + 2016-05-26T11:06:12+00:00 + https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii + This post is by Home Assistant contributor Greg Dowling.

    + +

    In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

    + +

    Tracking things using iBeacons

    +

    In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

    + +

    But beacons don’t have to be fixed.

    + +

    Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

    + +

    If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

    + +

    So if you put an iBeacon on your keys or in your car - then you can track them.

    + +

    + + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

    + + + +

    It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.

    + +

    You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.

    + +

    + +

    + +

    Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.

    + +

    Because you turned Share on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.

    + +

    + +

    + +

    If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the device_tracker.beacon_car move together.

    + +

    If you park your car and go shopping - device_tracker.beacon_car will stop moving.

    + +

    With the basic tracking working - you can use automation to do things like open your gates if your car comes home

    + +
    +
    automation:
    +    - alias: 'Open gate'
    +      trigger:
    +        - platform: state
    +          entity_id: device_tracker.beacon_car
    +          from: 'not_home'
    +          to: 'home'
    +      condition:
    +        - condition: state
    +          entity_id: switch.gate
    +          state: 'off'
    +      action:
    +          service: switch.turn_on
    +          entity_id: switch.gate
    +
    +
    +
    + +

    Or warn you if you leave your keys behind

    + +
    +
    automation:
    +  - alias: 'Forgotten keys'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      condition: template
    +      value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
    +    action:
    +      service: script.turn_on
    +      entity_id: script.send_key_alert
    +
    +  - alias: 'Forgotten keys - cancel'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      - condition: state
    +        entity_id: script.send_key_alert
    +        state: 'on'
    +    action:
    +      service: script.turn_off
    +      entity_id: script.send_key_alert
    +
    +
    +
    + +
    +
    script:
    +  send_key_alert:
    +    sequence:
    +      - delay:
    +          minutes: 2
    +      - service: notify.notify
    +        data:
    +            message: 'You forgot your keys'
    +            target: 'device/gregs_iphone'
    +
    +
    +
    + +

    (The delay is needed for two reasons: -
    +1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
    +2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)

    + +

    Using both types of iBeacons at the same time

    +

    Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.

    + +

    + +

    +

    Long range / High power beacon

    + +

    + +

    +

    Waterproof beacon

    + +

    Buying Beacons

    +

    This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.

    + +

    I’ve bought quite a few iBeacons from a company called Blue Sense Networks. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.

    + +

    All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.

    + +

    I bought some other beacons from a US/Polish startup called Estimote, who I think are better known. I bought a developer pack of 10 of their nearables which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!

    + +

    I’ve mainly used these as devices to track rather that location beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was you can’t yet).

    + +

    The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!

    + +

    Conclusion

    +

    As I said in part 1, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.

    + +

    I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.

    + +

    Notes

    + +

    Please see the notes at the end of Part 1 for documentation information.

    + +]]>
    +
    + +
    diff --git a/blog/categories/device-tracking/index.html b/blog/categories/device-tracking/index.html new file mode 100644 index 0000000000..5af4c090ad --- /dev/null +++ b/blog/categories/device-tracking/index.html @@ -0,0 +1,278 @@ + + + + + + + + + + Category: Device-Tracking - Home Assistant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + +
    + + + + + +
    + + + + +
    +
    + + + + + + + \ No newline at end of file diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 827138bc93..e5bb1996e5 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/index.html b/blog/categories/esp8266/index.html index 2c0e40ff49..56096f0469 100644 --- a/blog/categories/esp8266/index.html +++ b/blog/categories/esp8266/index.html @@ -199,6 +199,12 @@ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index fc96fd0e85..2e5397960f 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/index.html b/blog/categories/how-to/index.html index 21b9f29c0f..883cb13f8b 100644 --- a/blog/categories/how-to/index.html +++ b/blog/categories/how-to/index.html @@ -496,6 +496,12 @@ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 9076006e2b..858bb156c0 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ @@ -13,6 +13,160 @@ Octopress + + <![CDATA[iBeacons: How to track things that can’t track themselves (part II)]]> + + 2016-05-26T11:06:12+00:00 + https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii + This post is by Home Assistant contributor Greg Dowling.

    + +

    In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

    + +

    Tracking things using iBeacons

    +

    In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

    + +

    But beacons don’t have to be fixed.

    + +

    Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

    + +

    If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

    + +

    So if you put an iBeacon on your keys or in your car - then you can track them.

    + +

    + + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

    + + + +

    It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.

    + +

    You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.

    + +

    + +

    + +

    Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.

    + +

    Because you turned Share on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.

    + +

    + +

    + +

    If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the device_tracker.beacon_car move together.

    + +

    If you park your car and go shopping - device_tracker.beacon_car will stop moving.

    + +

    With the basic tracking working - you can use automation to do things like open your gates if your car comes home

    + +
    +
    automation:
    +    - alias: 'Open gate'
    +      trigger:
    +        - platform: state
    +          entity_id: device_tracker.beacon_car
    +          from: 'not_home'
    +          to: 'home'
    +      condition:
    +        - condition: state
    +          entity_id: switch.gate
    +          state: 'off'
    +      action:
    +          service: switch.turn_on
    +          entity_id: switch.gate
    +
    +
    +
    + +

    Or warn you if you leave your keys behind

    + +
    +
    automation:
    +  - alias: 'Forgotten keys'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      condition: template
    +      value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
    +    action:
    +      service: script.turn_on
    +      entity_id: script.send_key_alert
    +
    +  - alias: 'Forgotten keys - cancel'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      - condition: state
    +        entity_id: script.send_key_alert
    +        state: 'on'
    +    action:
    +      service: script.turn_off
    +      entity_id: script.send_key_alert
    +
    +
    +
    + +
    +
    script:
    +  send_key_alert:
    +    sequence:
    +      - delay:
    +          minutes: 2
    +      - service: notify.notify
    +        data:
    +            message: 'You forgot your keys'
    +            target: 'device/gregs_iphone'
    +
    +
    +
    + +

    (The delay is needed for two reasons: -
    +1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
    +2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)

    + +

    Using both types of iBeacons at the same time

    +

    Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.

    + +

    + +

    +

    Long range / High power beacon

    + +

    + +

    +

    Waterproof beacon

    + +

    Buying Beacons

    +

    This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.

    + +

    I’ve bought quite a few iBeacons from a company called Blue Sense Networks. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.

    + +

    All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.

    + +

    I bought some other beacons from a US/Polish startup called Estimote, who I think are better known. I bought a developer pack of 10 of their nearables which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!

    + +

    I’ve mainly used these as devices to track rather that location beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was you can’t yet).

    + +

    The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!

    + +

    Conclusion

    +

    As I said in part 1, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.

    + +

    I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.

    + +

    Notes

    + +

    Please see the notes at the end of Part 1 for documentation information.

    + +]]>
    +
    + <![CDATA[iBeacons: Making presence detection work better (part I)]]> diff --git a/blog/categories/ibeacons/index.html b/blog/categories/ibeacons/index.html index a267cbb41d..51b8fe65db 100644 --- a/blog/categories/ibeacons/index.html +++ b/blog/categories/ibeacons/index.html @@ -98,6 +98,42 @@

    2016

    + + + +
    @@ -199,6 +235,12 @@ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 84b0ee0121..c3a4b51cd7 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/index.html b/blog/categories/internet-of-things/index.html index bec765b9b0..a7f37e8f0b 100644 --- a/blog/categories/internet-of-things/index.html +++ b/blog/categories/internet-of-things/index.html @@ -294,6 +294,12 @@ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 5e0e32fed5..dfb0fab650 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/index.html b/blog/categories/mqtt/index.html index 7b11b683ab..d5cc6c1f31 100644 --- a/blog/categories/mqtt/index.html +++ b/blog/categories/mqtt/index.html @@ -270,6 +270,12 @@ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index ce067aab80..3281565f7f 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/index.html b/blog/categories/organisation/index.html index b21b22b407..73d66017f4 100644 --- a/blog/categories/organisation/index.html +++ b/blog/categories/organisation/index.html @@ -230,6 +230,12 @@ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index a6c9cd09f7..44ecf65680 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ @@ -13,6 +13,160 @@ Octopress + + <![CDATA[iBeacons: How to track things that can’t track themselves (part II)]]> + + 2016-05-26T11:06:12+00:00 + https://home-assistant.io/blog/2016/05/26/ibeacons-how-to-track-things-that-cant-track-themselves-part-ii + This post is by Home Assistant contributor Greg Dowling.

    + +

    In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

    + +

    Tracking things using iBeacons

    +

    In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

    + +

    But beacons don’t have to be fixed.

    + +

    Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

    + +

    If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

    + +

    So if you put an iBeacon on your keys or in your car - then you can track them.

    + +

    + + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

    + + + +

    It’s easier to set up OwnTracks and HA to track a mobile beacon than the fixed beacon I discussed in Part 1, because you only need to tell OwnTracks about your iBeacon. You don’t need to configure HA at all.

    + +

    You set up the beacon the same way as we discussed in part 1. The only difference is that instead of calling the region the name of a location (eg -drive) you call it the name of the device you want to track (eg -keys). Remember the leading ‘-’ that makes the connection more reliable.

    + +

    + +

    + +

    Once you’ve added the iBeacon - you should be able to see it on the OwnTracks region screen. If your phone can see the packets from that beacon, OwnTracks will turn the relevant Region red.

    + +

    Because you turned Share on for the region, when OwnTracks sees the beacon it will send HA a message. HA will use this message to add the beacon as a tracked device if it hasn’t seen it before. So you should see a new device appear in HA called device_tracker.beacon_[name] - and its location will be where your phone thought it was when it last saw the beacon.

    + +

    + +

    + +

    If your phone moves and sends HA a new location while it is still in range of the beacon - HA will update the location of the beacon. So if go for a drive in your car - you will see both your phone and the device_tracker.beacon_car move together.

    + +

    If you park your car and go shopping - device_tracker.beacon_car will stop moving.

    + +

    With the basic tracking working - you can use automation to do things like open your gates if your car comes home

    + +
    +
    automation:
    +    - alias: 'Open gate'
    +      trigger:
    +        - platform: state
    +          entity_id: device_tracker.beacon_car
    +          from: 'not_home'
    +          to: 'home'
    +      condition:
    +        - condition: state
    +          entity_id: switch.gate
    +          state: 'off'
    +      action:
    +          service: switch.turn_on
    +          entity_id: switch.gate
    +
    +
    +
    + +

    Or warn you if you leave your keys behind

    + +
    +
    automation:
    +  - alias: 'Forgotten keys'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state != states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      condition: template
    +      value_template: '{{ states.device_tracker.greg_gregphone.state != "home" }}'
    +    action:
    +      service: script.turn_on
    +      entity_id: script.send_key_alert
    +
    +  - alias: 'Forgotten keys - cancel'
    +    trigger:
    +      platform: template
    +      value_template: '{{states.device_tracker.greg_gregphone.state == states.device_tracker.beacon_keys.state}}'
    +    condition:
    +      - condition: state
    +        entity_id: script.send_key_alert
    +        state: 'on'
    +    action:
    +      service: script.turn_off
    +      entity_id: script.send_key_alert
    +
    +
    +
    + +
    +
    script:
    +  send_key_alert:
    +    sequence:
    +      - delay:
    +          minutes: 2
    +      - service: notify.notify
    +        data:
    +            message: 'You forgot your keys'
    +            target: 'device/gregs_iphone'
    +
    +
    +
    + +

    (The delay is needed for two reasons: -
    +1. HA updates the beacon and phone locations at slightly different times - so you don’t want the automation to trigger in the gap between the updates
    +2. I’ve found that beacons (especially the low power Estimote Nearables) can get disconnected for a few seconds so it’s best to wait a minute or so before deciding that you’ve left your keys behind)

    + +

    Using both types of iBeacons at the same time

    +

    Of course you can use both fixed and mobile beacons at the same time. I want my gates to open when I arrive home in the car - so I use an iBeacon in the car so that I can track the car, and a iBeacon on my drive so that a location update is triggered when I arrive. I’ve been experimenting with a high power beacon in a waterproof box on my drive which seems to work well to notice when I get home.

    + +

    + +

    +

    Long range / High power beacon

    + +

    + +

    +

    Waterproof beacon

    + +

    Buying Beacons

    +

    This isn’t a buyer’s guide, but I just wanted to mention the iBeacons I’ve been using. I think you should be able to use any iBeacon with HA and OwnTracks. You generally can’t buy beacons in your local electronics shop - so I just wanted to briefly mention the two suppliers I’ve used so far.

    + +

    I’ve bought quite a few iBeacons from a company called Blue Sense Networks. I work in the tech startup sector in the UK so I partly chose them because they are a local start-up who seemed worth supporting. The products, support and software all seem good. I use a number of their beacons - from a simple USB dongle, to a long range beacon. All their products have batteries that can be changed (or no batteries in the case of the externally powered USB device) - and you can configure all the parameters you’d want to using their software. I had one software issue, support got back to me at a weekend(!) - and the issue was resolved with a software release two days later.

    + +

    All the beacons seem fine - and the long range unit does work over a longer range than my other beacons.

    + +

    I bought some other beacons from a US/Polish startup called Estimote, who I think are better known. I bought a developer pack of 10 of their nearables which as well as being iBeacons also send out other data (orientation and motion) using their own protocol. This is interesting if you’re developing your own application, but for OwnTracks and HA they are just regular beacons. They are small and self adhesive - so you can stick them to things (like your keys). You can’t change all the parameters on these devices (UUID/Major/Minor are fixed) - and the batteries can’t be replaced. I also killed one of the estimote beacons (I assume the battery died) after I carried it around for a few months and dropped it many times! On the other hand they are well priced, small and waterproof!

    + +

    I’ve mainly used these as devices to track rather that location beacons. Estimote also sell some slightly larger iBeacons with replaceable batteries. Estimote support responded quickly and were helpful when I couldn’t work out how to edit their beacon’s parameters (although the answer was you can’t yet).

    + +

    The larger Blue Sense Network beacons seem to be better at maintaining a connection that the Estimotes - although that might be because I’m reluctant to turn the power to maximum and reduce the gap between sending packets on the Estimotes where I can’t replace the batteries!

    + +

    Conclusion

    +

    As I said in part 1, I’ve found iBeacons to be a good way of improving presence detection. I also used them to track devices like my car and my keys that can’t track themselves.

    + +

    I’m still experimenting, so I hope I can do more with iBeacons. I hope I’ve encouraged you do so the same. If you do please share your experiences.

    + +

    Notes

    + +

    Please see the notes at the end of Part 1 for documentation information.

    + +]]>
    +
    + <![CDATA[iBeacons: Making presence detection work better (part I)]]> diff --git a/blog/categories/owntracks/index.html b/blog/categories/owntracks/index.html index 8f86eba611..a66bdff378 100644 --- a/blog/categories/owntracks/index.html +++ b/blog/categories/owntracks/index.html @@ -98,6 +98,42 @@

    2016

    + + + +
    @@ -199,6 +235,12 @@ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 947c575530..be15e9d2d3 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/index.html b/blog/categories/presence-detection/index.html index a344674080..7005a924df 100644 --- a/blog/categories/presence-detection/index.html +++ b/blog/categories/presence-detection/index.html @@ -199,6 +199,12 @@ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index f6105421f2..a79524887f 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/index.html b/blog/categories/public-service-announcement/index.html index d337519f5d..aa80d8414a 100644 --- a/blog/categories/public-service-announcement/index.html +++ b/blog/categories/public-service-announcement/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 253aa03baa..ce48c681c5 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/index.html b/blog/categories/release-notes/index.html index d86a223c4f..7acbbfc767 100644 --- a/blog/categories/release-notes/index.html +++ b/blog/categories/release-notes/index.html @@ -1288,6 +1288,12 @@ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 0e2134ef0e..22ee370053 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/index.html b/blog/categories/survey/index.html index ab4e6870ac..e0b0c750a9 100644 --- a/blog/categories/survey/index.html +++ b/blog/categories/survey/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 444113aaad..30e4b4b1e1 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/index.html b/blog/categories/talks/index.html index 1d2cdd84b9..30f2c8bbef 100644 --- a/blog/categories/talks/index.html +++ b/blog/categories/talks/index.html @@ -197,6 +197,12 @@ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 1d9486a1e3..f29d6f9842 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/index.html b/blog/categories/technology/index.html index 87c5287437..16fd3000fa 100644 --- a/blog/categories/technology/index.html +++ b/blog/categories/technology/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 10882ab965..d2e1e98d39 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/index.html b/blog/categories/user-stories/index.html index 7428bae31f..ea8e5163b1 100644 --- a/blog/categories/user-stories/index.html +++ b/blog/categories/user-stories/index.html @@ -195,6 +195,12 @@ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 21db5123c9..2d129da467 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/index.html b/blog/categories/video/index.html index 99bbd3a693..65fa6f73f8 100644 --- a/blog/categories/video/index.html +++ b/blog/categories/video/index.html @@ -261,6 +261,12 @@ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 7710e2f89d..6f1118a6f2 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-05-26T08:07:59+00:00 + 2016-05-26T13:42:32+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/index.html b/blog/categories/website/index.html index 73712928de..d60a2d3b0c 100644 --- a/blog/categories/website/index.html +++ b/blog/categories/website/index.html @@ -230,6 +230,12 @@ diff --git a/blog/index.html b/blog/index.html index 832b41b7a7..cb3bc89150 100644 --- a/blog/index.html +++ b/blog/index.html @@ -78,6 +78,72 @@ +
    +
    + +

    + iBeacons: How to track things that can’t track themselves (part II) +

    + + + +
    + + + eight minutes reading time + + + + + + Comments + +
    + +
    + + +
    +

    This post is by Home Assistant contributor Greg Dowling.

    + +

    In Part 1 I talked about using iBeacons to improve presence tracking. In part 2 I’ll talk about how to track things like keys that can’t track themselves by using iBeacons.

    + +

    Tracking things using iBeacons

    +

    In the first part I mentioned that iBeacons just send out I’m here packets, and we used this to trigger an update when your phone came close to a fixed beacon.

    + +

    But beacons don’t have to be fixed.

    + +

    Your phone knows roughly where it is located (based on mobile phone masts, Wi-Fi networks or GPS). If your phone sees an I’m here message then it knows the beacon is close.

    + +

    If your phone can remember (or tell a server) where it was when it last saw the iBeacon - then it knows where the beacon was. So the result of this is that you can track where an iBeacon was - even though the iBeacon doesn’t have any tracking technology itself.

    + +

    So if you put an iBeacon on your keys or in your car - then you can track them.

    + +

    + + Here are my keys - with a Estimote Nearable iBeacon stuck to them. Ugly but effective! +

    + + + + Read on → + +
    +
    +
    +
    @@ -702,55 +768,6 @@ -
    -
    -
    - -
    -
    - -

    - Updated documentation -

    - - - -
    - - - 1 minute reading time - - - - - - Comments - -
    - -
    - - -
    -

    One of the main complaints that we receive is something along the lines “I read that X is possible yet I am unable to find it on the website.”. This post is to announce that we have taken the first steps to improve it by revamping the getting started and developers sections. It’s still a work in progress but we now have a solid foundation to build on for the future 👍.

    - -

    Our documentation has been going through various phases. Initially it was just the README in our GitHub repository. I discovered Jekyll and GitHub pages in December 2014 and created home-assistant.io. I more or less broke the README in 5 pages and called it a website. Back then we had a whopping 11 components.

    - -

    As Home Assistant grew, so did our documentation. Fabian Affolter does an amazing job in making sure there is at least a documentation stub for each new feature that lands. And that’s quite a feat given our frequent releases! But despite all the efforts, the documentation outgrew our existing documentation organisation.

    - -

    Today it has been almost 1.5 years since we started the website. We now have 264 components and platforms under our belt and have been honored with 1.5 million page views ✨. And hopefully we now also have documentation that our community deserves.

    - -

    Finally, if you see some content that could use more clarifcation or is outdated, don’t hesitate to use the ‘Edit in GitHub’ link that is present on each page.

    - -

    @@ -793,6 +810,8 @@
  • Community
  • +
  • Device Tracking
  • +
  • ESP8266
  • How To
  • diff --git a/blog/posts/2/index.html b/blog/posts/2/index.html index 8cf6d2168a..49beacacc5 100644 --- a/blog/posts/2/index.html +++ b/blog/posts/2/index.html @@ -78,6 +78,55 @@ +
    +
    + +

    + Updated documentation +

    + + + +
    + + + 1 minute reading time + + + + + + Comments + +
    + +
    + + +
    +

    One of the main complaints that we receive is something along the lines “I read that X is possible yet I am unable to find it on the website.”. This post is to announce that we have taken the first steps to improve it by revamping the getting started and developers sections. It’s still a work in progress but we now have a solid foundation to build on for the future 👍.

    + +

    Our documentation has been going through various phases. Initially it was just the README in our GitHub repository. I discovered Jekyll and GitHub pages in December 2014 and created home-assistant.io. I more or less broke the README in 5 pages and called it a website. Back then we had a whopping 11 components.

    + +

    As Home Assistant grew, so did our documentation. Fabian Affolter does an amazing job in making sure there is at least a documentation stub for each new feature that lands. And that’s quite a feat given our frequent releases! But despite all the efforts, the documentation outgrew our existing documentation organisation.

    + +

    Today it has been almost 1.5 years since we started the website. We now have 264 components and platforms under our belt and have been honored with 1.5 million page views ✨. And hopefully we now also have documentation that our community deserves.

    + +

    Finally, if you see some content that could use more clarifcation or is outdated, don’t hesitate to use the ‘Edit in GitHub’ link that is present on each page.

    + + +
    +
    +
    +
    @@ -743,109 +792,6 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm. -
    -
    -
    - -
    -
    - -

    - Classifying the Internet of Things -

    - - - -
    - - - seven minutes reading time - - - - - - Comments - -
    - -
    - - -
    -

    The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light.

    - -

    Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both.

    - -

    State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness.

    - -

    Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval.

    - -

    The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked.

    - -

    We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations:

    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ClassifierDescription
    Assumed State - We are unable to get the state of the device. Best we can do is to assume the state based on our last command. -
    Cloud Polling - Integration of this device happens via the cloud and requires an active internet connection. Polling the state means that an update might be noticed later. -
    Cloud Push - Integration of this device happens via the cloud and requires an active internet connection. Home Assistant will be notified as soon as a new state is available. -
    Local Polling - Offers direct communication with device. Polling the state means that an update might be noticed later. -
    Local Push - Offers direct communication with device. Home Assistant will be notified as soon as a new state is available. -
    - -

    The background to how we got to these classifiers can be read after the break.

    - - - - Read on → -

    @@ -890,6 +836,8 @@ Hold your NFC tag against the belly of Garfield to unlock the alarm.
  • Community
  • +
  • Device Tracking
  • +
  • ESP8266
  • How To
  • diff --git a/blog/posts/3/index.html b/blog/posts/3/index.html index 190e7cd9dd..a0050d947b 100644 --- a/blog/posts/3/index.html +++ b/blog/posts/3/index.html @@ -78,6 +78,109 @@ +
    +
    + +

    + Classifying the Internet of Things +

    + + + +
    + + + seven minutes reading time + + + + + + Comments + +
    + +
    + + +
    +

    The core of home automation is knowing what’s going on. The faster we know about a state change, the better we can serve the user. If you want to have your lights to turn on when you arrive at home, it doesn’t help if it only knows about it after you’ve already opened the door and manually (!!) turned on the light.

    + +

    Each smart device consists of the ‘normal’ device and the piece that makes it ‘smart’: the connectivity. The connectivity part of a device can consists of either control, state or both.

    + +

    State describes what a device is up to right now. For example, a light can be on with a red color and a medium brightness.

    + +

    Control is about controlling the smart device by sending commands via an API. These commands can vary from configuring how a device works till mimicking how a user would interact with a device. A media player can allow skipping to the next track and a sensor could allow to configure its sensitivity or polling interval.

    + +

    The Home Assistant APIs are setup to be as convenient as possible. However, a network is always as weak as it’s weakest link. In our case these are the integrations. Take for example controlling a light that does not report state. The only state Home Assistant can report on after sending a command is the assumed state: what do we expect the state of the light to be if the command worked.

    + +

    We want our users to get the best home automation experience out there and this starts with making sure they have devices that work well with Home Assistant. That’s why we will start applying the following classifiers to our integrations:

    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ClassifierDescription
    Assumed State + We are unable to get the state of the device. Best we can do is to assume the state based on our last command. +
    Cloud Polling + Integration of this device happens via the cloud and requires an active internet connection. Polling the state means that an update might be noticed later. +
    Cloud Push + Integration of this device happens via the cloud and requires an active internet connection. Home Assistant will be notified as soon as a new state is available. +
    Local Polling + Offers direct communication with device. Polling the state means that an update might be noticed later. +
    Local Push + Offers direct communication with device. Home Assistant will be notified as soon as a new state is available. +
    + +

    The background to how we got to these classifiers can be read after the break.

    + + + + Read on → + +
    +
    +
    +
    -
    -
    - -
    -
    - -

    - 0.9: Rollershutters, locks, binary sensors and InfluxDB -

    - - - -
    - - - less than one minute reading time - - - - - - Comments - -
    - -
    - - -
    -

    It’s been a few weeks but we managed to polish a nice new release of Home Assistant for y’all!

    - -

    - - - -

    To update, run pip3 install --upgrade homeassistant.

    - -

    - -

    - - -

    @@ -702,6 +744,8 @@ The InfluxDB database is a so-called time se
  • Community
  • +
  • Device Tracking
  • +
  • ESP8266
  • How To
  • diff --git a/blog/posts/4/index.html b/blog/posts/4/index.html index 103b072886..883dfe8590 100644 --- a/blog/posts/4/index.html +++ b/blog/posts/4/index.html @@ -78,6 +78,67 @@ +
    +
    + +

    + 0.9: Rollershutters, locks, binary sensors and InfluxDB +

    + + + +
    + + + less than one minute reading time + + + + + + Comments + +
    + +
    + + +
    +

    It’s been a few weeks but we managed to polish a nice new release of Home Assistant for y’all!

    + +

    + + + +

    To update, run pip3 install --upgrade homeassistant.

    + +

    + +

    + + + +
    +
    +
    +
    @@ -623,60 +684,6 @@ Inspried by a -
    - -

    - Home Assistant meets IFTTT -

    - - - -
    - - - two minutes reading time - - - - - - Comments - -
    - -
    - - -
    -

    Today we announce the release of Home Assistant v0.7.2 which includes brand new support by @sfam to integrate with IFTTT. IFTTT stands for If This, Then That and is a webservice that integrates with almost every possible webservice out there. Adding Home Assistant to this mix means Home Assistant can connect with all via IFTTT.

    - -

    It is now possible to disable your irregation system if it is going to be cloudy tomorrow or tweet if your smoke alarm goes off.

    - -

    - -

    - -

    Head over to the setup instructions to get started with IFTTT. Click the read more button for some example recipes.

    - - - - Read on → - -
    -
    -
    -