A few weeks ago I installed the Ring Alarm and wrote a post about it. Towards the end, noted that I wanted to integrate it with Home Assistant. Unfortunately, native integration isn’t there yet, but the good news, at least for those running Hass.io, is that there is a Hass.io addon that will integrate all Ring devices via MQTT.

If you don’t have Hass.io, it’s still very much possible to get this going, but I just don’t know the details on how to do that. So I’m not going to go into any detail on how to do that.

MQTT

The first thing that you need to do is install an MQTT broker. Many HA users already have that. If you don’t, then the easiest way to get it running is to use the Hass.io addon. I’m currently using the official Mosquitto Broker addon. But I’ve been thinking about moving to the community addon, MQTT Server and Web Client. Either should work just fine. I recommend configuring it with a username and password.

After you set it up, you will need to add some config to the HA yaml file and then restart HomeAssistant.

Next, install the Ring addon for Hass.io. Go to the Hass.io menu and then to the Addon Store. Add the https://github.com/rs1932/ring-alarm-hassio-addon repository. Open the Ring Addon, and edit the config for it. You should only need to add the username and password for the MQTT broker and the email/password for Ring. You may need to change the IP address for the MQTT broker as well.

Now when you start the addon, the sensors should show up in Home Assistant. They will definitely show up in the states view. In lovelace, they might have to be added before they will show up, depending on how you have it setup.

I am currently paying around $27 a month for my monitored home security system. And that’s just a system with 3 door sensors, 2 motion, and cellular/battery backup. It’s just a dumb system with no connection to the Internet. I have to be at the one keypad to be able to arm it.

When I learned Ring has a system that would only have a monthly fee of $10/mo or $100/yr, I decided to take a deep look into it. After a couple hours of reading, it seemed like a no-brainer. It would pay for itself within a couple of years. And that would include more sensors, and now I would have the ability to manage it from my phone, while still having a keypad for the less technical family members.

Now, most of you that have read my blog before probably know that I’m not a fan of cloud managed systems. I like to have local control. Mainly because I would rather not have the company go out of business and leave me with a brick. However, considering a security system needs to be centrally monitored, I’m not really sure there’s any way around that. And also, this is owned by Amazon, and it looks like they are pumping money and effort into this product line. I personally don’t think they are going anywhere.

The Ring Alarm comes in a bunch of different bundles. The smallest bundle comes with the base station, a keypad, door sensor, motion sensor, and repeater. Larger bundles include more of the sensors, along with things like flood/freeze sensors, smoke/co alarm listener)it only detects when your dumb amok/co detectors go off), sirens(the base station has one built in), and panic buttons.

The one I got is the 11 piece bundle that includes the base bundle with 4 more door sensors, 1 more motion sensor, and a smoke/CO listener.

Setup

Setup of this was simple. They don’t get any bonus points for this, because pretty much every company that does home automation needs to get this right. It should be easy, and it was. The devices in the base bundle were already paired with each other. I just had to install them. You can install the sensors with tape or screws, both of which were included. The addition sensors arrived separate from the base 5 piece bundle, and had to be paired manually, which just took an extra 30 seconds per device. The base station connects via ethernet cable or WiFi, but not both at once. They say it’s for security reasons, but I can’t really think of a reason as to how that’s a security risk.

The only thing I had an issue with was the physical installation of the keypad. My current keypad is wired so it’s attached to a single gang electrical box. So this new one has to go in that same spot. But the Ring keypad didn’t have holes for a single gang box. It just had 3 random holes. This wasn’t too big of a deal, because I just put the middle hole on the bottom hole of the electrical box, and then I just took the screw for the other holes and screwed it thorough the plastic of the keypad holder. I feel like that is where they should have put a hole. I doubt I’m the only person installing it this way.

Another small issue I had was our basement door. Because those basement exterior walls are thicker, the door is recessed by a couple of inches. That means I couldn’t put the magnet part of the sensor anywhere on the trim as it was too far away. And putting it on the inside of the trim would cause the door to hit it. Luckily, I had a stack of strong thin magnets that I had bought, and I was able to put that there, and it worked perfectly. Only one side of the magnet triggered it so I had to make sure the correct side was facing the sensor.

The Smoke/CO listener has to be installed close to any smoke alarm in order to trigger. You have to run a test on it before the Base Station will alert the monitoring service. Keep in mind that you will need to put the listening sensor into test mode before you test your Smoke/CO Detectors, otherwise they try to call the primary person on your list and then they dispatch the fire trucks. One cool thing was that it was able to differentiate between the smoke siren and the CO siren. I have these First Alert Smoke/CO detectors hardwired to each other(Little side note, as I was testing the listener, I discovered our kitchen smoke detector was dead. I ran out to Costco to buy 9 of these to replace them all. They are insanely loud). I’m not sure if it can detect the difference between smoke and CO sirens for all detectors or just certain models.

Third-Party Devices

