Teckin Smart Plug / Socket with HomeKit using homebridge

Context

I wanted to automate my outdoor lights to enable timers and motion detectors to trigger them to make the house a little safer and easier to navigate at night. I have not decided on an activation method yet, but the first step, will be to just get them on HomeKit. I considered smart bulbs, but that would mean i’d need to change the existing PIR fixtures and I do not need to dim them or anything, so this seemed overkill. I can disable the PIR on them all and set them to always on, so a smart socket will do the job great!

I started looking for HomeKit smart sockets in the UK and the choice is very limited and often pricey.  I decided to just try a Teckin £10 socket from Amazon, which was not HomeKit compatible, but I was certain I could work something out with homebridge.

Configuration

The Teckin Smart Plug is just a Tuya device and uses a cloud API for actuations, not controlled locally on your network like all other HomeKit devices. This may have some security implications, but all comunications seems to be encrypted and secure, so I am happy to use this for now.

The homebridge plugin that I ended up using to control the socket is homebridge-tuya. I struggled to get the tuya-cli link-wizard to work to identify the id and key of the device. The connection initial process seems very flaky. I do not know if it is due to my mesh network or what, but i spent hours on this bit. In the end I resorted to identifying the id and key for my switch using Charles on macOS and this method from an older version of the Tuya node API.

Result

It works great in HomeKit!

Now, to find a good way to trigger it from motion outside. 🤔

watchOS 4 on Series 0

Over 880 days ago on 24th April 2015, I received my original Apple Watch (recently dubbed Series 0), I have worn it every day since. I use it mainly for fitness and media playback control, but nothing else.

The main reason is that my Apple Watch was too slow to use any apps and even the ones that I do use had some performances issues, e.g. the timer in the workout app struggling to display smoothly on screen.

Performance

watchOS 4 has been a huge improvement – performance seem so much better, apps launch quicker, the interface is more fluid, everything seems much more reliable. As an example, my app Departure Board launches more faster, and it even updates its location using the GPS on the phone much quicker. I’d even argue that it has crossed the threshold from unusable to usable. watchOS 4 has really given a new lease of life to my aging, scratched watch.

Media Control

Since I got my AirPods in December and I lost the ability to control the volume on my headphone (I had been using Jabra Revo Wireless for years), I have been hoping the Now Playing screen would be available as a complication. The Now Playing screen lets you control the device volume with the digital crown. Having it as a complication would let me access it with a single tap, rather then pressing the side button and scrolling to find it, then selecting it.

With watchOS 4, Apple went one step further and displays the Now Playing screen whenever media is playing on your iPhone. As soon as I start media payback on my phone, the watch face is replaced with the Now Playing screen.

What’s next?

I was almost convinced that I would be upgrading at a Series 3 with LTE this year. However this performance improvement may help me defer this purchase for another year or until Series 4. In addition to this my carrier, Three, is not supported yet and podcast playback over LTE is also not available yet as far as I know.

Workflow at Apple and SiriKit

Last week, Apple bought workflow. I have listened to many podcasts on the topic this week, there seems to be an option that was overlooked – the potential of SiriKit integration.

With iOS 10, Apple introduced SiriKit which allowed interactions with apps without presenting their own UI. The user can use Siri’s voice assistant to speak their intent request, which can then be handled by the app. The intents that could be handled in iOS 10 is very limited. However, I assume over time this will be opened up to allow all apps and any tasks to be supported by Siri, like Alexa’s skills.

As a first part citizen of the platform Workflow will be able to access the index of all intent handlers available for all installed apps. For example, my security camera app or personal budgeting app will never be supported by Workflow, they are too niche to be worth the Workflow developer’s time. However, when the developers of the individual apps add SiriKit support:

  • get current view of my garden camera
  • get last time a disturbance was detected in my hallway
  • get remaining weekly budget
  • add expense of £7.50 for lunch
  • etc.

this will make the possibilities of Workflow (or an Apple automation tool) so much more powerful that Workflow could ever have been as its own entity. All of these intents will also be available verbally from Siri’s voice assistant and without a URL scheme used anywhere, as Federico hypothesised in this week’s Connected.

This approach to problems is not uncommon in iOS, up until iOS 8, each developer who wanted to share beyond Messages, Facebook and Twitter would have to support every single service individually in their apps. With iOS 8 and the introduction of App Extensibility, individual apps could declare their ability to share to their own services. This allowed the service owner to create the sharing experience once and every other app use it leading to much more powerful and polished experiences. I can see the same happening with Workflow (or an Apple automation tool).