Setting up RTL_433 to Monitor Sensors

RTL_433 is an open source project hosted on GitHub. While the name implies it only handles devices on the 433MHz band, it also supports devices on 868 MHz, 315 MHz, 345 MHz, and 915 MHz bands. Not only are there presets to decode popular devices, there are instructions to write decoding profiles for unsupported devices.

Once installed, you can customize your /etc/rtl_433.conf to output to MQTT by adding:

output mqtt://localhost:1883,user=user,pass=password,retain=0

Customizing the hostname, port, username, and password for your MQTT broker. RTL_433 outputs event json and state json. So…you can monitor events as they happen or the state of individual devices.

I was surprised at how many devices I was able to pick up that weren’t mine, and ultimately filtered out devices by removing protocols from the rtl_433.conf file. I’m picking up not only my Acurite weather sensor, but other people’s temperature sensors, TPMS(tire pressure monitoring sensors), and more. I can feed my sensors(not the ones I accidentally pick up), into WeeWX(my weather system), and Home Assistant(my home automation system).

 

 

Updating the Sensors

The last time I added to this series was a few years ago. But a new writer wrote something on WeeWX on the site, and the technology has changed, so I decided to update what I had done. I moved from WeeWX-sdr over to WeeWX-MQTTSubscribe. MQTTSubscribe is actively developed by Rich Bell, and he is very responsive to issues. The extension can act as a driver or a service…so either as your primary source of weather data, or to add additional weather data.

The other advantage is that RTL_433 can run as a standalone service and now supports publishing to MQTT. So, it can decode my weather sensors as well as my 433MHz leak sensors. Oddly enough, I also seem to be picking up someone’s tire pressure sensors as well.

Elsewhere, I assembled custom sensors to get additional readings, running ESPhome, also sending their data via MQTT and being integrated by the same extension to WeeWX. This includes barometric pressure and particulates.

This means my WeeWX installation is much more robust, and modular. This is mirrored in my Home Assistant installation, where I’ve increasingly divided off some subsystems to act more independently.

 

Embarking on your Smart Home Journey Without Breaking The Bank: A Guide to Affordable Home Automation

As technology continues to advance, turning your home into a smart and automated haven is more accessible than ever. You don’t need a hefty budget to enjoy the convenience and efficiency that home automation provides. In this blog post, we’ll explore some general thoughts on how to get started with cheap home automation, making your living space smarter without breaking the bank.

1. Define Your Automation Goals:

Begin your journey into home automation by identifying your goals. Consider the areas of your home where automation could enhance convenience, efficiency, or security. Whether it’s smart lighting, energy management, or home security, having a clear vision will help you make cost-effective decisions.

2. Start with Budget-Friendly Devices:

Affordable smart devices abound in the market. Begin with budget-friendly options such as smart plugs, which can turn traditional devices into smart ones, or smart bulbs that allow you to control lighting with your smartphone. These entry-level devices provide a taste of home automation without a significant financial commitment.

3. Explore Ecosystems and Compatibility:

When selecting devices, consider compatibility and ecosystems. Many affordable smart devices work seamlessly with popular platforms like Amazon Alexa or Google Assistant. Opting for devices that integrate with your existing ecosystem ensures a smoother and more cohesive home automation experience.

4. Smart Speakers as Central Hubs:

Investing in a smart speaker, such as an Amazon Echo Dot or Google Home Mini, can serve as a central hub for your smart home. These devices not only provide voice control but also act as a bridge to connect and control various smart devices in your home.

5. DIY Home Security on a Budget:

Home security doesn’t have to be expensive. Consider affordable options like smart door/window sensors, motion detectors, and security cameras. Many budget-friendly security devices offer essential features, allowing you to monitor your home without a hefty investment.

6. Explore Open-Source Solutions:

For tech-savvy individuals, open-source home automation platforms like Home Assistant or OpenHAB offer a cost-effective way to customize and control smart devices. While these platforms may have a steeper learning curve, they provide flexibility and compatibility with a wide range of devices.

7. Utilize Smart Home Apps:

Take advantage of free or low-cost smart home apps that allow you to control and monitor your devices from your smartphone. Many manufacturers offer dedicated apps that streamline the setup process and provide a user-friendly interface for managing your smart home.

8. Gradual Expansion and Upgrades:

Building a smart home doesn’t have to happen overnight. Start with a few devices, master their integration, and gradually expand your setup. As your comfort and familiarity with home automation grow, you can consider upgrading or adding more advanced devices.

Conclusion:

Getting started with cheap home automation is an exciting journey that doesn’t require a significant financial commitment. By defining your goals, exploring budget-friendly devices, and leveraging existing ecosystems, you can transform your home into a smarter and more efficient space. Whether you’re dipping your toes into smart lighting or diving into DIY home security, the world of affordable home automation is at your fingertips. Enjoy the journey into the future of smart living!