So I was not expecting anything more than the devices that I purchased in this bundle. However, after setting everything up, I noticed in the app that there were additional non-Ring devices that work with this system, and I actually already owned 2 of them. The first was a Z-Wave First Alert Smoke/CO Detector. The hardest part was actually removing it from Home-Assistant, but I was finally able to get it out of there, and it paired with Ring in less than a minute. The only issue is that when I press the test button on the detector, the Ring Base doesn’t let me know anything. I know that the message gets sent, because I saw it when I had it on Home Assistant. The only way to test the Smoke/CO alarm’s communication with Ring is to actually start a fire. I’ve told customer service about it, so hopefully they fix that.

I also have a Yale YRD-240 lock. I had bought it a few years ago because I just wanted a lock for my garage with a keypad that didn’t have a keyhole. A six digit code is going to be way more secure than a key. Anyways, it came with a Z-Wave module that I never installed because I didn’t have a need for it, and it would just consume battery faster. Well now that I got this Ring system, I decided to try it out. It took a few minutes to pair because I think I was just going through the menu too fast. When I hit the last key, it would just generate an error tone and not even try to pair. When I did it slowly, it went through just fine. After it got paired, I was able to lock and unlock the door through the app. Alexa was also able to lock the door.

I only have it on the garage door, but I’m thinking about putting it on all the doors. It would be nice to just ask Alexa if the doors were locked instead of checking manually every night.

Drawbacks

None of these were deal-breakers for me, but they are definitely things that I would like to improved upon.

You can only set 4 digit codes. They really should have an option for a 6 digit code. They’re a security company now. They shouldn’t set an arbitrary limit on this. My main reason for this is that when you pair a lock, it can actually manage the codes on the lock. So when you add a user into Ring, and give them permission to unlock locks, their Ring security code automatically gets entered into the system. There’s also a setting to disarm the Ring when someone successfully unlocks a lock via the lock’s keypad. It’s a really cool feature, but I would prefer to have longer code on my external locks.

No Face/Touch ID on iOS app or the Android app. Again, you’re a security company, this should have been a feature at launch time.

This is more of an FYI than a gripe, but you need to keep in mind that the cellular backup is in place only fore situations where the alarm is triggered and the monitoring center needs to be notified. If the Internet is down, you still won’t be able to manage your system via the app.

The Ring has door sensors, and it can control the locks on the doors. It needs to have some logic that locks the doors after a few minutes when they are closed. I’m going to see if there is a way to do this via Routines in Alexa.

Only the base station chimes when doors are opened. My base station is on the main floor, and I can’t hear it in the basement or the second floor. They need to make a secondary device that chimes when doors are opened.

You can set different chimes for when a sensor is triggered. However, there were only 4 to choose from, and a couple of them are just too long.

I haven’t seen it firsthand, but I have read tons of reports of people saying the keypad locks up if it’s plugged in all the time. They really should fix that. It would be nice not having to worry about charging that thing.

No Siri integration. Again, you are backed by Amazon. You should be able to handle this. I haven’t tested it, but I’m assuming the Android integration isn’t there either.

Again, none of those are show stoppers for me since my list of gripes with the old system was much longer.

I started writing this post when I first bought the system about 10 days ago. I just finished up, and after using it, I’m really happy with it. I’m going to see if there’s any type of automation I can do through Alexa. I’ve read something about Alexa guard, which is supposed to have Ring integration. It’s supposed to be able to act as a glass break detector, but I can’t find any info on the integration. And I’m also going to try and get Home Assistant integration working. Of course I will make another post if I make any real progress with either of those. And as always, please post below if you have any comments or questions.

So as someone that has a blog that mainly has posts that either relate to the ESP8266 or Home Assistant, I feel like I should have been using ESPHome a long time ago. TL;DR: If you have ESP8266 devices and Home Assistant, you should absolutely be moving stuff to ESPHome. I plan on moving my Garage Door, Fireplace, and Sump Pump Monitor over to ESPHome.

Anyways, I read about how Home Assistant added support for ESP32 based cameras on ESPHome. That piqued my interest, so I bought one, and decided that would be the first device I use ESPHome with.

NOTE: The one that I bought is the same as the links above, but mine doesn’t have the BME280 sensor for temperature, humidity, and pressure. As you can see in pictures, it has a spot for the tiny sensor, but no sensor. I didn’t realize that when I bought it, or else I would have gotten that version. The ones in the links above have the sensor, and I’ve got code below to enable the sensor. You will just need to uncomment it.

NOTE2: I’m using Hass.io with the ESPHome add-on. That makes things a lot easier to manage your ESPHome devices. So if you’re not running Hass.io, you will likely have more steps you need to do, which I am not going to be too familiar with.

Install the ESPHome Addon. In Home Assistant (HA), go to the Hass.io panel -> Add-on Store. Add https://github.com/esphome/hassio as an add-on repository. Click on the ‘ESPHome’ addon and install it, and start it. Click on “Open Web UI” and login with your HA login.

