Saturday, February 18, 2023

Google Pro Wifi

 

Last week my internet stopped working. It stopped routing traffic and allowing access to its configuration page. Even after removing all other devices and attempting to factory reset it, it still failed to function other than the DHCP server still functioning.

I purchased the Nest Wifi Pro as a replacement as it was one of two mesh network options that supported WIFI 6 that I could purchase locally. It didn't hurt that it would fit in with my existing google phone and google home smart speakers.

 

My previous router was setup with separate SSIDs for the 2.4ghz and 5ghz networks and made use of both the primary network and guest network for various devices as I had intended to eventually segment my network to isolate the various IOT devices from my personal system and servers. I was disappointed to find out that I couldn't replicate my previous network as the Nest Wifi only supports a single SSID for both frequencies.

 

Since I had to re-provision almost all of my Wifi IOT devices, I decided to add all of them to the main network and make use of the group functionality to completely cut the internet access to most of the IOT devices, as true to the minimal documentation, telling the Nest Wifi to disable internet access to a device still allows local communication on the LAN. The only devices that still have internet access are my MyQ garage door opener gateway and my solar inverter.

 

Oddly my network switch also seems to have died at the same time. It was still technically functioning, but any device connected to it was getting assigned an IP but not resolving DNS requests. Luckily, I have a spare switch that I was able to start using as soon as I noticed the issue, but now I have to go through the annoying task of swapping that hardware. At least it will give me an opportunity to properly cable manage everything. Various hardware changes and replacements over the last couple years have left that a mess.

Wednesday, November 9, 2022

Withings

While trying to better track my health I have bought into a few Withings products. It started with the desire to get a smart scale that could integrate with Home Assistant. This desicion was made before they started having Bluetooth as a main way of integrating, so the Withings Body+ seemed like an ok compromise (settling for a cloud polling integration). 
While the weight tracking works exactly as expected once a developer account was created and port 443 was forwarded to 8123 to allow Withings to validate  the connect, I did have to manually add a sensor in configuration.yaml to convert the metric weights to pounds. 



After some success with this scale integration I found a good deal on their under bed sensor for sleep tracking.  This also worked great for sleep tracking but failed to push occupancy data to Home Assistant in a timely manner. To get that closer to real time data into my system I ended up having to setup make use of webhooks and use two of the five free automations in my if this then that account. 
This sensor proved very valuable as an added conditions to a few of my motion sensors as my puppy dog started triggering some of my lighting/morning routine automations were being triggered by him when he was allowed out of his crate overnight a few times. 

The only disappointing thing I have run into with Withings is the lack of smart watch data being imported. I don't know what I would do with my step count, but I am sure I could come up with some interesting notifications for motivation/reminders to get my steps in for the day.

Wednesday, November 2, 2022

Oral B

 The future is kind of stupid. Home Assistant just added support for my toothbrush to directly integrate with local pushing of data.  They made it so easy to integrate since they made Bluetooth a direct way of integrating things, all I had to do was click configure after turning on my toothbrush. 

While this might seem silly for a grown adult to track, I will be converting a time based notification that reminds me to brush after breakfast and before bed to only be sent if I have not brushed the appropriate number of times that day. I have also added a counter to track how many times the brush head has been used. Most of those functions are probably available in the corporate application, but now I can delete their app and have total local control over this health related data.


I could see people with little kids being able to automate a great deal of things to only be allowed for their kids if they have properly brushed their teeth for the day. 


Saturday, August 6, 2022

Futurama Sleeper

 I have gotten into the habit of playing re-runs of familiar comedies on my bedroom TV while trying to fall asleep. I am not alone in this somewhat peculiar habit as others have discussed here of Reddit. I am sure other people have similar comfort shows, but there is an actual documented community of this for Futurama. 

Up till now this has required a several step process every night involving turning on the TV, launching Plex, and going through several menus in order to shuffle whatever series I want that day. With a power monitoring smart plug I can detect the TV being turned on so automating the process seemed like a good idea that wouldn't take that much effort. I was wrong about the level of effort, but was ultimately successful in automating the process. 


The automation to trigger this is very simple. I have used a helper to ensure this is only triggered once per day as power readings can sometimes be inconsistent. A chron entry resets it every morning so it is ready each night. 

I thought the rest would be simple since the Plex integration supports systematically playing a playlist you have configured on your plex server.  like below. But this service call only works well in one very specific scenario. Plex already has to be open and not have a title currently playing or you get some odd behavior like the audio playing from the playlist with the plex menu still open. 