If you want to go a step beyond the basics, remember that there are more tinkerer level projects you can engage with. Check out our continuing series, Home Automation Obsession, for more on that.

Harnessing Weather Data: A Guide to weewx and Its Practical Applications

In an age where access to real-time weather information is at our fingertips, having a personal weather station can provide valuable insights into local weather patterns. weewx, a robust and customizable open-source weather software, empowers weather enthusiasts and hobbyists to set up their weather stations and collect, analyze, and share weather data. In this blog post, we’ll explore what weewx is, its key features, and a step-by-step guide on how to use it for your own personal weather tracking.

What is weewx?

weewx is a free, open-source software that interfaces with various weather stations to collect and store data. Developed in Python, weewx is designed to be highly extensible, allowing users to tailor their weather station setup according to their specific needs. It supports a wide range of weather station hardware, making it a versatile choice for weather enthusiasts with diverse equipment.

Key Features of weewx:

1. Data Collection:

weewx collects data from your weather station, including temperature, humidity, wind speed, and direction, among other variables. It interfaces seamlessly with popular weather station models, ensuring compatibility for a wide user base.

2. Data Storage:

The software stores collected data in a database, allowing users to maintain a historical record of weather conditions. This can be valuable for trend analysis, seasonal comparisons, and understanding long-term weather patterns.

3. Web Interface:

weewx comes with a built-in web interface that provides a user-friendly dashboard for viewing real-time and historical weather data. This interface can be accessed locally or remotely, depending on your setup.

4. Customizable:

One of the strengths of weewx is its customizability. Users can extend its functionality by adding plugins and tailor the software to their specific requirements. This flexibility makes weewx suitable for both beginners and advanced users.

How to Use weewx:

Step 1: Choose Your Weather Station Hardware

Before setting up weewx, ensure compatibility with your weather station hardware. The weewx community maintains a list of supported devices, ensuring you find the right match for your setup.

Step 2: Install weewx