Click the ‘+’ button to create an ESPHome node. Enter a name for it, and select the device type. In my case, it was the Generic ESP32 (WROVER Module). Put in your WiFi information and then submit.

Compile the firmware. Click the 3dots on the new node and click ‘compile’. It can take a minute or 5 this first time.

Upload the firmware to the ESP32. If you just connect the ESP32 directly to your HA computer/Pi, then at the top right select the TTY for the ESP from the dropdown, and then just click Upload on the node. This will take a minute or so.
Alternatively, if you are like me and your HA instance is in your basement, and you don’t feel like plugging directly into it, you can download the binary using the link at the bottom of the compile dialog from step 3. After downloading the file, follow the steps below to upload it from your PC:

Run these commands from the command line. I’m thinking it should be the same for any OS, but I was using Win10. I ran it from the Win10 command line, not the python command line.

pip3 install wxpython

pip3 install esphomeflasher

esphomeflasher

That should open up a nice little gui. Select the ESP32 COM port, browse to the binary file you downloaded and flash it.

In ESPHome, it should show online after a few minutes. For this node, you can now upload all future firmware updates to it over WiFi, without connecting it to the computer. When we created the node, all it did was upload firmware that allows it to connect to WiFi and talk to ESPHome. Now we will make changes to the YAML for that node to add functionality to the firmware.

Under the node in ESPHome, click ‘Edit’. Add the following code to the end of the existing code. If you got a unit with the BME280 sensor, be sure to uncomment those lines. For the display/font config, you will need to download that font(or whichever font you want to use) and copy it to your Hass.io ‘config/esphome’ directory. Then Save and Close:

Upload the code again. You can upload it over the USB if you want, but Over-The-Air (OTA) updates should work now. Just select OTA from the drop down at the top right. The click Upload. Any time you add or remove components to the node, it has to completely recompile, which takes a few minutes. If you just make minor changes to a node’s component, then it takes about 30 seconds. Note the IP address of the node in the logs after it finishes uploading.

Add the Integration in HA. In HA, go to Configuration -> Integrations. Configure the ESPHome. Give it a name. It will ask for a password if you set one when configuring the node. Now, the camera, PIR sensor, and the BME280 sensor should show up in HA.

And that’s it. I really wish ESPHome was around when I first got into this. It would have made things so much easier than having to write the code for each project. Something that took me a couple days to code could have been done in 20 minutes. Hopefully this is useful to someone. Feel free to comment below if you have any questions.

I had recently put Sengled Zigbee bulbs in my nightstand lamps to pair with Zigbee2MQTT on Home Assistant. I was using them to automatically turn the lights off/on when playing/pausing a movie on the TV. However, we found ourselves cutting power to the night stand to turn them off since pulling out our phone to turn them off was too much of a hassle. So when they had no power, the automation for those bulbs wouldn’t work unless I manually turned them back on. Not an ideal situation. That’s when I started my hunt for smart buttons. I bought some Echo Buttons, as I wrote about previously, but their bulkiness and ugliness just didn’t work for me. So I decided to get a couple types of the Xiaomi Aqara buttons:

They also make a single button version of the second switch, along with wired versions of the second switch. Although I’m not sure how well it will work with US wiring. I’m pretty sure it won’t be simple to get it to fit in a standard electrical box.

For those of you that are just looking for my quick opinion on these: I have been using them for about a month now, and I love them. They look good, the button click feels good, and most importantly, they just work. I only have one issue, and I’m pretty sure it’s a Home Assistant/Zigbee2MQTT issue. Sometimes, after restarting HA, or turning the power to a bulb on/off manually, it pressing the button doesn’t turn the bulb on/off the first time, and I have to press it again. But after that first time, it works flawlessly, until I restart again, which isn’t often. I get this same behavior through the HA web interface, so I’m 99% sure that this isn’t a flaw with the buttons. If you have a need for a smart button, and you have Zigbee2MQTT, I would recommend these buttons. If you have another Zigbee platform, there’s a good chance they will work with that as well. I did have another issue with pairing, but I can get it going without issues now. Just read on if you need help pairing it.

Pairing the Aqara button with Zigbee2MQTT

This was the most challenging part for me. And it took me a while to figure it out. First enable pairing in Zigbee2MQTT. To pair the dual button, you have to hold one of the buttons for 10 seconds. The blue LED will turn off and then back on. That is when it’s ready for pairing. The Mini Button has a tiny button on the side. Just hold that for 3 seconds, and it will start pairing mode.

Now the trick for both buttons is that after it starts pairing mode, you need to press the button every 2 seconds to keep it awake. I think that with the Xiaomi official hub, it is sending some signal to keep it awake until pairing is complete. However, with other hubs, they aren’t sending that signal, so we have to keep them awake manually until they pair.

Once it is paired, it should show up as a sensor at the top of Home Assistant. You may need to switch to the ‘States’ view in case you have made the switch to Lovelace.

