I will start by apologising in advance. This post has been a long time in the making so it might be a little circular, muddled up.
I have been debating getting hold of a Raspberry Pi to build an environment monitor for a vivarium housing a leopard gecko. I might cover this part separately so it can be shared with leopard gecko groups. Anyway, as part of this grand plan, I was reading Troy Hunts blog about all the IoT and Home Automation and it got me thinking. I really like the idea of automating the house. Yes we can do it with timer plugs but I think proper automation would be better.
So, I have already covered the Ubiquiti installation in previous posts. For going down the automation route, I decided to add a new Network (VLAN) and dedicated SSID running 2.4GHz only. Affectionately named “InternetO’Shite”. This is published from just one of the AP’s, nearest where all the devices would be to start with. With this created, a new port group was created on the ESXi hosts belonging to the new VLAN. I downloaded the Home Assistant VMDK file from Home Assistant (home-assistant.io) and then created a VM without a hard drive. Uploaded the VMDK file, attached it and then failed to boot. I had to run through the conversion process to convert it from VMware Workstation to ESXi. With this done, the VM booted.
I will admit, I didn’t do much research on this, I know that Troy would have researched this until he was blue in the face. So I just went with it. Installation was simple enough, leave the VM once it’s booted and then go through a registration process.
I can see what is meant when Troy says you will spend time delving in to YAML files. Although I haven’t done anything too strenuous yet, I have been spending time in the files and at times it’s confusing. I set up my integration with Ring, along with a smart TV and the Xbox. I then went to set up the integration with Samsung SmartThings, I discovered here, that I needed to set up API access externally. OK now things got interesting, if it’s going to be public, it needs to have a certificate for HTTPS access.
I installed the LetsEncrypt Add-On, ran it and got a certificate, all good. Except that HTTPS wasn’t working. When you read through the documentation it states the config should use the default certificate path as per the CertBot output. But this doesn’t work. The config I ended up adding to the configuration.yaml file was
http: ssl_certificate: /ssl/fullchain.pem ssl_key: /ssl/privkey.pem
Note the path is just /ssl/…pem rather than including the FQDN like CertBot outputs. I had the File Editor and Terminal & SSH addons also installed, allowing me to edit the files and connect to find them initially!
One of the things I really wanted to do, was mount a NAS drive so that I could store video’s from the Ring system, and from a Tapo C200 camera, along with possibly add DVD/CD rips to allow media streaming around the house. I am not sure if it’s just because it’s the VM image, rather than going down the RaspberryPi route but the NAS drive would not mount for love nor money. This is a shame but the way it is.
This choice was my first mistake in the world of IoT, home automation etc. I knew I wanted some of the Aqara Temperature & Humidity Sensors for monitoring the Vivarium, three in fact. I was also looking to do some more stuff with lighting, power etc. I want these to not be on the Wifi, so, I know that when reading through Troy’s stuff, he uses a Conbee USB Zigbee adapter. I chose, because I am using ESXi to not go down this route, instead I went with a Zigbee hub that makes use of the SmartLife app on Android. It integrates with Tuya amongst other things.
Whilst it works, and it works with the sensors, I do have a couple of problems. 1 – the Home Assistant integration doesn’t work and 2 in the app, the battery level doesn’t get reported. As a result, I have since ordered a Conbee 2 from Amazon. I will attempt to re-use the Zigbee hub as an extender of sorts. But we will see.
Anyway, I digress slightly, I was out shopping on Sunday, which happened to be the release day of the Lidl Smart Home products. As I was out getting pet supplies, next door to a Lidl, I popped in and picked up a couple of smart plugs and an LED Light strip. The smart plug works well with the hub and app and I now use it to control the Christmas tree lights. All good, happy days (although not automated yet).
It’s a tough life, getting in to the Smart Home space. Troy has covered a lot in his blog, the standards, devices needing Wifi, Devices needing Z-Wave hubs or Zigbee hubs. Then there is the fact you need an app for these objects, an app for those. Home Assistant isnt perfect, but it does seem to be working.
Since initially setting up Home Assistant, going through swapping from a generic Zigbee hub to deCONZ & Conbee II, I have now gone through and set up Zigbee Home Automation to replace deCONZ. It seems to be working well. I re-paired all my devices and can control them all still. ZHA doesn’t seem to be quite as responsive to changing the devices as deCONZ but it is definitely working well.
Next steps, I have ordered some Sonoff Door/Window sensors. I have started playing around with the inbuilt alarm system. I need to do more automation and will slowly add to it. Hopefully next time I blog about this, it will be clearer and more concise.