Follow the installation instructions provided on the weewx website (https://www.weewx.com/). The installation process is well-documented, and there are different installation options available, including package installations for various operating systems.

Step 3: Configure weewx

Once installed, configure weewx by editing the configuration file to match your weather station model and personal preferences. This step involves specifying data retrieval intervals, units of measurement, and other settings.

Step 4: Start weewx

Launch weewx to begin collecting data from your weather station. The software will start recording weather information based on your configured settings.

Step 5: Explore the Web Interface

Access the weewx web interface through your web browser to view real-time and historical weather data. Customize the interface based on your preferences, and explore the various features provided.

Practical Applications of weewx:

1. Home Weather Monitoring:

Monitor and record weather conditions at your location, gaining insights into local microclimates and patterns.

2. Agriculture and Gardening:

Use weewx data to optimize watering schedules, assess frost risk, and make informed decisions for gardening and agriculture.

3. Education:

weewx can be a valuable tool for educational purposes, allowing students to learn about meteorology and data analysis through hands-on experience.

4. Community Weather Networks:

Contribute to community weather networks by sharing your weewx data with online platforms that aggregate weather information from multiple sources.

Conclusion:

weewx opens the door to a world of weather tracking possibilities, whether you’re a casual weather enthusiast or a dedicated hobbyist. By following the steps outlined in this guide, you can set up your personal weather station, start collecting data, and gain valuable insights into the atmospheric conditions in your area. Embrace the power of weewx and take your weather tracking experience to new heights!

Behind the Bowl: Exploring What’s in the Back of a Toilet

Toilets are an everyday fixture in our lives, providing a level of convenience and sanitation that we often take for granted. While the front of the toilet bowl is the focus of our attention, what goes on behind the scenes is equally important for the proper functioning of this essential fixture. Join us as we take a closer look at what’s in the back of a toilet and unravel the mysteries that contribute to a smooth flushing experience.

The Tank: A Reservoir of Functionality

1. Fill Valve:

Located in the upper part of the tank, the fill valve is responsible for refilling the tank with water after each flush. It is triggered by the flush valve and ensures that the tank is ready for the next use.

2. Flush Valve:

The flush valve is a crucial component that releases water from the tank into the bowl during a flush. It opens when the toilet handle is pressed, allowing water to flow into the bowl and carry away waste.

3. Flapper:

Connected to the flush valve, the flapper is a rubber component that seals the flush valve when the tank is full. It lifts when the toilet is flushed, allowing water to rush into the bowl. A malfunctioning flapper can lead to a constantly running toilet.

4. Overflow Tube:

Situated near the flush valve, the overflow tube prevents the tank from overfilling. It directs excess water into the bowl during the filling process, ensuring a consistent water level.

5. Float:

The float is a buoyant device that rises and falls with the water level in the tank. It controls the fill valve, signaling when the tank is full and needs to stop refilling.

Water Inlets and Connections:

1. Water Supply Line:

The water supply line connects the toilet tank to the household water supply. It is typically a flexible tube that allows for easy installation and maintenance.

2. Shut-off Valve:

Found on the water supply line, the shut-off valve controls the flow of water to the toilet. It can be turned off in case of repairs or maintenance.

Maintenance Tips:

Now that we’ve peeked behind the toilet bowl curtain, here are a few tips for maintaining a well-functioning toilet:

  • Regularly check for leaks or unusual sounds, as these may indicate a problem with the components in the tank.
  • Ensure the flapper creates a watertight seal after each flush to prevent water wastage.
  • Clean the tank and components periodically to prevent mineral build-up and extend the lifespan of your toilet.

Conclusion:

While the front of a toilet bowl handles the business end of things, the components in the back ensure a smooth and efficient flushing process. Understanding what’s behind the toilet can empower homeowners to perform basic maintenance and troubleshoot common issues. So, the next time you flush, take a moment to appreciate the intricate engineering that makes this everyday convenience possible. Happy flushing!

The Power of Weewx

There are a lot of different ways to store and use weather data. For my station, I wanted something that had a lot of built-in features and extensibility. I ended up with WeeWx, which is a well-supported python based project. They are currently in beta for Version 4.0.

WeeWx supports multiple sources for inputs, uploads to a variety of sites, and has extensions to add additional functionality. It generates reports that can be deployed by ftp or rsync to a remote website, or  as I do, you can host it on the computer running the software. WeeWx is lightweight enough you could host it on a Raspberry Pi. I do this for one of my weather stations. With the other, I’m hosting on the same computer that handles my Home Automation.

With something like a Pi, the biggest concern is frequent writes to the database. So if you are using a Pi, I suggest you use a database hosted elsewhere and transfer the reports to another computer, or you may wear out your microSD card. I will have to talk about my Pi issues another time, but the weak point on a Pi is the microSD card.

Installing WeeWx is simple as installing any other Linux package. Then, in order to receive data from 433MHz SDR(software defined radio) devices, the easiest way is to get an RTL-SDR USB dongle and add the extension, WeeWx-SDR. This requires a little compiling of various drivers to allow receipt of signals from a variety of different devices. It takes some trial and error to map the sensors to the right values in WeeWx though.This is just a matter of running an application and noting the output. However, once you do this, it stays stable…unless you change hardware. I am also using the Acurite Atlas, which is not in the stable version of RTL_433, the library that translates the 433MHz signals, but you can install the development branch.

I also supplement that data by running another extension, weewxMQTT, which I use to send in sensors that are not coming in via 433MHz. This is how I added a barometer, as I couldn’t find a 433MHz one. There is a robust set of examples from hobbyists of creatng MQTT enabled sensors using inexpensive wifi enabled boards like the NodeMCU or the D1 Mini.

After WeeWx is installed, and the drivers for the various sensors are added, the system will generate reports. The default skin, which is the template for the output, is probably sufficient for most people, but it can be customized, and alternate ones found online.

WeeWx also has built-in and extensible uploaders to send the data to various sources. I contribute to every source that will let me. Why discriminate?

Next, will cover some of the customizations I’ve put in.

 

Starting a Weather Station

A few years ago, I set up two weather stations. More recently, with me being stuck at home, I’ve made some tweaks and enhancements. I’ve invested some time in trying to figure out what I’d do if  I had to do it over again. So, in addition to improving the setup, I’m going to work on enhancing it.

At the moment, in one location, I’m using the Acurite Atlas weather station. The Acurite equipment is designed to be used with their station, or internet connected system, but I  do not do that. When I first started, I also used Acurite temperature sensors hooked into my Home Assistant instance to track internal temperature. But I’ve since dismantled that system and replaced it with a combination of other sensors.

Acurite is known as a low-end hobbyist brand, and while  there were some criticism with the accuracy of the Acurite 5-in-1 sensor, which I still use  in  one of my stations, the Atlas offers better accuracy and  several additional sensors.

All Acurite equipment transmits using a 433MHz radio, which can be picked up by a USB software defined radio  and  a program called RTL_433.  I’ve run this on a Raspberry Pi, and sent to a more robust system for storage There are alternative weather stations, which offer different ways to get the data, but the important part for me is to be able to get the data, because then I can do things with it, such as upload it to third party servers, display it, etc.

In future posts, I am going to get into more detail on how I set this up and what I’ve learned.

Adding Temperature Sensing to Your Home Automation System On the Cheap

Problem

I wanted to be able to measure the temperature and humidity in various parts of my apartment, because the heating and cooling isn’t evenly distributed. My plan was to average those numbers and use it as a baseline to tune the heat and cooling, as opposed to the temperature just at the thermostat.

This is a feature of some thermostats, like the Ecobee, where they acknowledge the issue of one location making decisions for the comfort of the entire house.

I don’t want to solder. This is a personal decision. I burnt out too many components trying to learn that in high school. The best options for hobbyists in this area are to build their own, which I may try again someday.  So, I need a prebuilt solution.

Off the Shelf Options

There are a lack of good inexpensive temperature sensors that can be easily integrated into a Home Automation system. The best inexpensive option I found were some Z-Wave sensors made by Xiaomi(they’ll be here in a few weeks from China and I’ll see how that works).

I have, for a few years, had an Acurite 5 in 1 weather station mounted outside. It measures temperature, humidity, wind speed, wind direction, and rainfall. It broadcasts updates every 36 seconds.

It came with a wireless temperature and humidity sensor that updates every 16 seconds.

Implementing a Solution

So, I had one of these, and after I got this working, I bought several more to cover the areas I wanted to. The system is ultimately expandable without limit.

There are two ways to get this data into a computer. One is with the provided Acurite hardware. They make an Internet bridge..which you cannot get data from so easily. They also make USB devices, which you can interface with. I use this to run a weewx installation(more on this later).

But, the option I chose was based on what I had in house. A software defined radio USB dongle left over from my ADS-B project(more on that another time too).

On Github, you can download a project called RTL_433, which is designed to retrieve data from wireless temperature sensors. It also supports a variety of brands and other types of sensors. And, on a positive note, if you find something that operates on the same frequency, you can probably get it included.

The RTL_433 program supports output in JSON, which I can then feed into something to monitor the data and use it. I originally had planned to pre-process it with a script and then send it into Home Assistant.

I have the output from the sensors being converted to MQTT messages. But the messages from RTL_433 are all merged together, coming from the same source.

Someone in the Home Assistant Discord chat room suggested I use Home Assistant itself for pre-processing.

- alias: rtl433_bedroom_convert
 trigger:
 - platform: mqtt
 topic: sensors/rtl_433
 condition:
 condition: template
 value_template: >
 {% if trigger.payload_json.id %}
 {{ trigger.payload_json.id == 494 }}
 {% else %}
 false
 {% endif %}
 action:
 - service: mqtt.publish
 data_template:
 topic: rtl433/bedroom
 payload: '{ "temperature_F" : {{ trigger.payload_json.temperature_F | round(1) }}, "humidity" : {{ trigger.payload_json.humidity }}, "model" : "{{ trigger.payload_json.model }}" }'

This is triggered when a sensor transmission comes in, and the id number is ‘494’, which is the sensor in my bedroom. It converts the payload into its own specific message that can be picked up not only by Home Assistant, but by anything that is monitoring these messages(dashboard anyone?)

You may notice a few things here. The sensors I have do support humidity for example…I’ll be using that as part of my climate control project. I am also rounding the temperature to a single decimal point, where the system supports 2 decimals. I do pass a few other parameters I am not yet using, such as battery on the sensor, which I’ll likely set up a notification on.

How to Choose the Brain for Your Home: Options for a Home Automation Hub

 

You can do Home Automation without any sort of hub. I still have one, the Wink hub. I chose it over Smart Things, the biggest competitor, for various reasons, but both have their place.

However, I have been moving to my own homebuilt system. I centered on a project called Home Assistant.

There are alternatives…OpenHAB, which uses Java, but Home Assistant has a good combination of ease of use and flexibility, so I am going to focus on it.

Home Assistant has a very active community of people and developers, which is an advantage. It is a Python based implementation and there is a distribution specifically for the Raspberry Pi making it easy to get started. New releases with new features happen about every two weeks.

I’m running it on an always-on system I already had, rather than a Pi, and I’ve spent a lot of my spare time building in support for items…and I keep adding piece after piece of integration.

Next up, my first integrations.

Starting with Security and Lighting

The two areas that I see a lot of interest in controlling are security and lighting. With the introduction of the Amazon Echo and its ilk, people want to turn their lights on and off with their voice assistant. It is often the gateway drug into more insanity.

One can start with just screwing in an alternative light bulb.

The other one, the more elusive for me, is security. I’ve never had a traditional security system with monitoring. But I’m increasingly interested in building my own. But it is hard to figure out what that is.

Paying for monitoring is not something I am prepared to do. You are paying a company to notify the police. I can do that. Notifying the police isn’t something I want to be automatic, because over 90 percent of alarm calls by police are false and there are actually fines for false alarms in New York City, where I live, and many other places.

We have one of the best security monitoring devices on us most of the time…the cell phone. If I can be notified by my phone and review the information, then I can make decisions based on that action. I’m going to talk about various notification options as well.

Recently, a family friend had to drive back home because their alarm was tripped. It was a false alarm, but the second that week.

Some of this, I am learning about as I go. So, I welcome anyone correcting me or giving me advice.