Now, when you press the button, you should see the states of those sensors change. For the dual button, you have 5 possible states: left, right, left_double, right_double, and both. Although if you double click too fast, sometimes it won’t register it. For the Mini, you have click, double_click, triple_click, and quadruple click.

You can use any of those types of clicks to create an automation in Home Assistant.

Home Assistant automation with buttons:

I haven’t really setup the single button to do anything yet, so below I’m just going to post the HA yaml code for what I’m using the buttons for. That is to toggle our nightstand lights. Left/right clicks toggles the left/right lamps, and pressing both buttons at once toggles both lamps. It should be pretty straightforward to take this code and have it do whatever action you want. As a bonus I went ahead and posted the automation to turn the lights off shortly after sunrise (We were sometimes turning the lights on when we got up and then forgetting to turn them off when we left for work).

It’s been a few months since my post about Hubitat, and I have not been too happy with it. The MQTT bridge works, but sometimes things get out of sync. For example, if I turn the power on the Zigbee bulb off and then on again, I can’t control the bulb through Home Assistant until I turn it on and off through Hubitat first. So I started my quest for an alternative. It costs almost nothing, so I decided to try out the CC2531 Zigbee stick.

The easiest way to to program it is to use the CC Debugger tool. I don’t have one, but it looks pretty easy. But that thing costs another $15, so I decided to do it with a Wemos D1 Mini since I have a dozen of them laying around.

I also want to let you know that the range on this is VERY short. I’m talking maybe 20 feet. Since my server is in the basement, and my devices are on the other floors, I wasn’t able to get them to connect unless I put them in the basement. I actually had to go out and get an Ikea Trådfri outlet which acts as a repeater, and that’s its only purpose in life. I’ve got 2 of those outlets and a bunch of Sengled White and RGB bulbs. Everything works perfectly.

Here are the steps to program the CC2531:

Load the sketch(code) onto the Wemos D1 Mini.
You can download it from HERE. Just go to that page and click ‘Clone or download’ and then ‘Download Zip’. Then extract the zip file. In Arduino IDE, open ‘\CCLib-master\Arduino\CCLib\Examples\CCLib_proxy\CCLib_proxy.ino’. Edit the section for pinouts so it looks like below, and then upload the code to the Wemos.

int CC_RST = 5;
int CC_DC = 4;
int CC_DD_I = 14;
int CC_DD_O = 12;

Connect the Wemos/Downloader Cable/CC2531The small connector on the downloader cable goes to the CC2531, with the red line on the cable being closest to the largest chip. There’s also a tiny ‘1’ that denotes pin 1, which corresponds to the red line on the cable.
The larger connector will be connected to the Wemos using 4 jumpers. And pins D5 and D6 on the Wemos also need to be jumpered to each other. I used the male + female headers, so I just bent the pins on the male side so they are touching. Below is a drawing of how it should be connected.Now, plug both the Wemos and the CC2531 into your computer.

Download and install Python and PIP (a package manager for Python).
You can download Python HERE. And the instructions for installing PIP are HERE in case it didn’t get installed with python. Then run the command below to get the Python package for connecting to serial devices:

python -m pip install pyserial

Upload the firmware to the CC2531
Download and save the firmware file located HERE. Firefox added a .txt extension to the filename when I downloaded it. So if that happens to you, you need to remove that extension. Save it to \CCLib-master\Python. Open a command prompt and ‘cd’ to the \CCLib-master\Python directory. Run the following command to make sure your connections are correct(Change COM3 to whatever COM port was assigned to your Wemos. You can check that in Device Manager in Windows):

python cc_info.py -p COM3

If it worked, you should see INFO: Found a CC2531 chip on COM3 on the first line followed by a bunch of information about the CC2531. If not, then check your connections. Then run the following command to upload the firmware:

It will ask you if you want to continue, press ‘y’ and then ‘enter’. It will start uploading the firmware. enjoy the break, because this will take a few hours. After this is done, the Zigbee stick is ready for use.

I am currently using Hass.io in docker running on Linux Mint. So I just installed the zigbee2mqtt add-on. I used the following config on the add-on screen. Everything is the default, except for ‘serial_port’. Unfortunately, you can’t access the CC2531 using /dev/serial/by-id/devicename. It’s only accessible via /dev/tty*, which is assigned at boot. So, especially if you have more than one USB device, that name can change when you restart the computer. the /dev/serial/by-id path will always be the same. So there might be times where after a reboot, you will need to change that name in the config. :

After you do that, I HIGHLY recommend you follow the steps towards the end of the add-on’s readme that contains some config for Home Assistant. That will allow you to add a small panel that presents a switch that allows you to enable pairing for 5 minutes, and displays the timer for that. It also displays the status of the Zigbee bridge.

I hope this helps someone out. Let me know if you need any help with it.

I’ve been looking for a while for a button that I can use to integrate into my home automation. I was excited when Amazon announced the Echo Button, only to be disappointed to hear that it can’t toggle a light or a switch. They can be programmed to only turn something on or only turn something off. I’ve figured out a workaround to get it to toggle devices.

