Monday, May 23, 2022

NFC Tags

 I have reached a point in my smart home automations where it seems like I need to start adding buttons to trigger actions. Doing that would add another class of device that needs routine maintenance for batteries. The preferred solution that avoids batteries seems to using NFC tags. This approach has the added benefit of being much cheaper with the only apparent drawback being the tags seeming out of place in some installation locations. 

Home Assistant makes NFC tags very easy to use by including in the companion app both a reader and writer.  This allows you to purchase relatively inexpensive sticker tags that can be installed anywhere. These are the ones I ended up using tags , 28 stickers for a little under 14 dollars after tax.

I have added tags to trigger automations for obvious things like a bedtime routine, hue lights,  and outlet controls.  Additionally a couple more complex uses such as having a tag on my cars charging port cover that when scanned scheduled the car charger to start in 30 minutes giving the battery time to cool down  but still allowing me to have a full charge for a second trip later in the day. Also one has been setup to be scanned post shower; this schedules the bathroom fan and lights to turn off a few minutes later and handles disconnecting my phone from the Bluetooth speaker integrated into the vent fan allowing me continue playback of whatever I was listening too while the vent is still on. 

I am sure I will find some additional uses for these tags as I still have several left. I know some people have used these tags to track events instead of triggering actions. My next use for them might be to set basic alarms for things I routinely cook that rely on consistent timers.

Friday, May 20, 2022

Smart Window Blinds

  Since I purchased my home I have had black out curtains on all my windows so that I would have complete control over my lighting.  As part of my quest to lower my power consumption to match what my solar panels are producing I have started to reconsider the use of natural light. The obvious choice here is to add blinds/curtains/shades that I can control with my smart home. 

I chose to start by replacing the blackout curtains and blinds in my office with a FYRTUR smart blind from Ikea. This has proven to be an ok solution for a room that total darkness isn't needed in, but does not effectively block enough light for a bedroom. I will be looking into other solutions before replacing my bedroom curtains.

These blind support the ZigBee protocol, so adding them as a window cover in Home Assistant was very straight forward. The only issue I had was with adding the included remote to Home Assistant. I attempted to us the blueprint for the specific remote IKEA E1743 TRÅDFRI.  The issue is that IKEA uses the same model number for the remote but with different button labels and trigger actions delivered in the payload. I was able to create the necessary automations using that blueprint then manually edit the yaml to correct the string matching for the special remote included with the blinds. 



I have added automations to open the blinds as soon as my motion sensors detect I have started my day, close after sunset, and ensure they are closed when I leave my home zone.  

Saturday, May 7, 2022

3D Modeling

 I have been a fan of 3D printing for years. I bought a Makerbot Mini back in 2016 and upgraded to a CR10s in 2020. In all this time I have only ever printed interesting and useful things others have modeled/created. Occasionally I have added or removed a little bit of a model optimize it for my need, but I had never created anything entirely from scratch.  I just now finally found an issue that I could not find an existing model for. 



My Shark Smart vacuum that I have been using for years has a small issue of the power button being at the exact high as my door stops. This was never a problem before due to the pathing the vacuum would take from its dock. I recently relocated its dock as my new puppy seems to be obsessed with barking at it, and the only other reasonable location happens to set the vacuum on a direct path for this issue to happen almost every time. Other users have complained about the issue and have resulted in taping over it, but a plastic cover seems like a more elegant solution. 



As this is my first time modeling something I knew it might take a few revisions to get to a point that I am happy with. The first was too tight to fit in place. The second was too tall. The third was just right on one side. Rather than trying to properly curve the outer surface I decided to just tilt the cap to make sure neither side extended past the existing body. This was done to avoid scaring the baseboards; as the below photo shows the existing body already makes enough contact to transfer paint.


The forth revision printed with an angled fitted wonderfully. Printed in the only color of PETG I have available on hand. Now only time will tell if this stays in place after multiple cleaning sessions. The cover fits in place well enough that in order to remove it, I had to stick tape to it. Hopefully the tolerances are tight enough to make that a permanent solution. Either way this will allow me to get my vacuum back into the automation to run any time I leave the house. 

Thingiverse Model link incase anyone else want to print it. https://www.thingiverse.com/thing:5379770 

Monday, April 11, 2022