To ensure that the play_media commands behaves optimally, I had to add another integration for Android TV.  Using the Android TV integration I am able to force Plex to close then force it to open again after a delay.  That combination of commands seemed to work as I was debugging/testing the process. 


The next day when I was excited to save a few seconds based on my  1+ hour(s) of effort, but it didn't work. I tried to manually call the play_media service after rebooting my Android TV device. The last thing needed to make the basic script work as expected another call to a plex service to ensure the client was active after restarting Plex on the device.


The one relatively simple addition to this script I also implemented was allowing for a variety of different shows be selected as eventually a single show gets a bit monotonous. I first attempted to use a dropdown to inject the playlist name in the service call, but could not figure out the correct syntax if it is even possible. Instead I decided to implement what is effectively a checkbox using multiple Toggle input helpers. Each of the shows toggles also has an automation that when they go from off to on, turn off all the other show toggles in the set. This allowed me to create a relatively user friendly card I can add to any dashboard. 





Tuesday, July 12, 2022

Energy Monitoring


I was warned by the installer that my choice of system size might not perfectly offset my usage. I decided to take that as a challenge to reduce my energy usage instead of increasing the size of my solar system. So far I have had two power bills that reflected a full month of solar usage, with an average of $20 due. To address this I have decided look into more closely metering individual devices to better understand my energy usage. 

I know there are several options that could be used to get this data into home assistant. Luckily someone already did a great job of summarizing these options, XtremeOwnage investigated each of the options here. Based on that article I decided to go with the Emporia Vue 2 flashed with ESPHome as described here

Using the documentation flaviut published was pretty straight forward. The first major issues I ran into was with the initial flashing of ESPHome. This was my first attempt at using ESPHome with my Home Assistant ecosystem. I installed ESPHome as an add on to my install of Home Assistant, but due to compilation issues I was unable to use the add on to flash the device. I ended up using my desktop to flash the device, which allowed me to move forward.  

The hardware installation was very straight forward and only took about 45 minutes. I ended up having to reverse the collar on the antenna since my breaker box is flush with the wall in the garage. Luckily my breaker box was just updated when I had my solar installed, so there was ample room for the device and additional wiring for all 18 CT clamps. One of two issues I had was installing the CT clamps for my solar circuit backwards since they all indicate the proper direction as towards breaker, while the solar circuits should be away from the breaker, luckily that could be resolved in software.

Another issue I had was because I was unlucky in my choice of phase to monitor for my dryer. Apparently the motor for the dryer drum is only 120, not  240. The phase I chose monitor is only used for the heating element so I will either have to be clever in any automation I setup to detect when the dryer is done or I will need to adjust which phase has the clamp. 

When I tried to update the initial configuration with ESPHome I learned that the yaml file was actually used as a source file when compiling the program for ESPHome so I still couldn't used the Home Assistant add on to update it. I then installed the ESPHome docker image on my unraid system. One additional change I had to make for the docker install of ESPHome to recognize the Vue was set a static IP on the device. Once that was specified the device was found I was able to remotely update it. 


For a basic installation the only required changes to the base yaml file needed are specifying which phase each input and their multiplier for tracking 240V devices on a single sensor.  Because I have solar power, I had to add some additional sensors to have the correct info exposed for the home energy dashboard. I needed breakout the total power to separately expose data on when energy was being imported and exported. While the total_daily_energy sensor accurately tracks the net usage, Home Assistant does not play well with power sensors that decrease in KWH or report negative values. The below code adds the needed sensor data to home assistant to properly use the energy dashboard.


Now that I have all this info available in home assistant I can take a deeper look into what devices my power is really going too. My AC unit is taking the majority of my power this week. Being a 10 SEER unit I will have to seriously consider upgrading to a modern more energy efficient unit once I have more funds available. 






Friday, July 8, 2022

Resolving Errors

 For the past several months I have been dealing with issues updated Home Assistant OS. Anytime I tried to upgrade from 7.2 my HUSBZB-1 stick stopped showing up as an option for the zwave and zigbee integrations. Other users reported similar issues with version 7.3 so I waited for 7.4. Once 7.4 was confirmed by other users to correct the issue I tried to upgrade. 

 When I initially upgraded to 7.4 the issue persisted so I though the other uses might have been mistaken about it being resolved. I worked through downgrading the OS to 7.2 and waited for a future update to resolve it. Then I forgot all about the issue until upgrading a few weeks later. In my haste to install  a core update I also updated the OS. This lead to my post about disaster recovery