They recently had a price drop, so I figured I would just order them just to see if I could get any use out of them in other ways. My first thought after opening them is that they are larger than I had hoped for. However, after discovering that Amazon’s intention wasn’t just to use it as a way to trigger routines, but also play games, their size makes a little more sense. The best part is that I was actually able to figure out a fairly easy way(assuming you’re using Home Assistant), to toggle something using the Button.

You will need to setup the Echo and the Buttons. I’m not going to go into any detail on how to do that since there are tons of resources on it, and it’s pretty straightforward. If you do need help with it for some reason, post in the comments. The Buttons are pretty much telling Alexa you want to set them up, and she walks you through it.

Next, we need to setup Home Assistant(HASS). First, you need to setup the Emulated Hue Component. This component emulates Philips Hue devices, which can then be added to the Echo. Below is the yaml code I used. The IP addresses are just the IP of your HASS computer. The other settings are explained fairly well in the documentation link for this component. The most important is to have ‘script’ in the exposed_domains list and the ‘off_maps_to_on_domains:’ section.

Now, setup the script that will be called when the Button is pressed. The script just toggles a device. In this case, I am toggling my fireplace (because that’s still my favorite project). Of course, you will need to change the ‘alias’, ‘service’, and the line below ‘entity_id’.

Save the config and restart Home Assistant. Then go into your Alexa app. Tap Devices -> Plus button at the top right -> Add Device. Tap Philips Hue, and then “Philips Hue V1 bridge”. It will take just under a minute to search for the devices and it should find that script that you setup. Just follow the steps to finish adding it. After that, the script will show up in Alexa as a bulb that you can turn on or off. And whether you turn it off or on, it will just run that script in HASS.

Finally, we setup the Routine for the Button.

In the Alexa app, tap the menu button at the top left, and then ‘Routines’.

A few months ago, I bought and installed a Zwave stick. However, I want to start adding some smart bulbs to my house, and Zigbee is typically the way to go for that. And from what I read, people were having problems with Zigbee USB sticks and Home Assistant. So I decided to buy a Hubitat(Amazon).

So far it’s been OK. I was able to add in one of my CT-101 Thermostats without problem. And as a bonus, humidity actually works, unlike in Home Assistant. And I also purchased some Sengled Bulbs in White and RGBW. I haven’t tried out the White bulbs yet, but I’m sure they will work after my experience with the RGBW. I just went into the Hubitat, and clicked add device, turned on the light switch, and it showed up a few seconds later on the Hubitat.

Adding it was the easy part. However, I was a little disappointed in the interface for actually controlling the bulb. Even after installing the Dashboard addon, all I could do was turn it on and off and change the brightness ( The slider was very clunky via my iPhone). I couldn’t change the color or the temperature in the Dashboard addon. I was still able to do all those things in the basic web interface, but as you can see in the screenshot below, it’s not very user friendly or nice to look at. On top of that, there isn’t even a color picker. You have to manually change the Hue and Saturation to get your color(No Hex values either). I really hope they put more effort into the Dashboard and the interface. I was secretly hoping I would be able to abandon Home Assistant for this, but this along with a handful of other things (no Telegram support, no native MQTT ) put a quick stop to those thoughts.

The basic interface to control an RGBW bulb.

Now that the mini-review is out of the way, I’m going to start working on integrating it with HA. All the instructions are already on the github for the Hubitat MQTT Bridge, but I just wanted to type it up as I go in case there are any issues I run into that might help someone else.

Install the MQTT Broker using the hass.io addon, and configured with a basic username and password. This was done previously. I’m not going to go into any detail as there are tons of resources on how to do this.

Started the bridge. I changed the default port since I was already using 8080: sudo docker run -d –name=”mqtt-bridge” -v /opt/mqtt-bridge:/config -p 6788:6788 jeubanks/hubitat-mqtt-bridge

Edit the config file sudo gedit /opt/mqtt-bridge/config.yml . I changed the host, username, password, and port. Make sure you uncomment the lines. I made that mistake and the bridge wouldn’t start, and nothing indicated that it didn’t start. Feel free to change the other things if you want to.

Restart the bridge: docker restart mqtt-bridge

In Hubitat go to Drivers Code -> New Driver and copy/paste the Drivers Code and save it.

Go to Devices -> Add Virtual Device and put in “MQTT Device” for the name and for the Type dropdown, select MQTT Bridge(It should be all the way at the bottom) and then Save.

On the next screen, put in the IP, MAC, and the port you specified and click the save button directly under the IP address field.

The bad news here is that it looks like either Hubitat or the Sengled bulb ( not sure which one) can only use Hue/Saturation/Levels values to set their color. Home Assistant only supports RGB and (I think) XY values. The good news is that there is a Pull Request for this. Hopefully it gets merged soon. The MQTT JSON light component supports HSL, but I’m guessing that means the bridge would need work to get things working.