Sun Powered

In an effort to be more environmentally friendly I have gone thought the long process of having solar panels installed on my room. The process took over 3 months from initial quote to finally producing power. My system is comprised of 18  385W panels and a 6KW Solar Edge Inverter. These panels should be enough to offset my entire usage if I stop mining crypto and work out some energy saving automations to ensure I don't waste any watts.

Additionally my grid connection had to be upgraded to 200 KW service and in a effort to avoid future maintenance complications my roof was replaced with a standing seem metal roof ahead of the panel installations. This added power availability should allow me to hook up a future proof EV charger so that I can  make better use of my plugin hybrid by recharging during the day when needed rather than relying on a level 1 charger I currently use. 



This ties into the gimmick of smart home things based on the fact that the inverter reports data to the cloud. Home Assistants energy dashboard consumes this data to allow me to track total production and real time current. I was very disappointed to learn that my inverter was not also reporting net production like the API documentation indicated might be available. That added data can be accessed if I install some add on accessory to monitor the back feed to the grid or I can add on a full monitoring solution to track my individual circuits as well as the grid connection. Once I have that full data available I should be able to control my car charging to insure it really is powered by the sun.



Wednesday, April 6, 2022

Planning for failure

 This week the new Home Assistant Core 2022.4.0 was released. As with all updated I was eager to update my system after reading the release notes to make sure there was no breaking changes I care about. Additionally I took the opportunity to update the OS to 7.6 from 7.2. That is where the problems started.

Once the updates were complete I noticed an issue, Zigbee and Zwave communication was not working. At this point I realized the most recent full backup I had was from just under a week ago. Normally that wouldn't be a problem, but in the last week I had updated camera configurations, scripts, automations, and added new hardware since the last backup. 

Once I noticed this issue I tried to fix forward by touching the Zwave config that was claiming to be broken  then when that failed I restored from the partial backup automatically created when the Core version was updated. This didn't help. Then I paused and decided I should probably create a back up in the bad state since at least it had my script/automation/device changes. If I failed in restoring at least I could get back to the current status.

I then restored to the last full backup hoping that at least I could regain control of my lights. The restore process worked, but the issue persisted. This left me very confused for a few minutes until I realized that the OS level hadn't changed. Apparently Home Assistant does not consider OS level part of a "full" backup. Luckily they do allow downgrading OS via a simple terminal command, so I was able to downgrade the OS to 7.2 and reboot. At this point my Zigbee/Zwave integrations were working again. 


The next step was to go through the restore process once more, but this time using the backup I had just created after recognizing there was a problem. Luckily Home Assistant allows you to complete a partial restore from a full backup, so I was able to restore everything accept the Zwave configuration that I had attempted to correct manually. 


I know people say not to plan for failure, but in tech you really do need to have appropriate plans in place or you might end up not being able to turn your light off/on. This experience has inspired me to be more patient when it comes to applying updates and to ensure that a backup is done anytime a significant change is done.  

