Tag Archives: homeseer

HomeSeer + Apple TV

For the past couple years, I have  been running Homeseer as a home automation platform to control a number of Z-Wave switches. It works well, and probably my only complaint is with the remote app – which occasionally seems unable to reach my HomeSeer server, it’s inability to customize the user interface without spending a bunch more money on a designer application, and it’s inability to connect to some  home automation devices with spending more money on plugins.
Recently I purchased a 4th generation Apple TV.  I liked the Siri/HomeKit functionality, it’s Apple Music functionality, and also the way it displays availability of movies on iTunes and Netflix.  I was also interested in getting HomeSeer working with the Apple TV, so that we could use Siri to turn lights off and on. HomeSeer has voice control functionality built in, but requires a microphone connected to the server – which would be limiting as to where voice commands could actually be used, and not sure I like the idea of microphones around the house that are always on.  Using the Siri functionality built into my iPhone and into the Apple TV seemed like a much better approach.
Here’s the hardware that I’m working with:

  • a Raspberry Pi 2 – connected to home network via ethernet
  • HS3
  • Homeseer SmartStick
  • Apple TV 4th gen, 32G 
  • iMac – late 2013 model
  • Home app – installed on my iPhone
  • Eve Elegato app – installed on my iPhone

To get HomeSeer communicating with the Home or Eve Elegato apps, it’s necessary to use a bridge application that translates the requests between them.  There is a GitHub project called HomeBridge.  HomeBridge requires Node.js to be installed. There is also a plugin that HomeBridge requires,  homebridge-homeseer-plugin.
I followed the Install Homebridge on OSX documentation on GitHub to install Node and Homebridge.
Next I installed the homebridge-homeseer plugin

npm install homebridge-homeseer-plugin

Then, it was necessary to edit a config.json file – located in my home directory in a hidden folder called .homebridge
The username in the bridge section can be anything – I just left the content of another sample config.  The username and password used in the accessories sections needs to be a valid user from within HomeSeer, with the appropriate permissions to the specific accessories.  The on_url & off_url have a querystring parameter called value, that needs to match the specific switches – the details are available in homeseer device management, in an advanced tab, along with a device or reference ID, that is used for the ref parameter.  The 8 digit pin is displayed in the terminal window after you start homebridge, as well as the port number that it is using. The pin number is also used later when setting up the Home and/or Eve apps on the iPhone.
Here is the content of my config (modify as  necessary):
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 52733,
"pin": "###-##-###"
},
"description": "This is an example configuration file with all supported devices. You can use this as a template for creating your own configuration file containing devices you actually own.",
"accessories": [{
"accessory": "Http",
"username": "xxxx",
"password": "xxxx",
"name": "Espresso Machine",
"on_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=9&value=255",
"off_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=9&value=0",
"can_dim": "False",
"http_method": "GET"
}, {
"accessory": "Http",
"username": "xxxx",
"password": "xxxx",
"name": "Garage Lights",
"on_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=33&value=99",
"off_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=33&value=0",
"can_dim": "True",
"http_method": "GET"
}, {
"accessory": "Http",
"username": "xxxx",
"password": "xxxx",
"name": "Living Room lights",
"on_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=7&value=99",
"off_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=7&value=0",
"can_dim": "True",
"http_method": "GET"
}, {
"accessory": "Http",
"username": "xxxx",
"password": "xxxx",
"name": "Bedroom Lamp One",
"on_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=12&value=99",
"off_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=12&value=0",
"can_dim": "True",
"http_method": "GET"
}, {
"accessory": "Http",
"username": "xxxx",
"password": "xxxx",
"name": "Bedroom Lamp Two",
"on_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=32&value=99",
"off_url": "http://###.###.###.###/JSON?request=controldevicebyvalue&ref=32&value=0",
"can_dim": "True",
"http_method": "GET"
}]
}

Next I launched Home – it wasn’t immediately picking things up, so I then tried Eve, which I found easier to set up initially.
In Home, it was initially displaying that no remote services were available.  This means that HomeKit functionality wasn’t actually working from the Apple TV 4.  Here’s what I did to resolve that:
1. Sign out of iCloud on ATV
2. On another device that can manage your iCloud account (I used my iPhone 6), navigate to the devices section, select ATV and select forget this device.
3. Log back into iCloud on ATV and enter a new two factor authentication code as prompted.
4. Wait.  Go mix yourself a cocktail, or go walk the dogs… and then launch the Home app again on your iPhone. (I only had to wait 3 or 4 minutes before HomeKit appeared in the iCloud section of the ATV, but on the Apple support forums, other users had different experiences).
So, now Siri works on my iPhone, and also on our Apple TV 4!  Yay!  
Issues that I’m still trying to sort out:

  • Dimming lights via Siri 
  • Getting the status to update in the Home app – sometimes I have to issue a command twice to get the status. (update: this appears to have sorted itself out)
  • More consistent – Garage lights seem to only turn off or on once when using Siri, or using the Home app.  (fixed: make sure that the values are set properly for the on & off urls in the config.json file – check the advanced tab in HomeSeer)

I’ve tried a few apps on my phone, Apple’s Home app, Elgato Eve, and Home for Homekit.  All 3 worked – but I found the Home for Homekit app hard on these old eyes….  Eve was nice, and had some nice icons to customize your accessories.  Apple’s Home app is probably the easiest to view – and I liked that I could customize the room backgrounds with my own photos.
Elgato Eve
Home for HomeKit
Apple Home
 
 
 
 
 
 
 
 
Here are some additional links I found useful.