Another issue I ran into is one that I don’t think many others will see. I’m putting it here in case someone else does the same thing by accident. Anyways, I was able to turn the light off using HA, but not on. In the bridge logs, it kept saying the ‘on’ message was a duplicate and it was ignoring it. It turns out that when I was testing things, I had HA publishing to the ‘set_state’ topic instead of the ‘cmd’ topic. So I went into the /opt/mqt_bridge/state.json file and deleted the line for ‘set_state’ and everything is fairly close to working now.

Update1: I still have an issue where if I turn off the light, in order to turn it back on, I sometimes have to move the brightness slider. Turning it off and on via Hubitat sometimes resolves the issue. I can’t seem to reproduce the issue or the fix consistently.

Update2: It looks like the switch/state topic is not getting updated by Hubitat for some reason. And I think it might be going back to the ‘set_state’ topic. Even though I deleted it, it just keeps coming back in. The only consistent workaround seems to be manually publishing a random word to that ‘set_state’ topic. But even then, the issue appears to just randomly come back.

In my Last Post I talked about doing a physical installation of some Z-Wave thermostats. In this post, I’m going to talk about what I had to go through to get an Aeotec Z-Stick Gen5 working with Home Assistant running on Lubuntu. I was actually surprised how easy everything was; I had no idea that Home Assistant’s Z-Wave integration was so well done.

Troubles with Hyper-V
NOTE: If you are running your Home Assistant on physical hardware such as am RPi, then you can skip this part. The main people that might be interested in this are the handful of us that are running it in Hyper-V.

The hardest part for me was because I am running the Lubuntu/Home Assistant install on a virtual machine running on a Windows 10 computer running Hyper-V. Hyper-V, unfortunately doesn’t support USB pass-through like VirtualBox or VMWare Workstation. What this meant for me is that I wouldn’t be able to ‘plug’ the USB stick into the Home Assistant computer. Lucky for me, there was a ‘free’ workaround in a software called VirtualHere which lets you share your USB devices from one computer to another over the network. So I was able to plug it into my Windows host, and access it from the Lubuntu guest. This wasn’t ideal, but it worked. I do plan on moving this to a dedicated computer eventually, but this will have to do for now.

The first thing I did was install the server on Windows 10. I installed it by running it with the -b flag: vhusbdwin64.exe -b . That’s really all that you need to do on the server. You can check their website for more documentation if you want to secure communications or restrict some devices.

Next, I ran the client on Lubuntu using sudo. The main requirement is that you need a fairly recent kernel that has the USBIP drivers compile in. Most recent distros have this. After running the client, the USB stick showed up, and all I had to do was right-click and click ‘Auto-Use this device’. That means the device will be connected every-time you start the VirtualHere client. You should now see it if you run an ls /dev/ . You may want to run that command before using the device to see which device it showed up as. In my case it was /dev/ttyACM0.

Now, the main problem at this point is that the client can’t be installed as a service unless you have the paid version. And it also needs to run as sudo, which makes it difficult to have it autostart. So I was only able to find a crappy workaround to have it startup automatically when the computer is rebooted. I set the following command to run at startup: echo password | sudo -S vhuit32 . This works, but it’s not a very good idea to have that password in plain text, which is why this is a crappy workaround. I’m not at all a Linux expert, so there might be better ways to do this. If you know of any, please let me know.

Setting Up Z-wave in Home Assistant
After I was able to get the USB stick communicated with my system, the rest of it was very easy. The first thing I had to do, was install some prerequisites using the following command: sudo apt-get install libudev-dev libpython3.6-dev python3.6-dev . On the RPi, you have to enable the serial interface in raspi-config.

Next, plug in the USB stick and run ls /dev . You should see the device there. Mine was named /dev/ttyACM0. You can try using the command ls -ltr /dev/tty*|tail -n 1 which should also show you the time the device was added so you can confirm it is indeed the Z-wave stick. Worst case, just run the ls /dev before and after plugging it in and see what device shows up.

Once you know the device name, just add the following to your Home Assistant config, replacing the device name with yours:

The network_key is optional, but I would recommend it to help increase security. DON’T use this network key. Make up your own. Just be sure to save it some where safe. If you have to reconfigure your Home Assistant, and you don’t have the key, you will need to factory reset all your Z-wave devices. Restart Home Assistant.

I read on Home Assistant’s site that after you start Home Assistant, it will take up to half an hour for the Z-Wave binaries to compile. I probably tried to pair my thermostats about 5 minutes after setting this up, and I didn’t have any issues. But you may want to wait just in case.

