Azzie's Blog

Just random stuff I'm working on

Tag: tech

  • My Smart Home and Home Assistant Configuration

    My smart home has various devices within my local network. For the most part, I try to keep my devices as local and offline as possible, accessible only via my local network and through digital smart assistants with online devices on my network. I try to avoid purchasing devices that require internet access to operate correctly.

    This post is divided into several sections for different types of connectivity. These are primarily Cloud, Matter, Zigbee, and Bluetooth.

    Cloud

    The worst of the bunch are the devices that require internet connectivity to interact with and the ability to reach external cloud services and have limited functionality without it and can expose security vulnerabilities. They tend to require proprietary applications to interact with them, and the cloud services can occasionally go down or be discontinued, rendering the devices useless.

    • Smart Speakers
    • Smart Phones
    • Smart Watches
    • Smart Televisions
    • Computers
    • Doorbells and Video Cameras
    • Robot Vacuum Cleaners
    • Hydroponics

    Smart speakers typically have internet connectivity and are always listening for a wake word that triggers further verbal interactions. I personally use the Amazon Alexa ecosystem as my primary smart speaker setup. While there are some local-based Smart Speakers, Alexa functions well for the most part. I have several Echo Dots that I use to control the various devices on my network, set timers and alarms, some notifications and reminders, and currently have Alexa Plus for AI interactions as well.

    Most modern smartphones tend to come with smart assistants with wake words, in my case Gemini and occasionally Google Assistant. While presently, Google Assistant is still utilized on Android Auto, Gemini has recently been integrated with my Google TV Streamer television. From past experience, I have avoided dedicated Google Home / Nest devices with wake words as they would share the wake work with my smartphone and sometimes trigger back and forth conversations with itself across devices. The Google TV Streamer is internet connected but doesn’t support wake words and can be interacted with via a dedicated Voice Assistant button on the remote. The Google TV Streamer and my Google Pixel are both in the Google ecosystem but can be interacted with in various ways with Home Assistant, such as automations for when I am watching or listening to media, or trigger automations when I am home or away. My Samsung Galaxy Watch 5 also supports Google Assistant and possibly Google Gemini with some firmware updates, or Bixby which I never utilized as I do not use Samsung SmartThings ecosystem.

    My Hisense television is intended to be internet connected and comes with Roku firmware. Due to privacy concerns with smart televisions, I do not connect it to the internet and use it solely offline, with my Google TV Streamer and my Asus ROG Ally handheld device running Windows docked to it. Occasionally, I will update its firmware via USB, but for the most part, I do not use the Roku ecosystem and utilize its features solely offline.

    My Asus ROG Ally and Lenovo ThinkPad devices currently both run Windows. I occasionally will interact with them locally on my network via Sunshine and Moonlight which use the Nvidia streaming protocol that works well for gaming over a network, as well as RDP. I have some Home Assistant integrations that let me interface with my Windows devices over MQTT messages, such as to control the power states of my devices.

    My Home Assistant instance runs on a virtual machine on Proxmox on my Intel NUC. I have several VMs on the NUC, but in terms of my smart home, the Home Assistant Operating System is absolutely the most prominent to mention. The various I/O including the built-in Bluetooth, ethernet, and USB ports allow for a reliable smart home configuration.

    My Doorbell can be interacted with relatively offline, with some connections performed through third-party HACS (Home Assistant Community Store) integrations, but functionality like answering the doorbell remotely requires internet connectivity and a proprietary mobile application, though some ecosystems like Google Home and Amazon Alexa may support some interactions. I have a video camera through the same manufacturer which does support completely offline local communication via ONVIF similar to the doorbell but can interface with voice calls and one-way video calls similar to the doorbell when over a stable internet connection. My Robot Vacuum has some Matter support (discussed below) but requires internet connectivity to configure the device initially, and handle room mapping and some interactions as well as firmware updates. This particular robot vacuum does not have any cameras, unlike many other robot vacuum cleaners which have major security risks from online intruders and critical vulnerabilities. All three of these devices can be controlled at limited capacity locally through Home Assistant with the third-party integration, as well as online through an official integration.

    The absolute worst of the bunch is my hydroponics system, which for all interactions (other than a few basic power controls via physical buttons), interfaces directly cloud services for all interactions. It cannot connect to Amazon Alexa or Google Home ecosystems, and the only reason it has a Home Assistant integration at all is because the proprietary mobile application has the API endpoints and interactions exposed when it is reverse engineered. The manufacturer refuses to allow local control via websockets or REST requests, and while it runs on an ESP32 Espressif chip, there hasn’t been enough demand for anyone to write or flash custom firmware to allow for local control of the device for power states or timers and alerts. There are other smart hydroponic systems that have similar functionality but are in other ecosystems, but for the time being, the device lives isolated on my network in a VLAN. All major controls of my device are available via the Home Assistant integration, so I do not have the proprietary application installed on my smartphone.

    Matter

    To avoid as much online interaction as possible, a major form of connectivity I use is Matter, a newer technology that standardizes connections over Wi-Fi as well as Thread. While I do have a Thread Border Router built into my Google TV Streamer, I don’t actively use it as I do not have any devices that support Thread or Matter over Thread. Therefore, all my Matter devices are connected via Wi-Fi.

    • Matter-supported A29 lightbulbs
    • Matter-supported smart plugs
    • Matter-supported robot vacuum cleaner

    The lightbulbs are multicolor, and the brightness can be adjusted. The plugs do not have energy tracking but are generally convenient. The bulbs automatically turn on when their lamps are plugged in, which means in the event of a power outage, they are turned on. The plugs are configured to return to their last state after a power outage. Unfortunately, the plugs change their MAC addresses each time they are plugged in, which tend to make them difficult to keep track of on the Wi-Fi network. The vacuum unfortunately depends on a manufacturer-supported application but can be added to Matter fabrics through the application. As of the time of this writing, only the Home Assistant and Amazon Alexa matter fabrics support Matter 1.2 which allow for robot vacuum cleaners. Google Home is in the process of expanding support and claims to have app-only support for control, with Google Assistant / Gemini to follow soon but I have yet to see it function as intended.

    All of my Matter devices are on a ‘fabric’ initiated via the Home Assistant app and my Android phone, which creates a separate fabric from Google Home. After I add the devices to Home Assistant, I remove the Android phone Matter fabric and then add it to the Amazon Alexa and Google Home fabrics. Fabrics are the networks that Matter devices can be controlled across. This means that if an online Amazon Alexa device such as the Echo lineup or Google devices like the Google TV Streamer are on the network, they can control the devices via those services online, routed through the fabric. Matter-enabled devices don’t require connecting to external cloud services for control. While the devices typically can only operate on 2.4ghz networks, they also require IPv6 to be enabled.

    Matter typically allows for manufacturers to serve firmware updates through fabrics.

    Zigbee

    Having a Zigbee coordinator connected to my Intel NUC host of my Home Assistant installation allows for controlling over a Zigbee network. These are low-power devices that don’t depend on other forms of connectivity like Wi-Fi or Bluetooth and can be controlled by Home Assistant automations and such as long as the gateway is connected. They tend to run off batteries and can usually last for many months without replacements.

    The Zigbee2MQTT addon for Home Assistant allows for messaging with Zigbee devices and the rest of Home Assistant efficiently, though the Zigbee Home Automation (ZHA) addon is available as an option as well. I tend to have a more stable experience with Zigbee2MQTT.

    • Zigbee-enabled smart switches for toggle-rocker switches
    • Zigbee-enabled motion sensor
    • Zigbee-enabled vibration sensor

    The Zigbee devices require a gateway or coordinator in order to be controlled, though some devices can also act as Zigbee routers to improve a mesh network. I don’t believe any of my devices currently have support as routers. Due to the fact that I only have a Zigbee coordinator connected to my Home Assistant host device, I cannot directly control the devices through Amazon Alexa or Google Home, as I do not have any devices that act as coordinators on those networks such as the Echo Plus or Google Nest Hub. In order to get around this, I use a middleware tool for Home Assistant called Home Assistant Matter Hub to serve device entities over the Matter protocol over my network. Thus, my Zigbee-enabled smart switches are served to the Google Home and Amazon Alexa Matter fabrics as simulated Matter devices. Amazon Alexa has been having issues with newer releases, so I use a slightly older but stable release of Matter Hub.

    The motion sensor and vibration sensors are only connected to Home Assistant and are used with automations. The motion sensor will turn on some lights in certain areas during certain times. The vibration sensor has a pair of automations where one tells Home Assistant that my non-connected laundry machine has started running, and a second one tells it that the laundry has completed a cycle, triggering push notifications to my phone as well as verbal alerts via Amazon Alexa devices.

    Bluetooth

    Some of my Bluetooth devices operate with standard Bluetooth protocols, while most utilize BLE, also known as Bluetooth Low Energy, which is a modern form of the Bluetooth protocol that is energy-efficient but also extremely convenient.

    Most of my Bluetooth devices are battery powered, though a few are plugged in.

    • BLE generic LED strips
    • BLE Finger-Bot devices
    • BLE Trackers
    • Shelly Blu Button
    • Smart Fitness Scale
    • Smart Watches
    • Remotes and Game Controllers

    The LED strips are typically low cost and were included with furniture, such as my nightstand and my liquor cabinet and are considered generic. The manufacturers for these light strips provide poorly implemented mobile applications for controlling them and they tend to have no security, so thankfully they are only lights. Some of the strips come with infrared remotes, while others have physical buttons to perform minimal controls. There are several HACS integrations for controlling these BLE devices by replicating the outgoing Bluetooth signals snooped from the officially provided applications. I currently use Elkbledom which works with the LED strips, though they work with another integration Elkbledob by another developer. While I don’t use any mobile applications currently, I want to note that an Android developer made an excellent application called Elkotrol to control these generic ELK lights with Bluetooth signals without having to use the official sketchy applications. The lights tend to get disconnected, or take a few tries to turn on or off.

    SwitchBot is a company that makes an assortment of convenience devices to simulate human fingers that operate often over BLE. They also have hubs to enable Matter support on these devices, but this is unnecessary as Home Assistant can control them directly. This includes finger-bots, retro-fitted smart locks, and more. Home Assistant has direct control of many SwitchBot devices through an official integration built into Home Assistant.

    Bluetooth device trackers have been around for a while, but Tile was the first major one with a large ecosystem and crowdsourcing of location information. I have a Tile Mate tracker on my keychain, as well as a credit card shaped Tile Slim in my wallet. Each has buttons that when pressed will ring my smartphone even if it is on Silent or Do Not Disturb modes. Some ecosystems support ringing Tile devices, including the official application as well as Google/Alexa ecosystems. While Home Assistant doesn’t support ringing Tile devices, it does support the location-tracking functionality as sensor information.

    My Shelly Blu Button Tough 1 that I have on my keychain can act as a tracker as well to broadcast location, but I do not have that setting enabled in order to conserve battery, and because I anyways have a Tile on my keychain already. It supports the BTHome protocol to send encrypted BLE messages, where Home Assistant has the decryption key and can trigger different automations based on button press patterns.

    My fitness scale of choice is an Etekcity scale, and it is designed to work with a proprietary application for syncing fitness information to ecosystems common on mobile devices (Google Health Connect, Apple HealthKit) but I instead use a HACS integration so it can send my fitness data directly to my Home Assistant. While the mobile Home Assistant app can listen for data via Google Health Connect, it doesn’t presently have the ability to log tracked data there. As I prefer my data to be stored on Google Fit, I used another HACS integration to sync the data from my scale to Garmin’s ecosystem through their API. From there, the more-reputable Garmin mobile app will store my data to Google Health Connect and therefore end up in Google Fit. While it takes extra steps, it means I don’t need to use a less-trusted application for tracking my health data. I previously attempted to use FitBit’s developer API, but Google has been slowly ending support for FitBit after acquiring the company as they are leaning to push Android Wear for their .

    My Smart Watches I have I wear occasionally. I have a Galaxy Watch 5 that I have written about in the past, as well as a FitBit Versa 4. I don’t actively use the Galaxy Watch much but it supports Wi-Fi, BLE and LTE connectivity and is fully supported by Android Wear applications including Google Fit. The FitBit Versa 4 is an interesting case, as it is a Google created smart watch that supports BLE, but has Amazon Alexa as a built-in voice assistant via the mobile FitBit application. The health data obtained from wearing it can be synced to the FitBit app via BLE and then synced to Google Health Connect.

    My remotes include but are not limited to the Google TV remote that comes with the Google TV Streamer. It can be found if lost similar to Tile devices via a press of a button on the Google TV Streamer itself, as well as the Google Home application which can act as a remote for the Streamer as well. The physical remote itself is tied to the Google ecosystem. I have programmed the YouTube button on the remote to act as a play/pause toggle, and the Netflix button to open an application of my choice as I do not subscribe to Netflix. The wildcard button allows me to change the input devices on my TV. Other Bluetooth remotes I have include the Roku remote included with my Hisense TV for the rare interactions that I cannot do with the Google TV Streamer over CEC. While I do not have an Xbox game console, I do have Xbox gamepad controllers that have Bluetooth functionality that connect to my Asus ROG Ally which is currently running Windows. I do not currently have any Nintendo Wii devices, but I am considering reobtaining a Wii Remote as well as the Wii Balance Board, both of which interact with devices over Bluetooth, though the remote requires two infrared lights to detect positioning, such as the poorly named “sensor bar”, or two candles reflecting back light to the infrared reader on the remote.

  • The Internet Archive as an Educational Technology Tool

    Foreword: This essay was written in November of 2020. I’m publishing it today, March 20th, 2023, in solidarity with the Internet Archive. More information about the Hachette v. Internet Archive lawsuit can be found on the Electronic Frontier Foundation website, the Library Futures website, and the Battle For the Libraries website by the advocacy group Fight For the Future.

    The Internet Archive is a useful technology tool that has several factors to consider ethical usage for educational purposes. I am for the use of the Internet Archive for usage in an educational context because the content that might be used by an instructor would be specifically chosen and relevant to course material. Content that is used for educational purposes would be considered under Fair Use, as no one is profiting financially, but rather learning and engaging with content that might otherwise be unobtainable. Webpages that may no longer exist, videos and software that may otherwise be unobtainable, and books and newspapers that are difficult to obtain would still be able to be referenced.

    Some arguments for using the Internet Archive for educational materials is the belief that information wants to be shared and that information wants to be free. By using materials that would otherwise be more rare or difficult to obtain for educational purposes, it can enlighten minds to think differently. Because specifically chosen content would be used under Fair Use, there would be freedom to apply and use the material as seen fit to the instructor to benefit the students and would be ethical from a contractual standpoint of the law. Students could benefit from viewing different eras of information from a unique perspective.

    Some arguments against using the Internet Archive for educational material is that there could be information that publishers may have wanted to obtain a profit when used or educational purposes. By using the Internet Archive to obtain these materials, one is circumventing the systems provided by the publisher. Fair Use and copyright often overlap and can be viewed as grey area from a legal standpoint. While typically information is preferred to be available for lower-cost or free for educational purposes, creators of content have put work and effort into the creation, and therefore their labor would not be compensated for, which can be seen as an ethical problem.

    In conclusion, using the Internet Archive for educational purposes is a good practice if done carefully and correctly. Content should be relevant to course material and used as such. Because of the free and open atmosphere of the Internet Archive, one still needs to apply how they use the material, crediting the authors and creators, and not circumventing them. Materials obtained from the Internet Archive should typically not be sold or used for profit unless they are in the Public Domain or especially have a license to do so. In an educational context, this is an unlikely occurrence, as generally the only profit would be gained knowledge.

  • Dissecting PDB and PRC files (Palm OS)

    Say you have a PDB or PRC file from an old Palm device, and it has things you want. Some things this could be include calendar info, audio, text memos, etc. Things of various formats could be stored in these Palm Record files to be read by the device. The problem is that these files can’t necessarily be processed or simply extracted and immediately be useable.

    These files typically have some header info, and then the actual file or files contents. Each file is stored in its own record, and larger files may need to be stored in multiple records possibly. Regardless, to break apart these files, I tried many different methods.

    First, I analyzed some files with a text editor to inspect the idea of what I was looking at. I had a particular file I wanted to extract, an alarm sound called Concerto, as it isn’t available online in the original MIDI format. After finding the correct PDB file which contained about fifty records of MIDI sounds from a backup, I started attempting to dissect it.

    One method included running a Java program to zip the contents as output, but it would create a massive massive file that could not actually be processed. Afterward, I analyzed the PDB file with a hex-editor to possibly break it apart. Some further research and someone suggested using API from a Java program written for Linux users to HotSync their devices called JSyncManager. This older program is open source, but to obtain the source code, I needed to use the obsolete CVS protocol to download it from Source Forge with the free version of CVSNT. The Java module that I needed got me nowhere.

    I eventually ran into two lovely programs called PalmDump and PDBMake. PalmDump would output all the data of a PDB or PRC file in both Hex and ASCII form in two columns, into a single text file, and with separate headers for each record. This was helpful and helped me confirm that I was looking for record 3 from the file. However, I was getting lost to the point that I posted on the Reddit SlaveLabour network. But before anyone responded, I found the solution myself.

    When taking the hexadecimal data and putting it into its own file using a hex-editor didn’t work. I tried putting a different MIDI of Game of Thrones music into a PDB file and saw something unusual in the header.

    I then confirmed my suspicion when I discovered the program of Par. This program essentially lets you properly dump all the records into their own files from a PDB or PRC file, similar to extracting a ZIP archive. When comparing the hex data of record 3 which I knew to be a MIDI, to the Game of Thrones MIDI, I realized the file header for MIDI format required that it start with MThd. The header I was seeing for the file was PMrc..Concerto.MThd.

    By removing that header up to the MThd with the hex-editor, I was able to playback the file as a MIDI! Sure, it didn’t sound exactly the same because of the different SoundFont included on Windows, giving it a piano instead of a beep. With WAVE audio files, the header starts with RIFF, but Palm adds its own stuff prepended at the beginning.

  • Windows Sandbox tips

    Recent versions of Windows 10 give users the ability to install a sandboxed version of the OS for running programs you may only need once, or don’t want to be installed on your main disk. When you are done, as soon as you close the Sandbox, everything you have done will be lost. I’m just going to list off some tips and flaws I’ve encountered with this feature.

    • To install this, you would need to install the Feature from the old Windows 7-era Windows Features. You can search “Turn Windows Features On or Off” in your start menu or access it from the classic Control Panel – Programs and Features – Turn Windows Features On or Off. It is listed as Windows Sandbox.
    • While this system logs directly into the interface, there are some rare scenarios you may need the password to the default user of the system, “WDAGUtilityAccount“. The password might be “pw123” however I’ve not had time to test it. What I did when I needed the password, was reset it with the command line, by running the command “net user WDAGUtilityAccount * ” without quotes, and this would allow you to set a new password. Remember that any password changes will, of course, be wiped when you open the Sandbox again next time.
    • There will be issues if you want to run Hyper-V alongside other VM programs like VirtualBox and VMWare. Unfortunately, Windows Sandbox uses a limited version of Microsoft’s Hyper-V, so conflicts tend to occur. I’m still trying to get Sandbox and VirtualBox running concurrently without issue. The new VirtualBox 6 supports Hyper-V but I’ve yet to be able to experience that.
    • At least in my experience, the Windows Sandbox IP address is 192.168.183.166 so if you run any server programs that you want to access on the host device that is running the Windows Sandbox through a web browser. I am unsure if this can be accessed from other devices on the network, by default at least.