Thanks to this nifty add-on (https://community.home-assistant.io/t/add-on-home-assistant-google-drive-backup/107928) I have automated backups that are stored in my google cloud account on a regular cadence. But that doesn't protect me from making foolish mistakes like I did in this post. If anything, I previously had more caution around changes/updates when I knew the only backups available were ones I manually created. 


Friday, December 31, 2021

You've Got Mail

I decided I wanted add a sensor to know when my mail has arrived. Searching online showed that this wasn't an original idea. Most people run into trouble having a sensor for this due signal loss to either all metal mail boxes or distance. Before I bought a new sensor I chose to test these limitation by temporarily relocating a motion sensor to the back of my mailbox.  Luckily I didn't run into either of those issues since I already had Zigbee bulbs for some exterior lighting with a relatively short drive way and a plastic mailbox. 

I ordered an new THIRDREALITY Motion Sensor  since that exact sensor was used to test this concept.  To make the sensor less noticeable I removed the electronics and gave it a quick coat of spray paint to make it blend in with the back of the mailbox. 

To ensure I only receive a single notification I have the automation disable itself as its last action. 


 Separately I have an automation set to also trigger off of movement in the mailbox but only run it's actions if the "Motion Mailbox Mail Arrived" automation is disabled. All this automation does is re-enable the "Motion Mailbox Mail Arrived" automation.


Additionally  I have added re-enabling the "Motion Mailbox Mail Arrived" automation. This is due to the fact that I don't always care to retrieve my mail since I normally know what is being delivered. Informed delivery sends me an email each morning with a scan of my mail. https://informeddelivery.usps.com/ is worth checking out if you haven't heard of it before. 

The only thing left to do is monitor how well the sensor actually works now that it has been deployed. 

Thursday, November 25, 2021

Security Camera Setup

 I have had a security camera system in place for over 4 years, but I have never fully utilized it. My current 8 camera system is an integrated system by ZMODO. While it had good performance when first installed the image quality in a couple of the cameras has dropped off significantly in the last couple years.


Unfortunately the existing cameras are not compatible with anything other than the ZMODO base station that came in the original set. So I can't test new software solutions with the old hardware.  The other factor driving this update is the fact that ZMODO doesn't integrate with Home Assistant. It doesn't allow for imbedding image feeds or feeding motion alerts/object detection into automations.

To start this project I replaced the main camera that overlooks my front door. Luckily the cables run for the old cameras are power over ethernet cables that can be adapted for use with standard cameras by just clipping off the proprietary connector and installing a RJ45 connector.  So I have installed a generic 1080P RTSP camera using the old cable. 



Zone Minder, Frigate, and Blue Iris were all tested before I finally decided to use Blue Iris. This was selected due to the ease of setup and integration with Home Assistant via the Home Assistant Community Store (HACS).  This update required 3 software components be setup: Blue Iris, an MQTT server, and the Home Assistant Integration. 

I chose to make use of the convenient Unraid Community Applications store add on for Blue Iris that only requires selecting the data storage location to setup the docker image. Once the Blue Iris docker instance booted setup was very straight forward. The camera is added using the  RTSP url/port/credentials that are unique based on the specific camera. Additionally a user account needs to be setup to allow access via Home Assistant.


Adding the Home Assistant integration is as simple as adding it using HAC. All that needed to be set was the IP address, port, username, and password of the account setup in Blue Iris. 


At this point the camera is exposed to Home Assistant and the entities for motion alerts and connectivity.  The next task is actually feeding the motion sensors with data. To do this an MQTT server has to be setup. I chose to setup the MQTT server available in the official Home Assistant add on store. The tricky thing here is both the Add-On and the integration it adds has to be configured. The configuration is very straight forward to just set a username and password for the MQTT broker. 

The last step is configuring Blue Iris to feed the MQTT server the data. This is done by adjusting the server level configuration under Digital IO and IOT.  The MQTT server credentials need to be set and tested to ensure the MQTT sever is properly connected. 


At this point I added a new Camera page to my dashboard to add the new camera and sensor.  I was also able to create a basic motion activated alert to my phone. The final step of this setup is the same as all new Home Assistant changes, create a backup and securely store it on another system.

I will continue to monitor how this performs over the next week before I purchase a license for Blue Iris. So far it seems like it will be well worth the $60 license fee. If they happen to have a Black Friday sale I might make that decision sooner. I will be monitoring Black Friday and Cyber Monday sales for new camera to replace the remaining ZMODO cameras.

Friday, September 17, 2021

Smart Smoke Detectors

 Since I have recently expanded my smart home to include a Z-Wave network I have decided that I should add at least one other device to justify adding Z-Wave. The device I chose to add was a single smoke and carbon monoxide detector.  I chose to purchase the offering from First Alert  as it was the only option from any well known smoke detector manufacture. Similar to my feelings for smart locks I think it is much easier for companies to tack on smart functionality to the product they have generations of experience manufacturing than it is for a tech company to engineer a quality product from scratch. 


Sadly this integration does not seem to allow remote clearing of alarms. The functionality of this device was not clearly documented. That was the main feature I was wanting, but it seems the only option to get that feature is to go with a Nest. I can't recommend that though since the don't allow local control. Due to this lack of functionality I will not be replacing my other smoke alarms with these any time soon. I will revisit this in about 6 years when  I replace my existing smoke detectors due to their approximate 10 year lifespan. 

Wednesday, August 18, 2021

Smart Garage Door

 Early into my smart home journey I made the mistake of choosing a MyQ-G0301 to control the garage door. I have nothing against Chamberlain, but I regret this purchase since it requires internet access to work and is exposed to a third party.  Leaving an entry point to my home exposed started to worry me when I was researching smart door locks. 

Rather than replace the controller/hub with some other solution  or updating the garage door opener that is as old as I am I chose to accept the risk of the hub being compromised. The worst thing that this hub can do is flash, beep, and send a signal to open/close the door. I don't have to care about the device sending the door open signal if the door opener is not powered on. I was able to accomplish this by adding a locally controlled HS103 TP Link smart outlet

To make this as seamless as possible I have integrated it into existing automations that are triggered by my location.  As soon as I leave my home area the outlet is turned off.  As soon as I re-enter my home area  the outlet is turned on and after a 15 minute delay it is tuned off. This only requires that I manually turn the outlet on in order to open the garage.  I might have to look into smart buttons to more easily trigger this going forward.




Choosing to cut power to the garage door opener since I don't know how efficiently the MyQ would work if it was only powered on when I wanted to use it. Choosing this route also has the added benefit of not having to worry about anyone/thing else sending the open/close signal, which I know is not a big risk. 

Saturday, August 14, 2021

Smart Deadbolt

 About 6 months ago my electronic keypad deadbolt died. A couple of batteries in its battery pack had leaked causing the electronic control to stop working. This left me with a dumb key based lock with a useless keypad. 

I have finally selected a suitable replacement, the Kwikset SmartCode 910. This keypad integrates into smart homes by using the Z-Wave Plus protocol. This hardware was chosen since Kwikset has a proven track record with building quality locks and I have personally seen some of their basic digital locks last at least ten years even when constantly exposed to the weather. 

Since my Home Assistant didn't already have any existing Z-Wave hardware I chose to add a Nortek GoControl USB stick. I chose this Z-Wave radio since it also contains Zigbee radio which could come in handy if I ever choose to migrate from using a physical Raspberry Pi with a RaspBee II to a containerized installation. 

As this was my first foray into Z-Wave, I had to setup both the Z-Wave JS official add-on and add the Z-Wave JS integration. This was pretty straightforward once I realized both were required. To step the add-on, all that needs to be done is generate a random network key that is 16 bytes long and select the device. The GoControl has the Z-Wave hardware as port0 and the Zigbee hardware as port1.

Once the add-on is ready, I simply had to add the  Z-Wave JS integration and select configure form the integrations page. From that page I selected Add Node  to add my new device. Since this is literally a security device it needs to utilize the secure inclusion. Then all that had to be done was pressing the A button which my specific smart lock uses for pairing. 

Finally the new device is visible. Now I just need to figure out what useful automations or notifications I need to setup to make the most of this new device. 





Wednesday, August 11, 2021

TP Link Local API

 Due to recent issues I have experienced with my TP Link outlets becoming unavailable for a brief moment causing some automations to be triggered, I have decided to reset all of my smart outlets to local only control to see if it resolves the issue. This has the added bonus of removing one of my dependencies on web services. 

To do this I had to sign out of the TP Link Kasa app. TP Link does not currently let you opt for local only control if you are signed into their app. Then one by one place the outlets in pairing mode by holding down the power button for a few seconds.

Local Only Access


Once each device was set to local only control I was able to remove the old Home Assistant GUI integration and instead configure it via the configurations.yaml. In order to make this a one time change I first had to set static IP addresses for each device. Since I make use a a PI Hole adblocker as both my DNS and DHCP server, I was able to easily find each device based on their hostname reported to the DHCP server matching their TP Link model number. The MAC address can also easily be found by reading the label on the physical device or checking the device info in the Kasa app.

         
MAC ADDRESS


Once the devices have a static IP it is just a simple matter of adding the appropriate config to Home assistant.  The below example shows the config I ended up using.  One interesting thing to note was that my existing automations and Dashboards in Home Assistant  didn't require reconfiguration. I don't know if that was due to the mac addresses not changing or the device descriptions in Kasa were not changed. 

Configuration.yaml


Smart Home Switches for Older Homes: A Neutral-less Journey 🏠💡

For many of us living in older homes, the dream of a seamless smart home can quickly become a frustrating reality. A common hurdle? The lack...