Pairing Your Devices
Pairing the devices was very easy. In Home Assistant, go to Configuration -> Z-Wave -> Add Secure Node. Now go to your device, and follow the instructions for that device to pair it. I only have my thermostats hooked up, and I just had to go into the menu, and tap on the little radio icon. A few seconds later, it showed up in Home Assistant, which promptly identified it as a thermostat, and had all the controls for it on the home screen. I was amazed at how well that worked. I thought I would have to do a ton of configuration just to get started, but I had full control of the thermostats right off the bat. It is a little annoying that it shows up as 2 devices, one for heat and one for cooling, but I think there might be ways to consolidate that. If I do it, I’ll make another post.

That’s all there is to it. If you are thinking about Z-Wave with Home Assistant, I would highly recommend it. It’s a very mature product, and as most Home Assistant users know, it will probably just keep getting better. And Z-Wave devices are widely available as well, from locks to sensors to switches.

NOTE: If you are replacing a thermostat, be sure to cut power to the board on your furnace that powers the thermostat. I made the mistake of just turning off the breaker labeled ‘AC’. The board still had power. As I was replacing the first thermostat, I must have shorted wires, which is likely to happen to most people. Lucky for me, this simply burned the fuse

I recently purchased and installed 4 IRIS/Radio CT101 thermostats from Amazon. This post is just to document the first part of this adventure: installing the thermostats. There might be some better guides out there, but I’m just wanting to document the things I ran into in the hopes that it might help someone in the future.

NOTE: If you are replacing a thermostat, be sure to cut power to the board on your furnace that powers the thermostat. I made the mistake of just turning off the breaker labeled ‘AC’. The board still had power. As I was replacing the first thermostat, I must have shorted wires, which is likely to happen to most people. Luckily for me, this simply burned the fuse on the board, and it only cost me a few bucks and a trip to the auto store. It could have been much worse. These boards typically have a red LED on them, and at least on mine, you can see the light without opening up the furnace.

CT101First, I want to talk about the reason I went with this thermostat. If you already know what you want, you should probably just skip ahead to the next section. My main reason for this thermostat was the price. $45 x 4 thermostats is a much easier pill to swallow than $250 x 4 for something like a Nest thermostat.

One thing to keep in mind is that the Nest is, by itself, a ‘smart’ thermostat, whereas the CT101 is a simply a ‘connected’ thermostat. The difference is that a smart thermostat can adjust the temperature on its own based on criteria such as the weather. However, a thermostat such as the CT101 doesn’t really offer much more than a 7-day programmable thermostat, except for the fact that you can connect it to a home automation system such as SmartThings, or like in my case, Home Assistant. But that integration makes it much more powerful than the smart thermostats on the market. You can adjust the temperature in your house based on virtually any information available via the Internet or other sensors in your house.

The CT101 comes with an optional wall plate. I think it looks much better without it, but you may need it if this thermostat is smaller than your old one in order to cover up holes or paint discoloration. It is also a little more difficult to install the wall plate.

C-WireOne thing that I discovered is that the builder of my house didn’t connect the C-Wire on any of the thermostats. This is a wire that is used to provide power to the thermostat, but isn’t required if the thermostat has batteries. It was annoying to see that my thermostats were capable of using the C-Wire, but the builder just didn’t bother hooking them up, and to make things worse, they actually cut them back. My thermostat had the White(W/Heating), Yellow(Y/Cooling), Red(R/Power), and Green(G/Fan) wires connected. However, I would recommend connecting the C-Wire if you can since these thermostats typically use a lot more power since they need to be communicating regularly.

Fortunately, both ends of the wire, on the thermostat side and the furnace side, had some slack on it. So I was able to pull it out and simply connect the C-Wire on both ends. The pictures below show wires. The first shows the Blue C-Wire connected to the C terminal on the thermostat. The second picture shows the furnace, and I connected that to the C terminal on the furnace board. That’s really all there was to it.

One thing to keep in mind is that you may actually have 2 sets of wires coming into the furnace. One of them go your thermostat, and the other might go outside to control the compressor for your AC. In the second picture, you can see another wire connected on the C terminal and the Y terminal on the furnace. Those wires are going out to the compressor. You don’t need to worry about that for installing the thermostat, but it was something that I learned in this process so I figured I would pass that knowledge on.

Installing the ThermostatThis part is easy, unless you are colorblind. All the terminals are named based on the color of the wire. Yellow goes to Y, white goes to W, and green goes to G. Red is a little different in that there is an Rh and an Rc terminal. For most people, you should be able to connect it to either one since they are bridged together with a small wire. If you have separate wires for Rh and Rc, then you remove that bridge and connect each wire to the corresponding terminal. The only one that doesn’t follow the colors is the C wire. It’s usually blue and it goes to the C terminal.

Heat PumpsSo I had no problems with the 2 thermostats on my main floors(other than frying that fuse). After I connected them, they worked right away. However, the basement did not work at all. After an hour of messing with it and checking the wires, I consulted the manual (remember kids, read the manual first), and discovered the switches in the battery compartment which adjust things like gas, electric, and of course heat pump. From what I have read, other thermostats have settings in the menus to adjust these things. But after I set the switches correctly, everything was working perfectly.