This week I finally circled back to this issue since Home Assistant somehow seemed to start automatically running the update over and over again forcing the system to OS 7.6. This completly crippled my smart home. This lead me to searching the old threads on forums where other users had similar issues with OS 7.3  and thinking I needed to upgrade my HUSBZB-1 stick to the latest firmware as recommended here. I was ultimately successful in updating the firmware, but my issues persisted. 

At this point I was left thinking either I needed to start from scratch  or a new zwave/zigbee stick. I decided to start checking all reasonable solutions before paying for some new hardware, so I flashed another small SSD I had in my spare parts bin with the latest image for installing Home Assistant OS 8.0. At this point I chose to initialize the new instance of Home Assistant and try to configure the stick with a single zwave outlet and a single zigbee switch  to confirm if starting from scratch was a possible solution. 

This attempt failed also; the stick was still not showing up as expected. Additionally the fresh install was not reporting the expected 8.0 OS version, it was still reporting 7.6.  This lead me to look at the Raspberry Pi hardware as that was one of two constants in all these issues. I realized I still had the micro-sd card inserted, which had the PI image that is supposed to be used to switch the PI to booting for USB instead of micro-sd. I am still not sure how this was causing the issue, but after removing the micro-sd card and switching back to my original SSD the updates completed successfully to 7.6 with the stick working. This allowed me to finally get completely up to date. 

Wednesday, July 6, 2022

Open EVSE

 After over three and half years making due with a level 1 charger for my car I have decided to upgrade to a proper level 2 charger. I chose to install an Open EVSE charger as it allows local control and can integrate with Home Assistant nicely by way of  a HACS integration. 






















This charger allows me to see detect when the vehicle was plugged in and issue a command to turn off the charging before the car has communicated that a charging session needs to start.  Additionally it allows Home Assistant to send commands to set the max charge amperage. This data allows me to setup automations to automatically recharge quickly after allowing the battery time to cool if I have come back from lunch or  to schedule slow charging overnight. 

This charger also exposes the energy usage data. While my old solution of the factory level 1 charger with a smart outlet also exposed this data, it is important to note that functionality was not lost in this upgrade. I would hate to take two steps forward just to take one step back when upgrading smart home equipment. 

While my car is only a plug-in hybrid that tops out at about 14 AMPs, the charger was installed with wiring, outlet, and breaker rated for 60 AMPs. This will allow the Open EVSE to be used for several years and remain useful if I upgrade to a full EV in the future. Additionally this installation added a much needed 240v outlet in my garage that can be used for other things such as powering a welder or providing power for a trailer if the need ever arises.

Sunday, July 3, 2022

MQTT

Some of the device I have integrated into my smart home use MQTT to communicate to Home Assistant. Since MQTT is a widely used protocol, utilities exist for most existing systems.  While I still don't understand completely the underlying protocol of MQTT, it seemed like the best route to setup a custom sensor to get feedback from a script on my Linux system for ripping backups of discs. 

I simply had to mosquitto_pub entries to the the existing shell script that automates the process in order to know the status of process.  Since I only really care to know when I need to get up to swap a fresh disc into the system I simply report 1 when the tray is open and 0 when the ripping is in progress.


On the Home Assistant side it was simple to add a binary sensor to subscribe to the topic and messages I specified in the shell script. This allowed me add an automation to flash my WLED bias lighting on my desk with a specific color scheme for a minute to let me know it has completed.








Additionally I decided to try something new by using this to add tracking data for this process in Home Assistant. To track the number of discs ripped I added  a counter helper to store the data.  The automation that I created for the notification light was adjusted to call the counter increment function to track the number of discs I have ripped. I will be manually setting the current count to reflect discs that were ripped before this was integrated. 









While I normally like to link back to the appropriate project when talking about projects, I have chosen not to do so here due to legal implications of specifying the content of the discs being ripped. I will simply say the software doing the ripping is widely considered the go to solution and is free but not open source. The script for automating the ripping is separate but also easily findable. 

Update:
After clearing the backlog of discs I had sitting around I realized that I could also make use of this MQTT data to intelligently save power when I am not actively ripping discs. I have configured the automated script to run as a service on startup (which required a small re-write of the ripping automation script to avoid using paths based on executing user) and configured the BIOS to power on when power is restored. With those settings and by adding a smart plug I was able to create an automation so that if the tray is open for 1 hour the power is cut. Then when I want to resume ripping discs I just have to turn the smart plug back on with either a voice command, through Home Assistant, or by directly hitting the physical button. 

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 

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...