Summary
- NFC tags can help quickly track when plants have been watered by triggering an automation that logs the time an date.
- You can use this trigger to also enable a notification that lets you know when it’s time to water again.
- NFC tags can be used to trigger all sorts of home automations.
I love a good house plant. That is, until they start dying. It’s not that I don’t care about my pot plants, I just have a terrible memory and struggle to remember when each needs watering. That’s why I decided to create a way to track when I water each plant and remind me when it’s time to water them again.
My Terrible Memory Was Killing My Plants
Houseplants don’t just need water, they need it at the right times. Either I’d forget to water them, and they’d slowly die of thirst, or I’d water them too often, which is a surefire way to end up with root rot.
I tried using the Planta app, which prompts you to water each plant after the appropriate amount of time. However, the app relies on you manually logging each time you water a plant, and when I’d forget to do that, I’d end up having to water by guesswork. I knew there had to be an easier way.
I needed a simple way to quickly log the date and time when I watered each plant. It had to be something I could do in a moment or two without opening up apps and navigating through screens to find the right place to log each plant. I began to wonder if NFC tags might be just the thing.
You can purchase NFC stickers online relatively cheaply, with 50 stickers costing less than $15. This was more than enough to add one to every plant pot in my home; you can buy them in smaller quantities, but I wanted some extra to play around with for other automations.
The beauty of NFC stickers is that you can put them almost anywhere and easily scan them using your smartphone. I knew it was possible to trigger automations in the Shortcuts app on my iPhone by scanning an NFC sticker or AirTag. That meant I should be able to find a way to log the time I scanned each sticker, so I’d have a record of exactly when each plant had been watered.
Then all I’d need to do would be to scan the NFC tag on the bottom of the plant pot whenever I watered it. Since each sticker is unique, I’d be able to track the date and time that each plant had been watered. I went ahead and stuck an NFC sticker on all of my plants, hidden beneath the pots so they wouldn’t be an eyesore.
Creating a Helper in Home Assistant to Log Watering Time
I use Home Assistant to automate my home, and as powerful as the Shortcuts app is, Home Assistant is far more capable. I decided that the best approach was to create helpers in Home Assistant.
Helpers are simple ways to store information, such as numbers or text. You can also create date and time helpers that store time and date information. I could use one of these helpers to store the time and date of watering for each plant. I’d then be able to use this information to send myself notifications when each plant was due to be watered again.
Creating a helper in Home Assistant is simple enough. Go to Settings > Devices & Services and then select “Helpers” at the top of the screen. Click “Create Helper” and select “Date and/or Time.” Give the helper a name. I’ll be using “pippa_watered,” since this plant is called Pippa, obviously. Choose an icon if you want, and select “Date and Time.” Click “Create” to finish the job.
Creating an Automation That Runs When I Scan a Tag
Next, I needed to create an automation in the Shortcuts app that runs when I scan an NFC sticker with my iPhone. This is simple to do.
Open the Shortcuts app and tap the “Automation” tab at the bottom of the screen. Tap the “+” (plus) icon in the top right corner and select “NFC.”
Tap “Scan” and hold the top of your iPhone near your NFC sticker until it registers. Give the tag a name. Select “Run Immediately” so you don’t have to confirm that the automation will run each time you scan the tag. Tap “Next” and you’re ready to create your shortcut.
Using Call Service to Log the Watering Time in Home Assistant
There are four things I need to do with my shortcut. The first is to make the phone vibrate so that I have a physical confirmation that the NFC tag has scanned without needing to open my phone. The second is to get the current time and date and ensure it’s in the correct format.
The third is to get Home Assistant to save the current time and date to the helper I created earlier. Finally, I want to turn on the automation that will send an alert to my phone when it’s time to water the plant again. You’ll find out why I need this last part later on.
Select “New Blank Automation,” tap “Search Actions” and type “Vibrate.” Select “Vibrate Device.”
Search for “Date” and select “Date” from the results. Search for “Format” and select “Format Date” from the results. Tap the arrow, select “Date Format” and choose “ISO 8601.” Toggle “Include ISO 8601 Time” on to include the time. This gets the current time and date in a format that will work in Home Assistant.
The next stage requires a workaround, as Home Assistant doesn’t seem to like it if you enter the data for service calls directly in the Shortcuts action. If you define it in a Dictionary action first, however, everything works fine.
Search for and select the “Dictionary” action. Tap the “+” (plus) icon and select “Text.” Tap the “Key” field and type “entity_id.” Tap the “Text” field and enter the name of the helper you created earlier in the second. In this example, I’ll enter “input_datetime.pippa_watered.”
Tap the “+” (plus) icon again, select “Text,” tap “Key” and type “datetime.” Tap the “Text” field and select “Formatted Date.”
Search for “Home Assistant” and select “Call Service” from the results. Tap “Service” and select “input_datetime.set_datetime.” Tap the arrow, select “Choose” and pick your Home Assistant server. “Dictionary” should automatically be filled in the data field. This will send the current date and time to Home Assistant and store it in the helper you created earlier.
Search for and select the “Dictionary” action. Tap the “+” (plus) icon and select “Text.” In the “Key” field, type “entity_id.” Tap “Text” and enter the name you’re going to call the automation that will send your watering reminder. In this example, I’ll use “automation.pippa_reminder.”
Search for “Home Assistant” and select the “Call Service” action. Tap “Service” and select “automation.turn_on.” Tap the arrow, select “Choose” and select your Home Assistant server. Ensure that “Dictionary” is in the data field. Tap “Done” to save your shortcut.
When you scan your NFC tag, the shortcut will vibrate your phone, get the current date and time, send them to the helper you created in Home Assistant, and turn on your notification automation.
Creating an Automation to Remind You When It’s Time to Water Again
The only thing left is creating the notification automation that the shortcut is trying to turn on. This will be set to run every hour and checks whether the current time is greater than the time you scanned the NFC tag plus a set amount of time. In this example, I’ll be using 48 hours.
Once it’s more than 48 hours after I scanned the NFC tag, the automation will send a notification to my iPhone telling me to water my plant and then will turn off the automation. The reason for this is that if I don’t turn the automation off, I’ll keep receiving notifications every hour, since every subsequent hour it will still be more than 48 hours after the last watering was logged.
Turning off the automation ensures that I only receive the notification once. The next time I scan a tag, the shortcut will turn the automation back on, ready to send another notification.
You can create the automation using the visual editor, but this is how it looks in YAML. You can recreate this for your own automation, although you’ll need to change the name of your helper and mobile device, and ensure that you save the automation with the same name you used in your shortcut. You can change the “48 * 60 * 60” part, which sends the notification after 48 hours, to a more suitable value for your plant.
Repeat the Process for Your Other Plants
Once you’ve done the process for one plant, you can repeat it for all of your other plants, giving them their own watering schedules depending on the type of plant. It’s a reasonable amount of work to set up, but once you’ve done it, all you need to do is scan your NFC tag each time you water a plant, and you’ll get a notification when it’s time to water again.
If your plant doesn’t need watering, you can leave it for a day or two and scan the tag the next time you water it.
NFC tags are a cheap and simple way to trigger automations around your home. You can stick them almost anywhere you want and all you need to do is point the appropriate part of your phone at them to start an automation. Tracking plant watering is one way to use them, but there are plenty of other things you can use them for.
For example, you could create a similar system to track when you’ve fed pets such as fish and generate reminders for when you need to feed them next. You can stick an NFC tag by your front door to scan when you leave home, that will turn off all your lights and smart plugs.
You can scan an NFC tag when you sit down at your desk to turn on Do Not Disturb or silence notifications. You can use one in your car to start your road trip playlist or have one on your fridge to open your shopping list. My one frustration is that you can’t scan NFC tags with an Apple Watch, which would make doing so even more convenient.
Thanks to some cheap NFC tags and a little bit of time figuring out what I wanted from my automation, I was able to create a system that lets me easily log when I water each of my pot plants. I don’t need to worry about remembering when to water them again, as my phone will remind me when the time comes. It’s made keeping my plants alive so much easier.
Until we get the promised humanoid robots that will take these mundane tasks off our hands, it’s the best I’m going to get.