That’s it for this post. As always, post a comment if you have questions. I’m by no means an expert on this, but I will help as best as I can. I hope to have the next post done soon. That one will be way more interesting that this one. I just wanted to document my experience with physically installing the thermostats.

NOTE: I have noticed, along with many other people, a small constant buzzing sound from my chime. This buzzing appears to affect many smart doorbell like Ring, August, and Nest along with this one. I think I might have an easy fix at the end of this post.

Ever since Ring released their video doorbell a few years ago, I’ve been waiting for a WiFi video doorbell that didn’t rely on the cloud (and a monthly fee), was powered by hard wire, and still looked decent. I’ve only had it for a few days, but I think that the Nelly Security doorbell accomplishes this. Unfortunately, it looks like the Nelly version is out of stock at the time of writing, but this doorbell has been rebranded by a bunch of other companies, one of which is Nelly. Uniden also has their own rebranding of it. All of them are pretty much the same except for the logo. Even the firmwares are all interchangeable. Some of the other companies using this camera are HikVision, LTS, and Clare.

Your doorbell transformer must be between 16vac and 24vac. Here’s one in case it is not. There’s a good chance that your existing doorbell transformer will work.

Your doorbell chime will need to be compatible with the transformer.

Some basic screwdrivers.

Smartphone

The first thing you need to find your doorbell transformer and make sure the voltage will work. This was a challenge for me, but in the end it, turned out that the transformer was right behind my doorbell chime near my entrance. From what I have read, it could be in a number of places. Maybe directly under the door in your basement or crawl space, in your electrical panel, in your attic, or somewhere on your furnace. Lucky for me, mine was 16vac, so it should work with the WiFi doorbell.

Next, check and see if you have a mechanical doorbell chime or a digital one. If your chime plays a fancy tune, then it’s likely a digital one. If it just goes ‘ding-dong’, then it’s probably a mechanical doorbell. I had a mechanical doorbell. But if you have a digital one, you will need to connect the supplied diode in-line in the wiring from the video doorbell to the chime.

The picture on the left is the chime, and the one on the right is the transformer, which was behind the chime. If your transformer isn’t correct, then you will need to replace it. Just connect the wires the same way as the old one, but make sure you cut the power to the doorbell first.

Both leads from the transformer go the the chime, but one of them go through the doorbell button first.

Once you have confirmed you have a compatible transformer, you can remove the old doorbell button. Most of them should just be 2 screws holding it to the wall/doorframe. After you remove those screws, loosen the 2 screws holding the wires, and disconnect the wires:

Now you just need to connect the video doorbell. Everything I’ve see says the way the wires are connected don’t matter, but when I connected mine, it wouldn’t connect to WiFi until I reversed the wires, and it worked. Just something to consider in case you have issues connecting to WiFi.

After you have it connected, the light around the button should turn on. Wait a minute, and it should start blinking blue and red. It is waiting to be configured now. Open up the app on your phone. Tap ‘More -> Settings -> WiFi Settings’. Put in the information for your network and tap ‘Generate’. That will generate a unique QR code.

Show that QR code to the doorbell camera. You can tap on the QR code to make it bigger if needed. I have an iPhone 8+ and I had to hold it about 6 inches away. You may need to slowly move it slightly closer or further away to get it to read. Once the camera reads it, it will beep. After a few seconds, it will let you know whether or not it connected. If it didn’t connect, then try reversing the wires. You may also have a weak WiFi signal there and you may need to use a repeater if your router is too far away.

After you have it connected to the network, you can go ahead and screw it into the wall and put the faceplate on and screw the faceplate in at the bottom using the tool provided:

Once the doorbell is connected, you can add it into the app. The app will then ask you to set a password for it. This password will allow you to access the web interface where you can view the video through your computer’s web browser. The username would be ‘admin’. Check your router to find out what the IP address of the doorbell is.

If you want to add it to something like Blue Iris, iSpyConnect, or Ivideon, then you can use the following address: rtsp://ipaddress/mpeg4/ch01/main/av_stream

Once everything is setup, when someone rings the doorbell, it will actually show up on your phone like a phone call and you can have a 2 way call with them. The audio isn’t great, but I don’t really have any trouble understanding what is being said on either end. For the price, I’m impressed with what this thing can do. The video is pretty good as well. If there’s nothing in the way, you could probably see your whole front yard.

Possible Fix for Chime Buzz

If you are experiencing a buzzing sound then this fix might work. It worked for me at least. The buzzing happens because your smart doorbell draw a lot more current than your old dumb button. That current has to flow through the chime, and it creates a buzzing sound.

Your chime should have a terminal for the front door and the back door, with the common terminal in the middle. I would think that most people aren’t using the back door. If you are then I don’t think this will work for you but you can try. Just take a wire and connect the back door and front door terminals together. That should cause the doorbell camera current to be split between the front and back door chime circuits, basically reducing the current for the chime in half. That reduction can help eliminate the buzz. At least that’s what I think is happening.